Genian EDR

Download 0
Last updated Nov 17, 2026

지니언 EDR - 문서 위장 LNK 실행·AES 파일 암호화·S3 업로드 복합 행위 - APT43 첨부파일 침투·정보 유출 의심

지니언 EDR 로그에서 문서 위장 LNK 실행, PowerShell AES 파일 암호화, S3 업로드가 한 단말에서 이어지는 APT43형 첨부파일 침투·정보 유출을 탐지합니다.

Overview

Priority High
Type Batch
Schedule Every month/Every day/Every hour/Every 10 mins */10 * * * *
Message 지니언 EDR - APT43 첨부파일·클라우드 유출형 복합 행위: $host_ip
Output field order hostname, host_ip, grp_cnt, anchor_cnt, groups, techs, first_seen, last_seen
MITRE Techniques T1566.001· T1027.013· T1567.002· T1560· T1074.001· T1059.001· T1071.001· T1053.005· T1105· T1070.004
MITRE tactics TA0001 Initial Access· TA0002 Execution· TA0003 Persistence· TA0005 Defense Evasion· TA0009 Collection· 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, "FileCopy", "FileCreate")) 3 or (_schema == "genian-edr-network" and event_subtype == "NetworkConnect") 4 or (_schema == "genian-edr-process" and event_subtype == "ProcessStart") 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 grp = case( 14 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "cmd.exe", "powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe", "rundll32.exe") and match(ps_text, "\\.(?:hwpx?|docx?|xlsx?|pptx?|pdf|txt|rtf|jpe?g|png|html?)\\.lnk\\b|readallbytes\\([^)]*\\.lnk|\\.lnk['\"]?\\s*;[\\s\\S]{0,120}readallbytes|(?:gi|get-item|get-childitem|gci)\\b[^\\r\\n]*\\.lnk[\\s\\S]{0,200}(?:iex|invoke-expression)\\b")), "lnk", 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "aesmanaged|rijndaelmanaged|aescryptoserviceprovider|\\[(?:system\\.)?security\\.cryptography\\.aes\\]::create") and match(ps_text, "createencryptor") and match(ps_text, "writeallbytes|set-content|out-file|\\[io\\.file\\]::write")), "aesenc", 16 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((proc == "curl.exe" and match(cmd_l, "aws4-hmac-sha256|x-amz-") and match(cmd_l, "-x\\s+put\\b|(?:^|\\s)(?:-t|--upload-file)\\s|--data-binary\\s+['\"]?@")) or (in(proc, "powershell.exe", "pwsh.exe") and match(ps_text, "aws4-hmac-sha256") and match(ps_text, "['\"`]?put[`\\\\]?n|-x\\s+put\\b|-method\\s+['\"]?put\\b|--data-binary\\s+['\"]?@|write-s3object|putobject")) or (in(proc, "aws.exe", "mc.exe", "gsutil.exe", "azcopy.exe") and match(cmd_l, "\\s(?:s3\\s+(?:cp|sync|mv)|cp|copy|mirror|sync)\\s[^\\r\\n]*(?:s3://|gs://|https://[^\\s]*\\.blob\\.core\\.windows\\.net|\\s[a-z0-9_-]+/)"))), "cloudexf", 17 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and ((in(proc, "powershell.exe", "pwsh.exe") and (match(ps_text, "(?:compress|expand)-archive\\b[^\\r\\n]*(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\windows\\\\temp|c:\\\\programdata\\\\[^\\\\\"]+\\.zip)") or (match(ps_text, "compress-archive\\b") and match(ps_text, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\windows\\\\temp|c:\\\\programdata)\\\\[^\\\\\"]+\\.zip")))) or (in(proc, "7z.exe", "7za.exe", "7zr.exe", "rar.exe", "winrar.exe", "tar.exe", "makecab.exe") and match(cmd_l, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\") and not(par == "tiworker.exe"))), "expand", 18 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileCopy") and (in(proc, "cmd.exe", "powershell.exe", "pwsh.exe", "robocopy.exe", "xcopy.exe") and match(fpath, "\\.(?:docx?|xlsx?|pptx?|pdf|hwpx?|csv|zip|rar|7z)$") and match(f_dir, "\\\\appdata\\\\local\\\\temp\\\\[^\\\\]+$|^c:\\\\users\\\\public\\\\|^c:\\\\programdata\\\\[^\\\\]+$|^c:\\\\windows\\\\temp\\\\[^\\\\]+$")), "staging", 19 _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", 20 _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", 21 _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", 22 _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", 23 _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") 24| search isnotnull(grp) 25| eval tech = case(grp == "lnk", "T1566.001", grp == "aesenc", "T1027.013", grp == "cloudexf", "T1567.002", grp == "expand", "T1560", grp == "staging", "T1074.001", grp == "psbypass", "T1059.001", grp == "webc2", "T1071.001", grp == "schtask", "T1053.005", grp == "drop", "T1105", grp == "wipe", "T1070.004") 26| eval anchor_g = if(in(grp, "lnk", "aesenc", "cloudexf"), grp, null) 27| 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 28| search anchor_cnt >= 2 and grp_cnt >= 4 29| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 30 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)를 집계합니다. 문서 위장 이중 확장자 LNK 실행·PowerShell AES 파일 암호화·S3 서명 PUT 업로드 또는 클라우드 저장소 복사 중 2개 이상이 있고(필수 행위군), 서로 다른 행위군이 4개 이상이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

Threat analysis

.hwp.lnk처럼 문서로 위장한 바로 가기는 스피어피싱 첨부파일의 대표적인 형태이며, 실행되면 LNK에 숨긴 PowerShell이 동작합니다. 수집한 파일을 AES로 암호화한 뒤 S3 서명을 직접 계산해 PUT으로 올리는 것은 유출 내용을 감추면서 클라우드 저장소로 내보내는 행위입니다. 암호화와 업로드가 함께 관찰되면 정보가 이미 유출됐을 가능성이 높습니다.

False positives

업무 스크립트가 PowerShell로 파일을 암호화해 S3 호환 저장소에 백업하는 경우 필수 행위군 2개가 관찰될 수 있습니다. 확인된 백업 스크립트는 경로와 업로드 목적지 기준으로 예외 조건을 추가하여 조정합니다.

Response actions

LNK 파일과 원본 압축 파일을 확보하여 유입 메일을 추적하고, 같은 메일의 수신자를 확인합니다. 업로드 목적지와 암호화된 파일의 원본을 확인하여 유출 범위를 판단합니다. 정탐으로 확인되면 단말을 격리하고 목적지 주소를 차단하며, 단말에 저장된 계정의 암호를 변경합니다.

No comments yet.