Genian EDR

Download 0
Last updated Nov 17, 2026

지니언 EDR - 한 호스트에서 권한 상승·자격 증명 탈취와 지속성 등록·측면 이동이 연달아 일어나는 복합 행위(Windows·리눅스) - 침투 전 단계 연쇄(킬 체인) 의심

지니언 EDR의 Windows·리눅스 로그에서 한 호스트에 연달아 나타나는 권한 상승·자격 증명 탈취·지속성 등록·측면 이동의 연쇄 행위를 탐지합니다.

Overview

Priority High
Type Batch
Schedule Every month/Every day/Every hour/Every 10 mins */10 * * * *
Message 지니언 EDR - 킬 체인 전 단계형 복합 행위: $host_ip
Output field order hostname, host_ip, grp_cnt, anchor_cnt, disc_cnt, disc2_cnt, has_lx_acct, has_lx_authkey, has_lx_systemd, has_lx_cron, has_sshkey, has_lx_sshlat, groups, techs, first_seen, last_seen
MITRE Techniques T1548.002· T1134.001· T1555.004· T1003.001· T1003.002· T1550.002· T1543.003· T1053.005· T1547.001· T1136.001· T1552.004· T1021.004· T1021.001· T1047· T1021.006· T1021.002· T1098.004· T1543.002· T1053.003· T1548.001· T1068· T1059.004· T1070.004· T1003· T1572· T1082· T1087· T1057· T1016· T1105· T1204· T1071.001· T1059.001
MITRE tactics TA0002 Execution· TA0003 Persistence· TA0004 Privilege Escalation· TA0005 Defense Evasion· TA0006 Credential Access· TA0007 Discovery· TA0008 Lateral Movement· TA0011 Command and Control
Origin User proposal letsgo

Query

1table duration=30m EDR_GENIAN 2| search (_schema == "genian-edr-file" and in(event_subtype, "FileCopy", "FileCreate", "FileMove")) 3 or (_schema == "genian-edr-network" and event_subtype == "NetworkConnect") 4 or (_schema == "genian-edr-process" and in(event_subtype, "ProcessStart", "RequestProcessCreate")) 5 or (_schema == "genian-edr-reg" and event_subtype == "RegSetValue") 6| search len(trim(hostname)) > 0 7| eval psrc = if(len(trim(image_path)) > 0, trim(image_path), trim(image)) 8| eval proc = lower(substr(psrc, lastindexof(psrc, "\\") + 1)), ipath = lower(psrc), cmd_l = lower(nvl(cmd_line, "")), 9 i_dir = if(lastindexof(psrc, "\\") >= 0, lower(substr(psrc, 0, lastindexof(psrc, "\\"))), ""), 10 par = lower(nvl(substr(parent_image, lastindexof(parent_image, "\\") + 1), "")), hostname = lower(trim(hostname)) 11| 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) 12| 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) 13| eval fpath = lower(nvl(file_path, "")), f_dir = if(lastindexof(file_path, "\\") >= 0, lower(substr(file_path, 0, lastindexof(file_path, "\\"))), "") 14| eval rkey = lower(nvl(reg_key_path, "")), vname = lower(nvl(reg_value_name, "")), rval = lower(nvl(reg_value, "")) 15| eval grp = case( 16 _schema == "genian-edr-reg" and event_subtype == "RegSetValue" and (match(rkey, "(?:^hkey_users\\\\[^\\\\]+_classes|\\\\software\\\\classes)\\\\(?:ms-settings|mscfile|folder|exefile|launcher\\.systemsettings|appx[0-9a-z]{20,})\\\\shell\\\\open\\\\command$") and ((in(vname, "", "(default)") and len(trim(rval)) > 0) or vname == "delegateexecute") and not(in(proc, "explorer.exe", "systemsettings.exe", "svchost.exe")) and not(match(rval, "^\\{[0-9a-f-]{36}\\}$"))), "uacbypass", 17 _schema == "genian-edr-process" and event_subtype == "RequestProcessCreate" and ((in(proc, "python.exe", "pythonw.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe") or match(ipath, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\")) and match(cmd_l, "(?:^|\\\\|\")(?:cmd|powershell|pwsh)(?:\\.exe)?\"?\\s")), "token", 18 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "cmdkey.exe" and match(cmd_l, "/(?:add|generic)\\s*:") and match(cmd_l, "/pass(?:word)?(?:\\s*:|\\s|$)")) or (in(proc, "powershell.exe", "pwsh.exe", "cmd.exe") and match(ps_text, "cmdkey(?:\\.exe)?\"?\\s+/(?:add|generic)\\s*:[^\\r\\n]*/pass"))), "credstore", 19 _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", 20 _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", 21 _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", 22 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "reg.exe" and match(cmd_l, "\\\\b(?:save|export)\\\\b") and match(cmd_l, "hk(?:lm|ey_local_machine)\\\\\\\\(?:sam|system|security)\\\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "reg(?:\\.exe)?\\\\s+(?:save|export)\\\\b[\\\\s\\\\S]{0,40}(?:sam|system|security)\\\\b")) or (proc == "esentutl.exe" and match(cmd_l, "/y\\\\b") and match(cmd_l, "sam|system|security|ntds"))), "samdump", 23 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(cmd_l, "sekurlsa::pth\\b") or (match(cmd_l, "freerdp") and match(cmd_l, "\\s/pth:")) or match(cmd_l, "\\s-hashes\\s+\\S*:[0-9a-f]{32}\\b") or match(cmd_l, "\\bpth-(?:winexe|net|smbclient|wmic|rpcclient|curl)\\b") or (match(cmd_l, "\\b(?:crackmapexec|cme|nxc|netexec|evil-winrm)\\b") and match(cmd_l, "\\s-h\\s+\\S*[0-9a-f]{32}\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "invoke-(?:thehash|smbexec|wmiexec|smbclient|smbenum)\\b[\\s\\S]*-hash\\b"))), "pth", 24 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "sc.exe" and match(cmd_l, "\\bcreate\\b[\\s\\S]*binpath=\\s*\"?[^\"]*(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^\"]*\\.exe\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "new-service\\b[\\s\\S]*-binarypathname\\s+['\"]?[^'\"]*(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^'\"]*\\.exe\\b"))), "svcreg", 25 _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", 26 _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", 27 _schema == "genian-edr-reg" and event_subtype == "RegSetValue" and (match(rkey, "\\\\software\\\\(?:wow6432node\\\\)?microsoft\\\\windows\\\\currentversion\\\\runonceex\\\\[^\\\\]+\\\\depend$")), "runkey", 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+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", 29 _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", 30 _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", 31 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "wfreerdp.exe", "wfreerdp_win64.exe", "xfreerdp.exe", "sdl-freerdp.exe") or match(cmd_l, "freerdp[^\\s]*\\.exe\"?\\s+/v:") or (proc == "mstsc.exe" and match(cmd_l, "/v:")) or (proc == "cmdkey.exe" and match(cmd_l, "/(?:generic|add):\"?termsrv/"))), "rdp", 32 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "wmic.exe" and match(cmd_l, "\\bprocess\\b[\\s\\S]*\\bcall\\s+create\\b")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "invoke-(?:wmi|cim)method\\b[\\s\\S]*win32_process\\b[\\s\\S]*create|win32_process\\b[\\s\\S]*invoke-(?:wmi|cim)method\\b[\\s\\S]*create|\\[wmiclass\\][\\s\\S]*win32_process[\\s\\S]*\\.create\\("))), "wmiexec", 33 _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", 34 _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", 35 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and ((match(ipath, "/(?:useradd|adduser|newusers)$") and not(match(cmd_l, "--system\\b|\\s-r(?:\\s|$)|\\s(?:-s|--shell)\\s+\\S*/(?:nologin|false)\\b"))) or (match(ipath, "/usermod$") and match(cmd_l, "\\s-[a-z]*g\\s+\\S*\\b(?:sudo|wheel|root|adm)\\b")) or (match(ipath, "/gpasswd$") and match(cmd_l, "\\s-a\\s+\\S+\\s+(?:sudo|wheel|root|adm)\\b")))), "lx_acct", 36 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and not(match(ipath, "/sshd$")) and match(cmd_l, "authorized_keys") and ((match(ipath, "/(?:touch|sed|perl)$") and match(cmd_l, "^(?:touch\\s|sed\\s+-i|perl\\s+-[a-z]*i)[^\\n]*/\\.ssh/authorized_keys2?\\b")) or match(cmd_l, ">>?\\s*\\S*authorized_keys2?\\b|\\btee\\b[^\\n]*authorized_keys|\\b(?:cp|mv|install|ln|cat|dd)\\b[^\\n]*\\sauthorized_keys2?\\b|\\b(?:cp|mv|install|ln|dd)\\b[^\\n]*/authorized_keys2?\\b|ssh-copy-id"))), "lx_authkey", 37 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove") and (match(concat(fpath, " ", lower(nvl(file_path2, ""))), "/\\.ssh/authorized_keys2?(?:\\s|$)") and not(match(lower(psrc), "/sshd$|^/usr/bin/(?:dpkg|apt|apt-get|snap)$|^/usr/lib/snapd/|/cloud-init$"))), "lx_authkey", 38 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove") and (match(concat(fpath, " ", lower(nvl(file_path2, ""))), "(?:^|\\s)(?:/(?:etc|usr/lib|lib)/systemd/(?:system|user)/|/home/[^/\\s]+/\\.config/systemd/user/|/root/\\.config/systemd/user/)[^/\\s]+\\.(?:service|timer|socket|path)(?:\\s|$)") and not(match(lower(psrc), "^/usr/bin/(?:dpkg|apt|apt-get|rpm|yum|dnf|snap|systemctl|deb-systemd-helper)$|^/usr/lib/snapd/|^/(?:usr/)?lib/systemd/"))), "lx_systemd", 39 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and ((match(ipath, "/crontab$") and match(cmd_l, "\\bcrontab\\b[^\\n|]*\\s-\\s*(?:$|\\|)") and not(match(cmd_l, "\\s-l\\s*$"))) or (match(ipath, "/(?:tee|cp|mv|install|dd|ln)$") and match(cmd_l, "/(?:etc/cron(?:tab|\\.d|\\.hourly|\\.daily|\\.weekly|\\.monthly)?|var/spool/cron)(?:/|\\s|$)")) or match(cmd_l, ">>?\\s*/(?:etc/cron|var/spool/cron)"))), "lx_cron", 40 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and match(ipath, "/chmod$") and match(cmd_l, "\\s(?:[0-7]?[2467][0-7]{3}|[ugoa]*\\+[rwxt]*s[rwxt]*)\\s")), "lx_suid", 41 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(cmd_l, "(?<![a-z_.-])unshare\\s+(?:-\\S+\\s+)*(?:-[a-z]*[ur][a-z]*|--user|--map-root-user)(?:\\s|$)") or match(cmd_l, "unprivileged_userns_clone|/proc/self/(?:uid_map|gid_map|setgroups)|max_user_namespaces"))), "lx_userns", 42 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(cmd_l, "\\bxfrm\\s+state\\s+add\\b[^\\n]*(?:espinudp|espintcp|digest_null)") or match(cmd_l, "-j\\s+tee\\s+--gateway\\s+127\\.") or match(cmd_l, "\\bsu\\s+(?:-\\s+)?firefart\\b"))), "lx_lpe", 43 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(ipath, "/sshpass$") or (match(ipath, "/ssh$") and match(cmd_l, "stricthostkeychecking=no|userknownhostsfile=/dev/null") and match(cmd_l, "@(?:10\\.|192\\.168\\.|172\\.(?:1[6-9]|2[0-9]|3[01])\\.)")))), "lx_sshlat", 44 _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_revshell", 45 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and ((match(ipath, "/(?:rm|shred|unlink|truncate)$") and match(cmd_l, "\\s/(?:usr/)?s?bin/\\.[^/\\s]+|\\s/dev/shm/[^/\\s]+|\\.(?:bash|zsh)_history|/var/log/(?:auth\\.log|secure|wtmp|btmp|lastlog|syslog|messages|audit/)|^shred\\b|/shred\\s")) or match(cmd_l, "\\bhistory\\s+-c\\b|unset\\s+histfile|histfile=/dev/null") or (match(ipath, "/(?:cp|mv)$") and match(cmd_l, "\\.(?:bash|zsh)_history")))), "lx_wipe", 46 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileCopy", "FileMove") and (match(fpath, "\\\\[^\\\\]*(?:lazagne|pwdump\\d*|gsecdump|mimikatz|mimilib|mimidrv|mimispool|wce|fgdump|secretsdump|nanodump|dumpert|safetykatz|sharpkatz|pypykatz|quarkspwdump|cachedump|procdump(?:64)?|handlekatz|lsassy)[^\\\\]*\\.(?:exe|dll|sys|zip|7z|rar|ps1)$") and not(match(fpath, "^c:\\\\program files"))), "credtool", 47 _schema == "genian-edr-file" and event_subtype == "FileCreate" and (match(fpath, "\\\\(?:plink|chisel|ngrok|frpc|frps|ligolo[^\\\\]*|revsocks|gost|bore|rathole|iox)\\.exe$") and not(in(proc, "msiexec.exe", "trustedinstaller.exe", "tiworker.exe")) and not(match(fpath, "\\\\program files(?: \\(x86\\))?\\\\putty\\\\"))), "tunnelfile", 48 _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", 49 _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", 50 _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)"))), "procdisc", 51 _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", 52 _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", 53 _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", 54 _schema == "genian-edr-network" and event_subtype == "NetworkConnect" and (in(proc, "powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe") and isnotnull(remote_ip) and not(match(remote_ip, "^(?:10\\.|127\\.|192\\.168\\.|172\\.(?:1[6-9]|2\\d|3[01])\\.|169\\.254\\.|0\\.|::1|fe80)"))), "webc2", 55 _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") 56| search isnotnull(grp) 57| eval tech = case(grp == "uacbypass", "T1548.002", grp == "token", "T1134.001", grp == "credstore", "T1555.004", grp == "credmgr", "T1555.004", grp == "mimikatz", "T1003.001", grp == "lsass", "T1003.001", grp == "samdump", "T1003.002", grp == "pth", "T1550.002", grp == "svcreg", "T1543.003", grp == "schtask", "T1053.005", grp == "runkey", "T1547.001/T1547.001", grp == "localacct", "T1136.001", grp == "sshkey", "T1552.004", grp == "ssh", "T1021.004", grp == "rdp", "T1021.001", grp == "wmiexec", "T1047", grp == "winrm", "T1021.006", grp == "smb", "T1021.002", grp == "lx_acct", "T1136.001", grp == "lx_authkey", "T1098.004/T1098.004", grp == "lx_systemd", "T1543.002", grp == "lx_cron", "T1053.003", grp == "lx_suid", "T1548.001", grp == "lx_userns", "T1068", grp == "lx_lpe", "T1068", grp == "lx_sshlat", "T1021.004", grp == "lx_revshell", "T1059.004", grp == "lx_wipe", "T1070.004", grp == "credtool", "T1003", grp == "tunnelfile", "T1572", grp == "sysinfo", "T1082", grp == "acct", "T1087", grp == "procdisc", "T1057", grp == "netconf", "T1016", grp == "drop", "T1105", grp == "exec", "T1204", grp == "webc2", "T1071.001", grp == "psbypass", "T1059.001") 58| eval anchor_g = if(in(grp, "uacbypass", "token", "credstore", "credmgr", "mimikatz", "lsass", "samdump", "pth"), grp, null), disc_g = if(in(grp, "svcreg", "schtask", "runkey", "localacct"), grp, null), disc2_g = if(in(grp, "sshkey", "ssh", "rdp", "wmiexec", "winrm", "smb"), grp, null), has_lx_acct_v = if(grp == "lx_acct", 1, 0), has_lx_authkey_v = if(grp == "lx_authkey", 1, 0), has_lx_systemd_v = if(grp == "lx_systemd", 1, 0), has_lx_cron_v = if(grp == "lx_cron", 1, 0), has_sshkey_v = if(grp == "sshkey", 1, 0), has_lx_sshlat_v = if(grp == "lx_sshlat", 1, 0) 59| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, dc(disc_g) as disc_cnt, dc(disc2_g) as disc2_cnt, max(has_lx_acct_v) as has_lx_acct, max(has_lx_authkey_v) as has_lx_authkey, max(has_lx_systemd_v) as has_lx_systemd, max(has_lx_cron_v) as has_lx_cron, max(has_sshkey_v) as has_sshkey, max(has_lx_sshlat_v) as has_lx_sshlat, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 60| search (anchor_cnt >= 3 and disc_cnt >= 2 and disc2_cnt >= 1 and grp_cnt >= 8) or (has_lx_acct == 1 and has_lx_authkey == 1 and has_lx_systemd + has_lx_cron + has_lx_sshlat + has_sshkey >= 1) 61| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 62 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)를 집계합니다. Windows에서는 권한 상승·자격 증명 탈취 행위군이 3개 이상(anchor_cnt), 지속성 행위군이 2개 이상(disc_cnt), 측면 이동 행위군이 1개 이상(disc2_cnt)이고 서로 다른 행위군이 8개 이상이면 탐지합니다. 리눅스에서는 로컬 계정 생성과 authorized_keys 등록이 모두 있고 systemd 유닛 생성·cron 등록·SSH 측면 이동·SSH 개인 키 탈취 중 1개 이상이 있으면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

Threat analysis

권한 상승, 자격 증명 탈취, 지속성 확보, 측면 이동은 각각 따로 보면 관리 작업과 구분하기 어렵지만, 한 호스트에서 30분 안에 모두 나타나면 공격자가 그 호스트를 장악하고 다음 서버로 이동하는 중인 것으로 판단할 수 있습니다. 특정 공격 조직이나 도구 이름에 의존하지 않는 조건이므로 다른 침투 도구를 쓴 경우에도 적용됩니다.

False positives

서버 구축·이전 작업에서 계정 생성, 서비스·예약 작업 등록, 원격 접속이 함께 발생할 수 있습니다. Windows 조건은 자격 증명 탈취 행위가 요구되어 관리 작업만으로는 탐지 조건을 충족하기 어렵고, 리눅스 조건은 계정 생성과 키 등록을 수행하는 구성 관리 도구에서 탐지될 수 있으므로 실행 주체 기준으로 예외 조건을 추가합니다.

Response actions

groups에서 단계별로 관찰된 행위를 확인하고, 탈취 대상 자격 증명과 등록된 지속성 항목(서비스·예약 작업·Run 키·계정·authorized_keys·systemd·cron)을 식별합니다. 측면 이동의 대상 호스트를 확인하여 같은 탐지가 있는지 조회합니다. 정탐으로 확인되면 출발지와 대상 호스트를 격리하고 지속성 항목을 제거하며, 노출된 계정의 암호와 키를 교체합니다.

No comments yet.