지니안 EDR

다운로드 0
업데이트 2026. 11. 17.

지니언 EDR - DLL 사이드로딩·로컬 계정 생성·SYSTEM 예약 작업·레지스트리 하이브 저장 복합 행위 - 이란 연계 랜섬웨어 지원 침투 의심

지니언 EDR 로그에서 DLL 사이드로딩, 로컬 계정 생성, SYSTEM 예약 작업, 레지스트리 하이브 저장이 한 단말에서 이어지는 랜섬웨어 지원형 침투를 탐지합니다.

개요

중요도 상
유형 배치 탐지
실행 주기 매달/매일/매시/10분간격 */10 * * * *
메시지 지니언 EDR - 이란 연계 침투형 복합 행위: $host_ip
출력 필드 순서 hostname, host_ip, grp_cnt, anchor_cnt, groups, techs, first_seen, last_seen
MITRE 기술 T1574.001· T1136.001· T1053.005· T1003· T1016· T1105· T1204· T1071.001· T1070.004· T1059.001
MITRE 전술 TA0002 Execution· TA0003 Persistence· TA0005 Defense Evasion· TA0006 Credential Access· TA0007 Discovery· TA0011 Command and Control
출처 사용자 제안 letsgo

쿼리

1table duration=30m EDR_GENIAN 2| search (_schema == "genian-edr-file" and event_subtype == "FileCreate") 3 or (_schema == "genian-edr-module" and event_subtype == "ModuleLoad") 4 or (_schema == "genian-edr-network" and event_subtype == "NetworkConnect") 5 or (_schema == "genian-edr-process" and event_subtype == "ProcessStart") 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 grp = case( 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "\\b(?:copy-item|copy|cpi|cp|move-item|move|mi|mv)\\s+(?:-path\\s+)?['\"]?(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^'\"\\s]*\\.dll['\"]?\\s+(?:-destination\\s+)?['\"]?(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^'\"\\s]*\\.dll\\b")), "sideload", 16 _schema == "genian-edr-module" and event_subtype == "ModuleLoad" and (f_dir == i_dir and match(fpath, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\") and match(fpath, "\\.dll$") and not(match(fpath, "\\\\(?:python[0-9]*|msys-[^\\\\]+|cyg[^\\\\]+|lib[^\\\\]+|zlib[^\\\\]*|vcruntime[^\\\\]*|msvc[pr][^\\\\]*|ucrtbase|api-ms-win-[^\\\\]+|concrt[^\\\\]*|qt[0-9][^\\\\]*)\\.dll$"))), "sideload", 17 _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"))), "newuser", 18 _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", 19 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "lazagne.exe", "secretsdump.exe", "pwdump.exe", "fgdump.exe", "gsecdump.exe", "wce.exe") or match(cmd_l, "\\blazagne(?:\\.exe|\\.py)?\"?\\s+(?:all|browsers|windows|sysadmin|wifi|mails|chats|databases|memory)\\b") or (proc == "reg.exe" and match(cmd_l, "\\b(?:save|export)\\s+\"?(?:hklm|hkey_local_machine)\\\\(?:sam|security|system)\"?\\s")) or (proc == "ntdsutil.exe" and match(cmd_l, "\\bifm\\b|ac(?:tivate)?\\s+i(?:nstance)?\\s+ntds"))), "credump", 20 _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", 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-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", 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") 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| search isnotnull(grp) 27| eval tech = case(grp == "sideload", "T1574.001/T1574.001", grp == "newuser", "T1136.001", grp == "schtask", "T1053.005", grp == "credump", "T1003", grp == "netconf", "T1016", grp == "drop", "T1105", grp == "exec", "T1204", grp == "webc2", "T1071.001", grp == "wipe", "T1070.004", grp == "psbypass", "T1059.001") 28| eval anchor_g = if(in(grp, "sideload", "newuser", "schtask", "credump"), grp, null) 29| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 30| search anchor_cnt >= 3 and grp_cnt >= 6 31| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 32 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)를 집계합니다. DLL 사이드로딩·로컬 계정 생성·사용자 쓰기 위치 또는 SYSTEM 예약 작업 등록·레지스트리 하이브(SAM·SYSTEM·SECURITY) 저장 중 3개 이상이 있고(필수 행위군), 서로 다른 행위군이 6개 이상이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

위협 분석

침투 후 관리자 계정을 만들고 SYSTEM 예약 작업으로 지속성을 확보한 뒤 레지스트리 하이브를 저장하는 것은 접근 권한을 유지하고 로컬 계정 해시를 추출하는 흐름입니다. 이렇게 확보한 접근 권한은 랜섬웨어 조직에 전달되어 암호화 공격에 쓰일 수 있으므로, 랜섬웨어 행위가 보이지 않아도 침투 단계에서 대응해야 합니다.

오탐 유형

시스템 관리자가 계정을 만들고 예약 작업을 등록하며 백업 목적으로 레지스트리 하이브를 저장하는 경우 필수 행위군이 관찰될 수 있습니다. 관리 작업이 잦은 단말은 hostname과 실행 계정 기준으로 예외 조건을 추가하여 조정합니다.

대응 방안

생성된 계정과 예약 작업, 저장된 하이브 파일의 경로를 확인하고 하이브 파일이 외부로 전송됐는지 조회합니다. 사이드로딩에 쓰인 실행 파일과 DLL을 확보합니다. 정탐으로 확인되면 계정과 예약 작업을 삭제하고 단말을 격리하며, 로컬 관리자 계정의 암호를 변경합니다.

아직 댓글이 없습니다.