Detection rules › Splunk

Malicious Document Execution (Windows Event Log)

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

This rule is attempting to detect anytime a Microsoft Office OR Adobe program (ex. Word, Excel, Adobe) spawns a process that could be indicative of those Office programs used to deliver malicious code

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '1050.1080'
title: Malicious Document Execution
description: 'This rule is attempting to detect anytime a Microsoft Office OR Adobe
  program (ex. Word, Excel, Adobe) spawns a process that could be indicative of those
  Office programs used to deliver malicious code. -- Threat Actor Association: Actinium/Gamaredon/Primitive
  Bear, APT10/menuPass, APT29, APT34/OilRig, APT37, Arid Viper/APT C-23, Blind Eagle/APT-C-36,
  Carbanak, Evilnum, FIN6, FIN7, Gamaredon Group/Shuckworm, Kimsuky, Lazarus, ModifiedElephant,
  MuddyWater, NewsPenguin, RedEyes, RomCom, SideWinder, TA428, TA505, TA551, Turla
  (akaSecret Blizzard, KRYPTON, and UAC-0003), Winter Vivern, WIRTE, Wizard Spider
  -- Software Association: Bazarloder, Black Basta, Clop, Conti, Dridex, Emotet, GlowSand,
  Hancitor, IcedID, Lockbit, MINEBRIDGE, MirrorBlast, PowerShortShell, QakBot, RATDispenser,
  Sodinokibi/REvil, SquirrelWaffle, Trickbot, Zumkong -- #TrendingThreat #Russia #Ukraine'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) (TERM("powershell.exe") OR TERM("cmd.exe") OR
  TERM("wscript.exe") OR TERM("cscript.exe") OR "regsvr32.exe" OR "rundll32.exe" OR
  "wmic" OR "control.exe") ((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(pdf) OR TERM(wordpad.exe) OR TERM(ONENOTE.EXE))|
  regex "(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.exe)|(wordpad\.exe)"
  | 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)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.exe)|(wordpad\.exe)") '
techniques:
- initial-access:phishing:spearphishing attachment
- execution:user execution:malicious link
- execution:user execution:malicious file
technique_id:
- T1566.001
- T1204.001
- T1204.002
data_category:
- Windows event logs
references:
- https://success.trendmicro.com/solution/000279049

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) (TERM("powershell.exe") OR TERM("cmd.exe") OR TERM("wscript.exe") OR TERM("cscript.exe") OR "regsvr32.exe" OR "rundll32.exe" OR "wmic" OR "control.exe") ((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(pdf) OR TERM(wordpad.exe) OR TERM(ONENOTE.EXE))

Stage 2: regex

| regex "(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.exe)|(wordpad\.exe)"

Stage 3: table

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

Stage 4: bucket

| bin span=1s

Stage 5: stats

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

Stage 6: 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)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.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)
_rawregex_match
    • "(?i)(Microsoft Office)
    • (WINWORD.EXE)
    • (EXCEL.EXE)
    • (POWERPNT.EXE)
    • (MSACCESS.EXE)
    • (OUTLOOK.EXE)
    • (ONENOTE.EXE)
    • (VISIO.EXE)
    • (WINPROJ.EXE)
    • (AcroRd32.exe)
    • (Acrobat.exe)
    • (FoxitPhantomPDF.exe)
    • (FoxitReader.exe)
    • (wordpad.exe)"
parent_process_pathmatch
  • "(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(ONENOTE\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.exe)|(wordpad\.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<"
1"powershell.exe"
1"cmd.exe"
1"wscript.exe"
1"cscript.exe"
1"regsvr32.exe"
1"rundll32.exe"
1"wmic"
1"control.exe"
1TERM
1Microsoft
1TERM
1Office
1TERM
1WINWORD.EXE
1TERM
1EXCEL.EXE
1TERM
1POWERPNT.EXE
1TERM
1MSACCESS.EXE
1TERM
1OUTLOOK.EXE
1TERM
1VISIO.EXE
1TERM
1WINPROJ.EXE
1TERM
1pdf
1TERM
1wordpad.exe
1TERM
1ONENOTE.EXE