지니안 EDR

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

지니언 EDR - 랜섬웨어 샘플 반복 반입·Temp 작업 폴더 복제·백신 격리 복합 행위 - 다종 랜섬웨어 유입 의심

지니언 EDR 로그에서 Windows Temp 작업 폴더를 반복 생성하며 실행 파일을 내려받아 복제하고 백신이 이를 잇달아 격리하는 다종 랜섬웨어 유입을 탐지합니다.

개요

중요도 상
유형 배치 탐지
실행 주기 매달/매일/매시/10분간격 */10 * * * *
메시지 지니언 EDR - 다종 랜섬웨어 유입형 복합 행위: $host_ip
출력 필드 순서 hostname, host_ip, grp_cnt, anchor_cnt, stage_cmds, quar_files, groups, techs, first_seen, last_seen
MITRE 기술 T1074.001· T1587.001· T1059.006· T1105· T1059.001· T1204· T1071.001· T1070.004
MITRE 전술 TA0042 Resource Development· TA0002 Execution· TA0005 Defense Evasion· TA0009 Collection· TA0011 Command and Control
출처 사용자 제안 letsgo

쿼리

1table duration=30m EDR_GENIAN 2| search (_schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileDelete")) 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 (proc == "cmd.exe" and (match(cmd_l, "^\"?cmd(?:\\.exe)?\"?\\s+/c\\s+(?:mkdir|md)\\s+\"?c:\\\\windows\\\\temp\\\\[^\\\\\\s\"&|]+\"?\\s*$") or match(cmd_l, "\\b(?:copy|move|xcopy)\\s+(?:/[a-z]\\s+)*\"?(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^\"\\s&|]*\\.(?:exe|dll|scr)\"?\\s+\"?(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\[^\"\\s&|]*\\.(?:exe|dll|scr)\\b"))), "tempstage", 15 _schema == "genian-edr-file" and event_subtype == "FileDelete" and (match(proc, "^(?:msmpeng|mssense|sentinelagent|csfalconservice|cylancesvc|mcshield|bdservicehost|savservice|sophos|ekrn|avp\\.exe|ntrtscan|tmbmsrv|cbdefense|repmgr|xagt|elastic-endpoint|vsserv|ccsvchst|avastsvc|v3svc|ayagent)") and match(fpath, "(?:c:\\\\users\\\\public|c:\\\\perflogs|c:\\\\programdata|c:\\\\windows\\\\temp|\\\\appdata\\\\local\\\\temp|\\\\appdata\\\\roaming|\\\\downloads)\\\\") and match(fpath, "\\.(?:exe|dll|scr|com|pif|cpl|sys|swf|jar|js|jse|vbs|vbe|wsf|hta|ps1|bat|cmd|lnk|docm|xlsm|zip|rar|7z|iso|img|txt)$") and not(match(fpath, "^c:\\\\programdata\\\\microsoft\\\\"))), "avquar", 16 _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", 17 _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", 18 _schema == "genian-edr-file" and event_subtype == "FileCreate" and (match(fpath, "\\.(?:zip|7z|rar)$") and (indexof(fpath, "c:\\users\\public\\") == 0 or indexof(fpath, "c:\\perflogs\\") == 0 or in(f_dir, "c:\\programdata", "c:\\windows\\temp")) and not(in(proc, "msiexec.exe", "trustedinstaller.exe", "tiworker.exe", "mpsigstub.exe", "mpcmdrun.exe", "msmpeng.exe", "dismhost.exe", "system", "svchost.exe"))), "archdrop", 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-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", 21 _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", 22 _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") 23| search isnotnull(grp) 24| eval tech = case(grp == "tempstage", "T1074.001", grp == "avquar", "T1587.001", grp == "python", "T1059.006", grp == "drop", "T1105", grp == "archdrop", "T1105", grp == "psbypass", "T1059.001", grp == "exec", "T1204", grp == "webc2", "T1071.001", grp == "wipe", "T1070.004") 25| eval anchor_g = if(in(grp, "tempstage", "avquar", "python"), grp, null), stage_cmds_v = if(grp == "tempstage", cmd_l, null), quar_files_v = if(grp == "avquar", fpath, null) 26| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, dc(stage_cmds_v) as stage_cmds, dc(quar_files_v) as quar_files, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 27| search anchor_cnt >= 3 and stage_cmds >= 4 and quar_files >= 4 28| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 29 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 Temp 작업 폴더 생성·실행 파일 복제, 백신 격리 삭제, 사용자 쓰기 위치 Python 실행이 모두 있고(필수 행위군 3개), 서로 다른 작업 폴더 생성·복제 명령이 4개 이상(stage_cmds)이며 백신이 격리한 서로 다른 파일이 4개 이상(quar_files)이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

위협 분석

공용 폴더의 Python으로 실행 파일을 반복해서 내려받고 임의 이름 작업 폴더에 복제하는 것은 여러 랜섬웨어 샘플을 차례로 시험하는 자동화된 유입 형태입니다. 백신이 격리하는 동안에도 유입이 계속되므로 한 종이라도 탐지를 피하면 암호화로 이어질 수 있습니다.

오탐 유형

보안 제품 성능 시험이나 악성코드 분석 업무에서 샘플을 반복 반입하는 경우 탐지될 수 있습니다. 시험 전용 단말은 hostname 기준으로 예외 조건을 추가하여 조정합니다.

대응 방안

격리 목록과 Python 스크립트를 확보하여 내려받기 주소와 대상 파일을 확인합니다. 작업 폴더에 남은 실행 파일과 실행 이력을 확인하고, 실행된 파일이 있으면 암호화 파일 생성 여부를 조회합니다. 정탐으로 확인되면 단말을 격리하고 내려받기 주소를 차단합니다.

아직 댓글이 없습니다.