Genian EDR

Download 0
Last updated Nov 17, 2026

지니언 EDR - 리눅스 mutt 무기화 문서 스피어피싱·xdotool RDP 자동화·웹셸 태스킹(Phase1) 또는 악성 GPO 도메인 배포·네트워크 스니핑·자격증명 탈취·SSH/Ngrok 측면 이동(Phase2·3) 복합 행위 - Lazarus 침투 체인 의심

지니언 EDR 로그에서 리눅스 공격 호스트의 스피어피싱 발송·RDP 자동 조작·웹셸 명령 전달 또는 악성 GPO 배포·네트워크 스니핑이 다른 침투 행위와 겹치는 Lazarus형 침투 체인을 탐지합니다.

Overview

Priority High
Type Batch
Schedule Every month/Every day/Every hour/Every 10 mins */10 * * * *
Message 지니언 EDR - Lazarus(Phase1)형 복합 행위: $host_ip
Output field order hostname, host_ip, grp_cnt, anchor_cnt, disc2_cnt, groups, techs, first_seen, last_seen
MITRE Techniques T1566.002· T1021.001· T1071.001· T1041· T1140· T1105· T1059.004· T1082· T1484.001· T1040· T1552.004· T1555.004· T1003.001· T1021.002· T1572· T1021.006· T1569.002
MITRE tactics TA0001 Initial Access· TA0002 Execution· TA0005 Defense Evasion· TA0006 Credential Access· TA0007 Discovery· TA0008 Lateral Movement· TA0011 Command and Control· TA0010 Exfiltration
Origin User proposal letsgo

Query

1table duration=30m EDR_GENIAN 2| search (_schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove")) 3 or (_schema == "genian-edr-process" and event_subtype == "ProcessStart") 4| search len(trim(hostname)) > 0 5| eval psrc = if(len(trim(image_path)) > 0, trim(image_path), trim(image)) 6| eval proc = lower(substr(psrc, lastindexof(psrc, "\\") + 1)), ipath = lower(psrc), cmd_l = lower(nvl(cmd_line, "")), 7 i_dir = if(lastindexof(psrc, "\\") >= 0, lower(substr(psrc, 0, lastindexof(psrc, "\\"))), ""), 8 par = lower(nvl(substr(parent_image, lastindexof(parent_image, "\\") + 1), "")), hostname = lower(trim(hostname)) 9| eval b64 = if(in(proc, "powershell.exe", "pwsh.exe"), valueof(groups(cmd_line, "(?i)(?:^|\\s)\"?-(?:e|ec|en|enc|enco|encod|encode|encoded|encodedc|encodedco|encodedcom|encodedcomm|encodedcomma|encodedcomman|encodedcommand)\"?\\s+\"?([a-z0-9+/]{20,}={0,2})\"?(?:\\s|$)"), 0), null) 10| eval ps_text = if(in(proc, "powershell.exe", "pwsh.exe"), lower(concat(cmd_line, " ", nvl(decode(frombase64(substr(b64, 0, len(b64) - mod(len(b64), 4))), "UTF-16LE"), ""))), cmd_l) 11| eval fpath = lower(nvl(file_path, "")), f_dir = if(lastindexof(file_path, "\\") >= 0, lower(substr(file_path, 0, lastindexof(file_path, "\\"))), "") 12| eval grp = case( 13 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "/mutt$") and (match(cmd_l, "\\s-a\\s+\\S") or (match(cmd_l, "\\s-s\\s") and match(cmd_l, "\\s-[cb]\\s")))), "spearphish", 14 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(cmd_l, "\\bxdotool\\b") and match(cmd_l, "--window\\b") and match(cmd_l, "\\b(?:type|key|keyup|keydown|windowactivate)\\b")), "rdp_xdotool", 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "/(?:curl|wget)$") and (match(cmd_l, "\\bcmd\\.exe\\b") or match(cmd_l, "\\bpro=cmd\\b") or (match(cmd_l, "\\s-f\\s+\\S*=@") and match(cmd_l, "\\.(?:aspx|asp|php|jsp|jspx)\\b")))), "webshell", 16 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "/(?:curl|wget)$") and (match(cmd_l, "(?:\\s-t\\s|--upload-file\\b|--data-binary\\b|\\s-d\\s+@|\\s--data\\s+@)") or match(cmd_l, "x-amz-(?:algorithm|credential|signature)\\b") or (match(cmd_l, "https?://[^\\s/]+:[0-9]{4,5}/") and not(match(cmd_l, ":443/|:80/|:8080/"))))), "lx_exfil", 17 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and ((match(ipath, "/base64$") and match(cmd_l, "\\s(?:-d|--decode)\\b")) or (match(ipath, "/xxd$") and match(cmd_l, "\\s-r\\b")) or (match(ipath, "/openssl$") and match(cmd_l, "\\senc\\b[^\\n]*\\s-d\\b")))), "base64", 18 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "/(?:curl|wget)$") and match(cmd_l, "(?:\\s-o|--output(?:-document)?)[= ]?\\s*\\S?/(?:tmp|var/tmp|dev/shm)/|\\|\\s*(?:sudo\\s+)?(?:ba|da|z)?sh\\b")), "lx_dl", 19 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove") and (match(concat(fpath, " ", lower(nvl(file_path2, ""))), "(?:^|\\s)/(?:tmp|var/tmp|dev/shm)/[^\\s]+") and file_type == "EXEC" and not(match(lower(psrc), "^/usr/bin/(?:dpkg|apt|apt-get|snap)$|^/usr/lib/snapd/"))), "lx_tmpdrop", 20 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(cmd_l, "(?:curl|wget)\\b[^\\n|]*\\|\\s*(?:sudo\\s+)?(?:ba|da|z)?sh\\b") or match(cmd_l, "/dev/(?:tcp|udp)/[0-9a-z]") or match(cmd_l, "python[0-9.]*\\s+-c\\s[^\\n]*(?:urllib|requests|socket)[^\\n]*(?:subprocess|os\\.system|exec\\(|memfd|pty\\.spawn)"))), "lx_oneliner", 21 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and match(ipath, "/(?:ba|da|z|k)?sh$") and match(cmd_l, "(?:^|\\s)(?:ba|da|z|k)?sh\\s+/(?:tmp|var/tmp|dev/shm)/[a-z0-9_]+\\.sh\\b") and not(match(cmd_l, "/tmp/[0-9]+\\.[a-z0-9]+\\.sh|apt-key|gpghome|/gpg\\.[0-9]"))), "lx_disc", 22 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(cmd_l, "gpowned|sharpgpoabuse|pygpoabuse|new-gpoimmediatetask") or (match(cmd_l, "\\bgpo\\b|group policy") and match(cmd_l, "immediatetask|scheduledtasks\\.xml|\\bgptmpl|registry\\.pol") and match(cmd_l, "system32|/tmp/|\\.exe"))), "gpo_abuse", 23 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((match(ipath, "/(?:tcpdump|dumpcap|tshark)$") or in(proc, "tcpdump", "pktmon.exe", "dumpcap.exe", "tshark.exe")) and (match(cmd_l, "\\s-w\\s|\\s-i\\s|--interface|\\bfilter\\s+add\\b|\\bstart\\b|--pkt-cnt|\\s-c\\s+[0-9]") or proc == "tcpdump")), "netsniff", 24 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "\\.ssh\\b") and match(ps_text, "id_rsa|id_ed25519|id_ecdsa|id_dsa|known_hosts|\\bls\\b|get-childitem|get-content|gci\\b|\\.pub\\b")) or (indexof(ipath, "/") == 0 and match(cmd_l, "(?:cat|cp|tar|scp|base64)\\b[^\\n]*/\\.ssh/(?:id_rsa|id_ed25519|id_ecdsa|id_dsa)"))), "sshkey", 25 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "vaultcmd.exe" and match(cmd_l, "/list")) or (proc == "cmdkey.exe" and match(cmd_l, "/list\\b")) or (proc == "rundll32.exe" and match(cmd_l, "keymgr\\.dll\\s*,\\s*krshowkeymgr")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "passwordvault|credenumerate\\b|get-storedcredential\\b|windows\\.security\\.credentials"))), "credmgr", 26 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(cmd_l, "\\b(?:sekurlsa|lsadump|kerberos|crypto|privilege|vault|dpapi|misc|token|event|ts)::[a-z]") or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "invoke-mimikatz\\b|sekurlsa::|lsadump::"))), "mimikatz", 27 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "rundll32.exe" and match(cmd_l, "comsvcs(?:\\.dll)?[\\s\\S]*minidump|#\\+?24\\b")) or (in(proc, "procdump.exe", "procdump64.exe", "procdump64a.exe") and match(cmd_l, "\\s-m[ap]\\b[\\s\\S]*lsass|lsass[\\s\\S]*\\s-m[ap]\\b")) or in(proc, "mimikatz.exe", "nanodump.exe", "pypykatz.exe") or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "invoke-mimikatz|sekurlsa::|lsadump::|comsvcs(?:\\.dll)?[\\s\\S]*minidump|minidumpwritedump|out-minidump"))), "lsass", 28 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (((proc == "net.exe" or (proc == "net1.exe" and par != "net.exe")) and match(cmd_l, "\\bnet1?(?:\\.exe)?\"?\\s+use\\b") and not(match(cmd_l, "\\s/d(?:elete)?\\b")) and match(cmd_l, "\\$(?:\\s|$|\\\\)|\\\\\\\\[a-z0-9._-]+\\\\")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "new-smbmapping\\b|new-psdrive\\b[^\\n]*\\\\\\\\[a-z0-9._-]"))), "smb", 29 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (((in(proc, "plink.exe", "ssh.exe", "kitty.exe", "kitty_portable.exe", "putty.exe") or match(cmd_l, "\\s-ssh\\b")) and match(cmd_l, "\\s-[rld]\\s*\\S*:[0-9]")) or (in(proc, "chisel.exe", "ligolo.exe", "gost.exe", "frpc.exe", "frps.exe", "revsocks.exe", "iox.exe", "ngrok.exe", "bore.exe", "rathole.exe") and not(in(proc, "msiexec.exe", "trustedinstaller.exe")))), "tunnel", 30 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "(?:new-pssession|enter-pssession)\\b[\\s\\S]*-computername\\b|invoke-command\\b[\\s\\S]*-(?:computername|session)\\b")) or (proc == "winrs.exe" and match(cmd_l, "[-/]r(?:emote)?:"))), "winrm", 31 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "sc.exe" and match(cmd_l, "\\s(?:create|config)\\s[\\s\\S]*binpath=\\s*\"?[^\"]*(?:cmd|powershell|pwsh|mshta|rundll32|regsvr32|wscript|cscript)(?:\\.exe)?\\b")) or in(proc, "psexec.exe", "psexec64.exe", "paexec.exe", "psexesvc.exe", "csexec.exe", "remcom.exe") or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "new-service\\b[\\s\\S]*-binarypathname\\s+['\"]?[^'\"]*(?:cmd|powershell|pwsh|mshta|rundll32|regsvr32)(?:\\.exe)?\\b|psexe(?:c|c64)(?:\\.exe)?['\"]?\\s[^\\r\\n]*-accepteula"))), "psexec") 32| search isnotnull(grp) 33| eval tech = case(grp == "spearphish", "T1566.002", grp == "rdp_xdotool", "T1021.001", grp == "webshell", "T1071.001", grp == "lx_exfil", "T1041", grp == "base64", "T1140", grp == "lx_dl", "T1105", grp == "lx_tmpdrop", "T1105", grp == "lx_oneliner", "T1059.004", grp == "lx_disc", "T1082", grp == "gpo_abuse", "T1484.001", grp == "netsniff", "T1040", grp == "sshkey", "T1552.004", grp == "credmgr", "T1555.004", grp == "mimikatz", "T1003.001", grp == "lsass", "T1003.001", grp == "smb", "T1021.002", grp == "tunnel", "T1572", grp == "winrm", "T1021.006", grp == "psexec", "T1569.002") 34| eval anchor_g = if(in(grp, "spearphish", "rdp_xdotool", "webshell"), grp, null), disc2_g = if(in(grp, "gpo_abuse", "netsniff"), grp, null) 35| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, dc(disc2_g) as disc2_cnt, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 36| search (anchor_cnt >= 1 and grp_cnt >= 4) or (disc2_cnt >= 1 and grp_cnt >= 4) 37| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 38 first_seen = string(first_seen, "yyyy-MM-dd HH:mm:ss"), last_seen = string(last_seen, "yyyy-MM-dd HH:mm:ss")

10분마다 직전 30분의 지니언 EDR 프로세스·파일 로그를 조회하여, 각 이벤트를 조건에 따라 행위군(grp)으로 분류하고 해당하는 MITRE 기법 번호(tech)를 붙입니다. 이후 hostname·host_ip별로 서로 다른 행위군 수(grp_cnt)와 필수 행위군 수(anchor_cnt)를 집계합니다. mutt 무기화 문서 스피어피싱 발송·xdotool RDP 창 키 주입·curl 웹셸 명령 전달 중 1개 이상이 있거나(필수 행위군), 악성 GPO 도메인 배포·네트워크 스니핑 중 1개 이상이 있고(disc2_cnt), 두 경우 모두 서로 다른 행위군이 4개 이상이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

Threat analysis

내부 리눅스 호스트에서 무기화 문서를 메일로 발송하고 xdotool로 RDP 창에 키를 주입하는 것은 이미 침해된 호스트가 다음 침투의 발판으로 쓰이고 있음을 의미합니다. 악성 GPO는 도메인의 모든 단말에 악성 파일을 예약 작업으로 배포할 수 있어 피해 범위가 도메인 전체로 넓어지며, 네트워크 스니핑은 평문 자격 증명을 수집하는 행위입니다.

False positives

테스트 자동화 환경에서 xdotool로 원격 데스크톱 창을 조작하거나, 네트워크 담당자가 tcpdump로 패킷을 수집하는 경우 탐지될 수 있습니다. 자동화 서버와 네트워크 점검 호스트는 hostname 기준으로 예외 조건을 추가하여 조정합니다.

Response actions

발송된 메일의 수신자와 첨부 문서를 확인하여 수신자 단말을 조사하고, 웹셸 명령 전달 대상 서버의 웹 루트를 점검합니다. GPO 변경이 있었다면 도메인 컨트롤러에서 최근 생성·수정된 GPO와 연결된 예약 작업을 확인하여 제거합니다. 정탐으로 확인되면 호스트를 격리하고 스니핑 구간에 평문으로 전송된 계정의 암호를 변경합니다.

No comments yet.