Genian EDR

Download 0
Last updated Nov 17, 2026

지니언 EDR - SSH 원격 접속·SYSTEM 예약 작업·파일 숨김 복합 행위 - Cactus 랜섬웨어 침투 준비 의심

지니언 EDR 로그에서 SYSTEM 예약 작업 등록, SSH 원격 접속, 파일 숨김이 정찰과 함께 한 단말에서 나타나는 Cactus 랜섬웨어 침투 준비를 탐지합니다.

Overview

Priority High
Type Batch
Schedule Every month/Every day/Every hour/Every 10 mins */10 * * * *
Message 지니언 EDR - Cactus 랜섬웨어형 복합 행위: $host_ip
Output field order hostname, host_ip, grp_cnt, anchor_cnt, disc_cnt, groups, techs, first_seen, last_seen
MITRE Techniques T1021.004· T1053.005· T1564.005· T1083· T1082· T1654· T1105· T1204· T1106· T1070.004· T1497· T1027· T1136.001· T1547.001· T1490· T1486· T1069.001
MITRE tactics TA0002 Execution· TA0003 Persistence· TA0005 Defense Evasion· TA0007 Discovery· TA0008 Lateral Movement· TA0011 Command and Control· TA0040 Impact
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 or (_schema == "genian-edr-reg" and event_subtype == "RegSetValue") 5| search len(trim(hostname)) > 0 6| eval psrc = if(len(trim(image_path)) > 0, trim(image_path), trim(image)) 7| eval proc = lower(substr(psrc, lastindexof(psrc, "\\") + 1)), ipath = lower(psrc), cmd_l = lower(nvl(cmd_line, "")), 8 i_dir = if(lastindexof(psrc, "\\") >= 0, lower(substr(psrc, 0, lastindexof(psrc, "\\"))), ""), 9 par = lower(nvl(substr(parent_image, lastindexof(parent_image, "\\") + 1), "")), hostname = lower(trim(hostname)) 10| 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) 11| 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) 12| eval fpath = lower(nvl(file_path, "")), f_dir = if(lastindexof(file_path, "\\") >= 0, lower(substr(file_path, 0, lastindexof(file_path, "\\"))), "") 13| eval rkey = lower(nvl(reg_key_path, "")), vname = lower(nvl(reg_value_name, "")), rval = lower(nvl(reg_value, "")) 14| eval grp = case( 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "plink.exe", "ssh.exe", "kitty.exe", "kitty_portable.exe") or match(cmd_l, "\\s-ssh\\s")) and match(cmd_l, "\\S+@\\S+|\\s-pw\\s")), "ssh", 16 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "schtasks.exe" and match(cmd_l, "[/-]create\\b") and match(cmd_l, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\|%(?:temp|tmp|appdata|public|programdata)%|/tr\\s+\"?[^/]*(?:powershell|pwsh|mshta|wscript|cscript|rundll32|regsvr32|cmd)(?:\\.exe)?\\b|/ru\\s+\"?(?:system|nt authority)")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "(?:^|[^a-z])register-scheduledtask") and match(ps_text, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\|-execute\\s+['\"]?[^'\"\\s]*(?:powershell|pwsh|mshta|wscript|cscript|rundll32|regsvr32|cmd)(?:\\.exe)?\\b|-user(?:id)?\\s+['\"]?(?:system|nt authority)"))), "schtask", 17 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "attrib.exe" and match(cmd_l, "(?:^|\\s)\\+[hs]\\b")) or (proc == "cmd.exe" and match(cmd_l, "\\b(?:mkdir|md)\\s+\"?c:\\\\windows\\\\temp\\\\[^\\\\\\s\"&]+") and match(cmd_l, "\\becho\\b[^&|]*>\\s*\"?c:\\\\windows\\\\temp\\\\"))), "hidden", 18 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "cmd.exe", "powershell.exe", "pwsh.exe", "where.exe", "tree.com", "wmic.exe") and match(ps_text, "\\b(?:cim_datafile|cim_directory|win32_directory)\\b[\\s\\S]*\\bget\\b|\\bdir\\b[^|&\\r\\n]*\\s/s\\b|\\btree(?:\\.com)?\\b[^|&\\r\\n]*\\s/f\\b|\\bwhere(?:\\.exe)?\\s+/r\\s|get-childitem[^|\\r\\n]*-recurse|\\bgci\\b[^|\\r\\n]*-recurse|dllimport[\\s\\S]*\\bfind(?:first|next)filew?\\b")), "filedisc", 19 _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", 20 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "wevtutil.exe" and par != "gsagent.exe" and match(cmd_l, "\\b(?:qe|query-events)\\b[\\s\\S]*(?:terminalservices-localsessionmanager|terminalservices-remoteconnectionmanager|\\bsecurity\\b)")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "(?:get-winevent|get-eventlog)\\b[\\s\\S]*(?:terminalservices-localsessionmanager|terminalservices-remoteconnectionmanager|-logname\\s+['\"]?security\\b)"))), "logenum", 21 _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", 22 _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", 23 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "add-type[\\s\\S]*dllimport|dllimport[\\s\\S]*add-type")), "nativeapi", 24 _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", 25 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe", "cmd.exe") and (match(ps_text, "\\b(?:copy|copy-item|cp|cpi|move|move-item|xcopy)\\s[^\\r\\n]*c:\\\\windows\\\\system32\\\\[\\s\\S]*(?:get-filehash|certutil[^\\r\\n]*-hashfile)") or match(ps_text, "\\b(?:copy|copy-item|cp|cpi|xcopy)\\s[^\\r\\n]*(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[\\s\\S]*(?:get-filehash|certutil[^\\r\\n]*-hashfile)[\\s\\S]*(?:get-filehash|certutil[^\\r\\n]*-hashfile)[\\s\\S]*-eq\\b"))), "evasioncheck", 26 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe") and isnotnull(b64) and (in(par, "powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "wmiprvse.exe", "rundll32.exe") or not(match(cmd_line, "(?i)-(?:ep|ex|exec|executionpolicy)\\s+\"?bypass")))), "encps", 27 _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\\s+\\S+[\\s\\S]*\\s/add\\b") and not(match(cmd_l, "/do(?:m|ma|mai|main)?\\b"))) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "new-localuser\\b|\\[adsi\\][\\s\\S]*winnt://[\\s\\S]*create\\(\\s*['\"]user"))), "localacct", 28 _schema == "genian-edr-reg" and event_subtype == "RegSetValue" and (match(rkey, "\\\\software\\\\(?:wow6432node\\\\)?microsoft\\\\windows\\\\currentversion\\\\(?:run|runonce|runonceex|runservices|runservicesonce|policies\\\\explorer\\\\run)$") and match(rval, "c:\\\\users\\\\public\\\\|c:\\\\perflogs\\\\|\\\\windows\\\\temp\\\\|\\\\appdata\\\\local\\\\temp\\\\|%temp%|%public%|https?://|(?:^|\\\\|\")(?:powershell|pwsh|mshta|wscript|cscript|rundll32|regsvr32)(?:\\.exe)?\"?\\s")), "runkey", 29 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "vssadmin.exe" and match(cmd_l, "\\bdelete\\s+shadows\\b|\\bresize\\s+shadowstorage\\b")) or (proc == "wmic.exe" and match(cmd_l, "shadowcopy[\\s\\S]*\\bdelete\\b")) or (proc == "bcdedit.exe" and match(cmd_l, "recoveryenabled\\s+no|bootstatuspolicy\\s+ignoreallfailures")) or (proc == "wbadmin.exe" and match(cmd_l, "\\bdelete\\s+(?:catalog|systemstatebackup|backup)\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "win32_shadowcopy[\\s\\S]*(?:\\.delete\\(\\)|remove-(?:cim|wmi)(?:instance|object))|remove-(?:cim|wmi)(?:instance|object)[\\s\\S]*win32_shadowcopy|vssadmin[^\\r\\n]*delete\\s+shadows"))), "shadow", 30 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove") and (match(fpath, "\\.(?:conti|vanhelsing|vanlocker|locked|lockbit|encrypted|crypted|ryk|babyk|akira|royal|basta|hive|clop|medusa|rhysida|8base|phobos|makop|djvu)$") or match(fpath, "\\\\(?:how[_-]?to[_-]?(?:decrypt|restore|recover)|restore[_-]?(?:my[_-]?)?files|decrypt[_-]?(?:my[_-]?)?files|readme[_-]?(?:for[_-]?)?decrypt|_readme_|ransom)[^\\\\]*\\.(?:txt|html?|hta)$")), "encrypt", 31 _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+localgroup\\b")) or (proc == "wmic.exe" and match(cmd_l, "\\bgroup\\b[\\s\\S]*\\b(?:get|list)\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "get-localgroup(?:member)?\\b|add-localgroupmember\\b|win32_group\\b"))), "localgroup") 32| search isnotnull(grp) 33| eval tech = case(grp == "ssh", "T1021.004", grp == "schtask", "T1053.005", grp == "hidden", "T1564.005", grp == "filedisc", "T1083", grp == "sysinfo", "T1082", grp == "logenum", "T1654", grp == "drop", "T1105", grp == "exec", "T1204", grp == "nativeapi", "T1106", grp == "wipe", "T1070.004", grp == "evasioncheck", "T1497", grp == "encps", "T1027", grp == "localacct", "T1136.001", grp == "runkey", "T1547.001", grp == "shadow", "T1490", grp == "encrypt", "T1486", grp == "localgroup", "T1069.001") 34| eval anchor_g = if(in(grp, "ssh", "schtask", "hidden"), grp, null), disc_g = if(in(grp, "filedisc", "sysinfo", "logenum"), grp, null) 35| 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 36| search anchor_cnt >= 2 and disc_cnt >= 2 and grp_cnt >= 6 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)를 집계합니다. SSH 원격 접속(plink 등)·SYSTEM 예약 작업 등록·파일 숨김 속성 지정 중 2개 이상이 있고(필수 행위군), 드라이브와 파일 탐색·시스템 정보·보안 로그 조회 정찰 행위군이 2개 이상(disc_cnt)이며, 서로 다른 행위군이 6개 이상이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

Threat analysis

Windows Temp에 plink를 내려받아 암호를 명령줄에 지정해 SSH로 접속하는 것은 외부와의 터널이나 원격 제어 경로를 만드는 행위입니다. SYSTEM 권한 예약 작업은 재부팅 후에도 실행을 유지하는 지속성 수단이고, 파일 숨김 속성 지정은 반입한 도구를 감추는 행위입니다. 보안 로그 조회와 드라이브 탐색이 이어지면 암호화 대상을 고르는 단계로 판단합니다.

False positives

운영 스크립트가 plink로 장비에 접속하거나 배포 도구가 SYSTEM 예약 작업을 등록하는 경우 필수 행위군이 관찰될 수 있습니다. 확인된 운영 스크립트는 실행 경로와 접속 대상 기준으로 예외 조건을 추가하여 조정합니다.

Response actions

SSH 접속 대상 주소와 명령줄에 노출된 계정을 확인하고, 해당 계정의 암호를 변경합니다. 등록된 예약 작업의 실행 대상과 숨김 처리된 파일을 확인합니다. 정탐으로 확인되면 예약 작업을 삭제하고 단말을 격리하며, 방화벽에서 SSH 접속 대상 주소를 차단합니다.

No comments yet.