Detection rules › Splunk

Office Spawns Suspicious Child Process (Windows Event Log)

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

This use case attempts to identify suspicious child processes spawned from a Microsoft Office application

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '19686.34350'
title: Office Spawns Suspicious Child Process
description: 'This use case attempts to identify suspicious child processes spawned
  from a Microsoft Office application -- Threat Actor Association: RomCom (Storm-0978)
  -- Vulnerability Association: CVE-2023-36884'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) (powershell.exe OR pwsh.exe OR cmd.exe OR mshta.exe
  OR wscript.exe OR cscript.exe OR regsvr32.exe OR rundll32.exe OR taskkill.exe OR
  csc.exe OR calc.exe OR control.exe) ((Microsoft OR Office) OR WINWORD.EXE OR EXCEL.EXE
  OR POWERPNT.EXE OR MSACCESS.EXE OR OUTLOOK.EXE OR VISIO.EXE OR WINPROJ.EXE OR ONENOTE.EXE
  OR GRAPH.EXE OR MSPub.EXE OR wordpad.exe) | regex process_name="(?i)(powershell|pwsh|cmd|mshta|wscript|cscript|regsvr32|rundll32|taskkill|csc|calc|control)\.exe"|
  regex parent_process_path="(?i)Microsoft\sOffice|winword|excel|powerpnt|msaccess|outlook|visio|winproj|onenote|graph|mspub|wordpad"
  | table _time, host, user process, parent_*, process_*, signature_id | bin span=1s
  | stats values(*) as * by _time, host, parent_process_name | where match(parent_process_path,"(?i)(Microsoft
  Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(GRAPH\.exe)|(MSPub\.exe)|(WINPROJ.EXE\.exe)|(wordpad\.exe)") '
techniques:
- execution:user execution:malicious file
technique_id:
- T1204.002
data_category:
- Windows event logs
references:
- https://fourcore.io/blogs/cve-2023-36884-ms-office-zero-day-vulnerability

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) (powershell.exe OR pwsh.exe OR cmd.exe OR mshta.exe OR wscript.exe OR cscript.exe OR regsvr32.exe OR rundll32.exe OR taskkill.exe OR csc.exe OR calc.exe OR control.exe) ((Microsoft OR Office) OR WINWORD.EXE OR EXCEL.EXE OR POWERPNT.EXE OR MSACCESS.EXE OR OUTLOOK.EXE OR VISIO.EXE OR WINPROJ.EXE OR ONENOTE.EXE OR GRAPH.EXE OR MSPub.EXE OR wordpad.exe)

Stage 2: regex

| regex process_name="(?i)(powershell|pwsh|cmd|mshta|wscript|cscript|regsvr32|rundll32|taskkill|csc|calc|control)\.exe"

Stage 3: regex

| regex parent_process_path="(?i)Microsoft\sOffice|winword|excel|powerpnt|msaccess|outlook|visio|winproj|onenote|graph|mspub|wordpad"

Stage 4: table

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

Stage 5: bucket

| bin span=1s

Stage 6: stats

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

Stage 7: where

| where match(parent_process_path,"(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(GRAPH\.exe)|(MSPub\.exe)|(WINPROJ.EXE\.exe)|(wordpad\.exe)")

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
parent_process_pathmatch
  • "(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(GRAPH\.exe)|(MSPub\.exe)|(WINPROJ.EXE\.exe)|(wordpad\.exe)"
parent_process_pathregex_match
    • "(?i)Microsoft\sOffice
    • winword
    • excel
    • powerpnt
    • msaccess
    • outlook
    • visio
    • winproj
    • onenote
    • graph
    • mspub
    • wordpad"
process_nameregex_match
  • "(?i)(powershell|pwsh|cmd|mshta|wscript|cscript|regsvr32|rundll32|taskkill|csc|calc|control).exe"

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>4688<"
1powershell.exe
1pwsh.exe
1cmd.exe
1mshta.exe
1wscript.exe
1cscript.exe
1regsvr32.exe
1rundll32.exe
1taskkill.exe
1csc.exe
1calc.exe
1control.exe
1Microsoft
1Office
1WINWORD.EXE
1EXCEL.EXE
1POWERPNT.EXE
1MSACCESS.EXE
1OUTLOOK.EXE
1VISIO.EXE
1WINPROJ.EXE
1ONENOTE.EXE
1GRAPH.EXE
1MSPub.EXE
1wordpad.exe