Detection rules › Splunk

CVE-2022-30190: Microsoft Office Code Execution Vulnerability (Sysmon)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Aka: Follina. A remote code execution vulnerability exists when MSDT is called using the URL protocol from a calling application such as Word. An attacker who successfully exploits this vulnerability can run arbitrary code with the privileges of the calling application. The attacker can then install programs, view, change, or delete data, or create new accounts in the context allowed by the user’s rights

MITRE ATT&CK coverage

References

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

id: '11170.15452'
title: 'CVE-2022-30190: Microsoft Office Code Execution Vulnerability'
description: 'Aka: Follina. A remote code execution vulnerability exists when MSDT
  is called using the URL protocol from a calling application such as Word. An attacker
  who successfully exploits this vulnerability can run arbitrary code with the privileges
  of the calling application. The attacker can then install programs, view, change,
  or delete data, or create new accounts in the context allowed by the user’s rights.
  - Threat Actor Association: APT28, GoldenJackal, RomCom, TA413 - Software Association:
  CrescentImp, Qakbot/Qbot'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
  ("msdt.exe" OR TERM(msdt)) (("PCWDiagnostic" and ("ms-msdt:-id" OR "ms-msdt:/id"))
  OR "invoke" OR (TERM(Microsoft) TERM(Office)) OR TERM(WINWORD.EXE) OR TERM(EXCEL.EXE)
  OR TERM(POWERPNT.EXE) OR TERM(MSACCESS.EXE) OR TERM(OUTLOOK.EXE) OR TERM(VISIO.EXE)
  OR TERM(WINPROJ.EXE) OR TERM(wordpad.exe)) | table _time, host, user process, parent_*,
  process_*, signature_id | bin span=1s | stats values(*) as * by _time, host | where
  (match(process, "(?i)PCWDiagnostic|invoke") OR match(parent_process_path, "(?i)(Microsoft
  Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(wordpad\.exe)"))
  and match(process_name, "(?i)msdt.exe") '
techniques:
- execution:user execution:malicious file
technique_id:
- T1204.002
data_category:
- Windows Sysmon
references:
- https://www.huntress.com/blog/microsoft-office-remote-code-execution-follina-msdt-bug
- https://doublepulsar.com/follina-a-microsoft-office-code-execution-vulnerability-1a47fce5629e

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") ("msdt.exe" OR TERM(msdt)) (("PCWDiagnostic" and ("ms-msdt:-id" OR "ms-msdt:/id")) OR "invoke" OR (TERM(Microsoft) TERM(Office)) OR TERM(WINWORD.EXE) OR TERM(EXCEL.EXE) OR TERM(POWERPNT.EXE) OR TERM(MSACCESS.EXE) OR TERM(OUTLOOK.EXE) OR TERM(VISIO.EXE) OR TERM(WINPROJ.EXE) OR TERM(wordpad.exe))

Stage 2: table

| table _time, host, user process, parent_*, process_*, signature_id

Stage 3: bucket

| bin span=1s

Stage 4: stats

| stats values(*) as * by _time, host

Stage 5: where

| where (match(process, "(?i)PCWDiagnostic|invoke") OR match(parent_process_path, "(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(wordpad\.exe)")) and match(process_name, "(?i)msdt.exe")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 1 corpus 241 (splunk 225, kusto 15, elastic 1)
field:"EventID" kind:eq value:"1"
parent_process_pathregex_match
    • "(?i)(Microsoft Office)
    • (WINWORD.EXE)
    • (EXCEL.EXE)
    • (POWERPNT.EXE)
    • (MSACCESS.EXE)
    • (OUTLOOK.EXE)
    • (VISIO.EXE)
    • (WINPROJ.EXE)
    • (wordpad.exe)"
    corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match
processregex_match
    • "(?i)PCWDiagnostic
    • invoke"
    corpus 2 (splunk 2)
field:"CommandLine" kind:regex_match
process_nameregex_match
  • "(?i)msdt.exe" corpus 2 (splunk 2)
field:"process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>1<"
1"msdt.exe"
1msdt
1"PCWDiagnostic"
1"ms-msdt:-id"
1"ms-msdt:/id"
1"invoke"
1Microsoft
1Office
1WINWORD.EXE
1EXCEL.EXE
1POWERPNT.EXE
1MSACCESS.EXE
1OUTLOOK.EXE
1VISIO.EXE
1WINPROJ.EXE
1wordpad.exe