Genian EDR

Download 0
Last updated Nov 17, 2026

지니언 EDR - DLL 주입·도메인 그룹 조회·임시 Python 실행·인터넷 연결 확인 복합 행위 - Gallium 통신사 침투 정찰 의심

지니언 EDR 로그에서 DLL 주입, 도메인 그룹 조회, 임시 경로 Python 실행, 인터넷 연결 확인이 광범위한 정찰과 함께 한 단말에서 나타나는 Gallium형 침투 정찰을 탐지합니다.

Overview

Priority High
Type Batch
Schedule Every month/Every day/Every hour/Every 10 mins */10 * * * *
Message 지니언 EDR - Gallium 정찰·주입형 복합 행위: $host_ip
Output field order hostname, host_ip, grp_cnt, anchor_cnt, disc_cnt, groups, techs, first_seen, last_seen
MITRE Techniques T1055.001· T1069.002· T1059.006· T1016.001· T1033· T1087· T1016· T1049· T1082· T1057· T1105· T1204· T1059.001· T1003.001· T1070.004
MITRE tactics TA0002 Execution· TA0005 Defense Evasion· TA0006 Credential Access· TA0007 Discovery· TA0011 Command and Control
Origin User proposal letsgo

Query

1table duration=30m EDR_GENIAN 2| search (_schema == "genian-edr-file" and event_subtype == "FileCreate") 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, "\\.exe$") and match(ipath, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\") and match(cmd_l, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^\"\\s]*\\.dll\\b")), "inject", 14 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (((proc == "net.exe" or (proc == "net1.exe" and par != "net.exe")) and match(cmd_l, "\\s(?:group|groups|user|users)\\b[^/]*\\s/do(?:m|ma|mai|main)?\\b") and not(match(cmd_l, "/(?:add|del|delete)\\b"))) or (proc == "dsquery.exe" and match(cmd_l, "dsquery(?:\\.exe)?\"?\\s+group\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "get-adgroup(?:member)?\\b|get-domaingroup\\b|\\bnet(?:\\.exe)?\\s+(?:user|users|group|groups)\\b[^\\r\\n|;]*\\s/do(?:m|ma|mai|main)?\\b"))), "domgroup", 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "python.exe", "pythonw.exe", "python3.exe", "py.exe") and (match(ipath, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\") or match(cmd_l, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^\"\\s]*\\.pyw?\\b") or match(cmd_l, "\\s-c\\s[\\s\\S]*(?:urllib|urlopen|requests\\.get|socket\\.|base64\\.b64decode|exec\\(|subprocess)"))), "python", 16 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "ping.exe", "tracert.exe", "pathping.exe") and match(cmd_l, "(?:^|\\s)(?:8\\.8\\.8\\.8|8\\.8\\.4\\.4|1\\.1\\.1\\.1|1\\.0\\.0\\.1|9\\.9\\.9\\.9|208\\.67\\.22[02]\\.22[02]|4\\.2\\.2\\.[12])(?:\\s|$)")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "(?:test-netconnection|test-connection|\\btnc\\b)[^\\r\\n]*(?:8\\.8\\.8\\.8|8\\.8\\.4\\.4|1\\.1\\.1\\.1|1\\.0\\.0\\.1|9\\.9\\.9\\.9|google\\.com)")) or (in(proc, "curl.exe", "wget.exe", "powershell.exe", "pwsh.exe", "nslookup.exe") and match(ps_text, "ipinfo\\.io|ifconfig\\.(?:me|co)|api\\.ipify\\.org|icanhazip\\.com|checkip\\.(?:amazonaws\\.com|dyndns\\.org)|ipecho\\.net|myexternalip\\.com|wtfismyip\\.com|ip-api\\.com"))), "inet", 17 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "whoami.exe", "quser.exe") or (proc == "query.exe" and match(cmd_l, "\\bquery(?:\\.exe)?\"?\\s+(?:user|session)\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "windowsidentity\\]::getcurrent\\(\\)[\\s\\S]*isinrole|isinrole\\([\\s\\S]*administrator")) or (in(proc, "wmic.exe", "powershell.exe", "pwsh.exe") and match(ps_text, "\\b(?:win32_logonsession|win32_loggedonuser)\\b"))), "user", 18 _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+(?:user|users|accounts)\\b") and not(match(cmd_l, "/(?:add|del|delete|do|dom|doma|domai|domain)\\b"))) or (proc == "wmic.exe" and match(cmd_l, "\\buseraccount\\b[\\s\\S]*\\b(?:get|list)\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "get-localuser\\b|get-aduser\\b|win32_useraccount\\b"))), "acct", 19 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "ipconfig.exe", "nbtstat.exe", "getmac.exe") or (proc == "route.exe" and match(cmd_l, "\\bprint\\b")) or (proc == "arp.exe" and match(cmd_l, "\\s-[ag]\\b")) or (proc == "netsh.exe" and match(cmd_l, "\\b(?:interface\\s+(?:ip|ipv4)?\\s*show|wlan\\s+show|(?:advfirewall\\s+(?:firewall\\s+)?|firewall\\s+)show|ip\\s+show\\s+config)\\b")) or (proc == "wmic.exe" and match(cmd_l, "\\b(?:nicconfig|nic|win32_networkadapterconfiguration|win32_ip4routetable)\\b[\\s\\S]*\\b(?:get|list)\\b")) or (proc == "nltest.exe" and match(cmd_l, "[/-]dsgetdc\\b"))), "netconf", 20 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (proc == "netstat.exe" or ((proc == "net.exe" or (proc == "net1.exe" and par != "net.exe")) and match(cmd_l, "\\bnet1?(?:\\.exe)?\"?\\s+(?:session|sessions|use)\\s*$")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "get-nettcpconnection\\b|get-netudpendpoint\\b|get-smbsession\\b"))), "netconn", 21 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "systeminfo.exe", "hostname.exe") or (proc == "wmic.exe" and match(cmd_l, "\\b(?:os|computersystem|bios|qfe|csproduct|path\\s+win32_(?:operatingsystem|bios|baseboard|computersystemproduct))\\b[\\s\\S]*\\b(?:get|list)\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "getnativesysteminfo|getsysteminfo\\b|get-computerinfo|win32_operatingsystem|\\.partofdomain\\b|dllimport[\\s\\S]*\\b(?:getlogicaldrivestringsw?|getdrivetypew?|getlogicaldrives)\\b"))), "sysinfo", 22 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "tasklist.exe", "qprocess.exe") and not(contains(cmd_line, "/?"))) or (proc == "query.exe" and match(cmd_l, "\\bquery(?:\\.exe)?\"?\\s+process\\b")) or (proc == "wmic.exe" and match(cmd_l, "\\bprocess\\b[\\s\\S]*\\b(?:get|list)\\b") and not(match(cmd_l, "\\bcall\\b"))) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "get-process|\\bgps\\b") and match(ps_text, "(?:msmpeng|mssense|sentinelagent|csfalconservice|cylancesvc|mcshield|bdservicehost|savservice|sophos|ekrn|avp\\.exe|ntrtscan|tmbmsrv|cbdefense|repmgr|xagt|elastic-endpoint|vsserv|ccsvchst|avastsvc|v3svc|ayagent)[\\s\\S]*(?:msmpeng|mssense|sentinelagent|csfalconservice|cylancesvc|mcshield|bdservicehost|savservice|sophos|ekrn|avp\\.exe|ntrtscan|tmbmsrv|cbdefense|repmgr|xagt|elastic-endpoint|vsserv|ccsvchst|avastsvc|v3svc|ayagent)"))), "proclist", 23 _schema == "genian-edr-file" and event_subtype == "FileCreate" and ((match(fpath, "\\.(?:exe|dll|sys|scr|cpl|bat|cmd|ps1|vbs|vbe|js|jse|wsf|hta)$") or (nvl(file_type, "") == "PE" and not(match(fpath, "\\.[a-z0-9]{2,4}$")))) and (indexof(fpath, "c:\\users\\public\\") == 0 or indexof(fpath, "c:\\perflogs\\") == 0 or in(f_dir, "c:\\programdata", "c:\\windows\\temp")) and not(match(fpath, "\\\\__psscriptpolicytest_[^\\\\]+\\.ps1$")) and not(in(proc, "msiexec.exe", "trustedinstaller.exe", "tiworker.exe", "mpsigstub.exe", "mpcmdrun.exe", "msmpeng.exe", "dismhost.exe", "system"))), "drop", 24 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "\\.(?:exe|scr|com|pif)$") and (indexof(ipath, "c:\\users\\public\\") == 0 or indexof(ipath, "c:\\perflogs\\") == 0 or in(i_dir, "c:\\programdata", "c:\\windows\\temp"))), "exec", 25 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe") and match(cmd_line, "(?i)(?:^|\\s)\"?-(?:ep|ex|exe|exec|execu|execut|executi|executio|execution|executionp|executionpo|executionpol|executionpoli|executionpolic|executionpolicy)\"?\\s+\"?bypass\"?(?:\\s|$)") and (isnotnull(b64) or match(cmd_l, "(?:^|\\s)\"?-(?:f|fi|fil|file)\"?\\s+\"?(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\windows\\\\temp|c:\\\\programdata|c:\\\\users\\\\[^\\\\]+\\\\appdata\\\\local\\\\temp)\\\\"))), "psbypass", 26 _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", 27 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "remove-item|\\bdel\\b|\\bri\\b|\\brm\\b") and match(ps_text, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\windows\\\\temp|c:\\\\programdata)\\\\[^\\r\\n\"']*\\.(?:exe|dll|sys|ps1|bat|cmd|vbs|js|jse|hta|cs|bin|zip|7z|rar)\\b")) or (proc == "cmd.exe" and match(cmd_l, "\\b(?:del|erase)\\b[^&|]*(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\windows\\\\temp|c:\\\\programdata|%temp%|\\\\appdata\\\\local\\\\temp)\\\\[^&|\"]*\\.(?:exe|dll|sys|ps1|bat|cmd|vbs|js|jse|hta|bin)\\b")) or in(proc, "sdelete.exe", "sdelete64.exe")), "wipe") 28| search isnotnull(grp) 29| eval tech = case(grp == "inject", "T1055.001", grp == "domgroup", "T1069.002", grp == "python", "T1059.006", grp == "inet", "T1016.001", grp == "user", "T1033", grp == "acct", "T1087", grp == "netconf", "T1016", grp == "netconn", "T1049", grp == "sysinfo", "T1082", grp == "proclist", "T1057", grp == "drop", "T1105", grp == "exec", "T1204", grp == "psbypass", "T1059.001", grp == "lsass", "T1003.001", grp == "wipe", "T1070.004") 30| eval anchor_g = if(in(grp, "inject", "domgroup", "python", "inet"), grp, null), disc_g = if(in(grp, "user", "acct", "netconf", "netconn", "sysinfo", "proclist"), grp, null) 31| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, dc(disc_g) as disc_cnt, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 32| search ((anchor_cnt >= 4 and disc_cnt >= 4) or (anchor_cnt >= 3 and disc_cnt >= 6)) and grp_cnt >= 9 33| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 34 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)를 집계합니다. 필수 행위군 4종은 DLL 주입, 도메인 그룹과 계정 조회, 사용자 쓰기 위치의 Python 실행, 공용 DNS를 이용한 인터넷 연결 확인입니다. 서로 다른 행위군이 9개 이상이고 다음 두 조건 중 하나를 충족하면 탐지합니다. 첫째, 필수 행위군 4종이 모두 있고 정찰 행위군이 4개 이상(disc_cnt)인 경우입니다. 둘째, 필수 행위군 3종과 정찰 행위군 6개(사용자·계정·네트워크 설정·네트워크 연결·시스템 정보·프로세스)가 모두 있는 경우입니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

Threat analysis

통신사를 노리는 Gallium 계열 공격은 배치 스크립트로 사용자·도메인 그룹·네트워크 구성을 조사한 뒤 공용 폴더에 Python과 주입 도구를 반입해 반사형 DLL 로딩과 원격 스레드 주입을 시도합니다. 공용 DNS로 인터넷 연결을 확인하는 것은 C2 통신이 가능한지 점검하는 행위입니다. LSASS 덤프가 함께 관찰되면 자격 증명이 탈취됐을 수 있습니다.

False positives

개발자가 사용자 폴더에서 휴대용 Python을 실행하거나 네트워크 점검 스크립트가 공용 DNS에 연결 확인을 하는 경우 필수 행위군 일부가 관찰될 수 있습니다. 행위군 9개 이상이 요구되어 정상 업무로 탐지될 가능성은 낮으며, 반복 탐지 시 해당 스크립트 경로를 예외 조건으로 추가합니다.

Response actions

배치 스크립트와 Python 스크립트를 확보하고 주입 대상 프로세스를 확인합니다. 도메인 그룹 조회 결과가 외부로 전송됐는지 네트워크 로그에서 확인합니다. 정탐으로 확인되면 단말을 격리하고, LSASS 덤프가 있었다면 로그온 계정의 암호를 변경합니다.

No comments yet.