지니안 EDR

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

지니언 EDR - 리눅스 Ruler Outlook 폼 COM DLL 주입·Windows DLL 교차 컴파일·임시 HTTP 스테이징 서버 복합 행위 - Outlook 폼 주입(CVE-2024-21378) 공격 준비 의심

지니언 EDR의 리눅스 호스트 로그에서 Exchange 공격 도구 Ruler 실행이 Windows DLL 교차 컴파일 및 임시 HTTP 스테이징 서버 실행과 함께 나타나는 Outlook 폼 주입(CVE-2024-21378) 공격 준비를 탐지합니다.

개요

중요도 상
유형 배치 탐지
실행 주기 매달/매일/매시/10분간격 */10 * * * *
메시지 지니언 EDR - Outlook 폼 주입형 복합 행위: $host_ip
출력 필드 순서 hostname, host_ip, grp_cnt, anchor_cnt, has_ruler, groups, techs, first_seen, last_seen
MITRE 기술 T1137.003· T1587.001· T1608.001· T1105· T1204.002· T1140· T1059.004· T1070.004
MITRE 전술 TA0042 Resource Development· TA0002 Execution· TA0003 Persistence· TA0005 Defense Evasion· TA0011 Command and Control
출처 사용자 제안 letsgo

쿼리

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| search len(trim(hostname)) > 0 5| eval psrc = if(len(trim(image_path)) > 0, trim(image_path), trim(image)) 6| eval proc = lower(substr(psrc, lastindexof(psrc, "\\") + 1)), ipath = lower(psrc), cmd_l = lower(nvl(cmd_line, "")), 7 i_dir = if(lastindexof(psrc, "\\") >= 0, lower(substr(psrc, 0, lastindexof(psrc, "\\"))), ""), 8 par = lower(nvl(substr(parent_image, lastindexof(parent_image, "\\") + 1), "")), hostname = lower(trim(hostname)) 9| 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) 10| 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) 11| eval fpath = lower(nvl(file_path, "")), f_dir = if(lastindexof(file_path, "\\") >= 0, lower(substr(file_path, 0, lastindexof(file_path, "\\"))), "") 12| eval grp = case( 13 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(cmd_l, "(?:^|[\\s/\\\\.])ruler(?:-(?:linux|win|osx)(?:64|86)?)?(?:\\.exe)?\\s") and match(cmd_l, "\\s(?:form|rules|homepage|check|brute|abk|display|send|add-com)\\b") and match(cmd_l, "--(?:email|url|username|domain|o365|hash)\\b")), "ruler", 14 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(cmd_l, "(?:x86_64|i686)-w64-mingw32-(?:gcc|g\\+\\+|c\\+\\+|clang|windres|dlltool)\\b") or (match(cmd_l, "\\bdllmain\\s*\\(") and match(cmd_l, "dll_process_attach")))), "crossbuild", 15 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and (match(cmd_l, "python[0-9.]*\\s+-m\\s+(?:http\\.server|simplehttpserver)\\b") or match(cmd_l, "\\bphp\\s+-s\\s+\\S+:\\d+") or match(cmd_l, "busybox\\s+httpd\\b")) and not(match(ipath, "/(?:grep|egrep|pgrep|pkill|ps)$"))), "stagesrv", 16 _schema == "genian-edr-file" and in(event_subtype, "FileCreate", "FileMove") and (match(concat(fpath, " ", lower(nvl(file_path2, ""))), "(?:^|\\s)/(?:tmp|var/tmp|dev/shm)/[^\\s]+") and file_type == "EXEC" and not(match(lower(psrc), "^/usr/bin/(?:dpkg|apt|apt-get|snap)$|^/usr/lib/snapd/"))), "lx_tmpdrop", 17 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "^/(?:tmp|var/tmp|dev/shm)/")), "lx_tmpexec", 18 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (indexof(ipath, "/") == 0 and ((match(ipath, "/base64$") and match(cmd_l, "\\s(?:-d|--decode)\\b")) or (match(ipath, "/xxd$") and match(cmd_l, "\\s-r\\b")) or (match(ipath, "/openssl$") and match(cmd_l, "\\senc\\b[^\\n]*\\s-d\\b")))), "base64", 19 _schema == "genian-edr-process" and event_subtype == "ProcessStart" and (match(ipath, "/(?:curl|wget)$") and match(cmd_l, "(?:\\s-o|--output(?:-document)?)[= ]?\\s*\\S?/(?:tmp|var/tmp|dev/shm)/|\\|\\s*(?:sudo\\s+)?(?:ba|da|z)?sh\\b")), "lx_dl", 20 _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_oneliner", 21 _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") 22| search isnotnull(grp) 23| eval tech = case(grp == "ruler", "T1137.003", grp == "crossbuild", "T1587.001", grp == "stagesrv", "T1608.001", grp == "lx_tmpdrop", "T1105", grp == "lx_tmpexec", "T1204.002", grp == "base64", "T1140", grp == "lx_dl", "T1105", grp == "lx_oneliner", "T1059.004", grp == "lx_wipe", "T1070.004") 24| eval anchor_g = if(in(grp, "ruler"), grp, null), has_ruler_v = if(grp == "ruler", 1, 0) 25| stats dc(grp) as grp_cnt, dc(anchor_g) as anchor_cnt, max(has_ruler_v) as has_ruler, values(grp) as groups, values(tech) as techs, min(_time) as first_seen, max(_time) as last_seen by hostname, host_ip 26| search has_ruler == 1 and grp_cnt >= 3 27| eval groups = strjoin(", ", groups), techs = strjoin(", ", techs), 28 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)를 집계합니다. Ruler 실행(Outlook 폼·규칙 주입 또는 Autodiscover 확인)이 반드시 있고(필수 행위군), 서로 다른 행위군이 3개 이상이면 탐지합니다. 탐지 결과에는 관찰된 행위군 목록(groups)과 기법 목록(techs), 첫 발생 시각(first_seen)과 마지막 발생 시각(last_seen)을 함께 제공합니다.

위협 분석

CVE-2024-21378은 Outlook 사용자 지정 폼에 COM DLL을 등록해 피해자의 Outlook에서 코드를 실행하는 취약점입니다. 공격자는 탈취한 메일 계정으로 사서함에 폼을 등록하고 메일을 보내 실행을 유발하므로, 피해 단말에는 메일 수신 외에 유입 흔적이 거의 남지 않습니다. 공격 준비 호스트에서 탐지하면 폼이 실행되기 전에 차단할 수 있습니다.

오탐 유형

보안 점검 부서가 승인된 진단에서 Ruler로 Exchange 설정을 점검하는 경우 탐지될 수 있습니다. 진단 일정과 대상 호스트를 확인하고, 진단용 호스트는 hostname 기준으로 예외 조건을 추가하여 조정합니다.

대응 방안

Ruler 명령줄에서 사용된 메일 계정과 대상 사서함을 확인하고 해당 계정의 암호를 변경합니다. 대상 사서함의 사용자 지정 폼과 규칙을 점검하여 주입된 폼을 제거하고, 교차 컴파일된 DLL과 스테이징 서버에 게시된 파일을 확보합니다. 정탐으로 확인되면 호스트를 격리하고 Outlook 보안 업데이트 적용 여부를 확인합니다.

아직 댓글이 없습니다.