Detection rules › Splunk

Malicious Document Execution (Sysmon)

Group by
_time, host
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

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

id: '1050.1052'
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_sysmon` EventCode=1 AND (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") AND ("Microsoft Office" OR "WINWORD.EXE"
  OR "EXCEL.EXE" OR "POWERPNT.EXE" OR "ONENOTE.EXE" OR "MSACCESS.EXE" OR "OUTLOOK.EXE"
  OR "VISIO.EXE" OR "WINPROJ.EXE" OR "AcroRd32.exe" OR "Acrobat.exe" OR "FoxitPhantomPDF.exe"
  OR "FoxitReader.exe" OR "wordpad.exe" ) | table _time, host, user process, parent_*,
  process_*, signature_id | bin span=1s | stats values(*) as * by _time, host | where
  match(parent_process_path,"(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(ONENOTE\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.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 Sysmon
references:
- https://success.trendmicro.com/solution/000279049

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 AND (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") AND ("Microsoft Office" OR "WINWORD.EXE" OR "EXCEL.EXE" OR "POWERPNT.EXE" OR "ONENOTE.EXE" OR "MSACCESS.EXE" OR "OUTLOOK.EXE" OR "VISIO.EXE" OR "WINPROJ.EXE" OR "AcroRd32.exe" OR "Acrobat.exe" OR "FoxitPhantomPDF.exe" OR "FoxitReader.exe" OR "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(parent_process_path,"(?i)(Microsoft Office)|(WINWORD\.EXE)|(EXCEL\.EXE)|(POWERPNT\.EXE)|(ONENOTE\.EXE)|(MSACCESS\.EXE)|(OUTLOOK\.EXE)|(VISIO\.EXE)|(WINPROJ\.EXE)|(AcroRd32\.exe)|(Acrobat\.exe)|(FoxitPhantomPDF\.exe)|(FoxitReader\.exe)|(wordpad.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)
    • (ONENOTE.EXE)
    • (MSACCESS.EXE)
    • (OUTLOOK.EXE)
    • (VISIO.EXE)
    • (WINPROJ.EXE)
    • (AcroRd32.exe)
    • (Acrobat.exe)
    • (FoxitPhantomPDF.exe)
    • (FoxitReader.exe)
    • (wordpad.exe)"
field:"parent_process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"powershell.exe"
1"cmd.exe"
1"wscript.exe"
1"cscript.exe"
1"regsvr32.exe"
1"rundll32.exe"
1"wmic"
1"control.exe"
1"Microsoft Office"
1"WINWORD.EXE"
1"EXCEL.EXE"
1"POWERPNT.EXE"
1"ONENOTE.EXE"
1"MSACCESS.EXE"
1"OUTLOOK.EXE"
1"VISIO.EXE"
1"WINPROJ.EXE"
1"AcroRd32.exe"
1"Acrobat.exe"
1"FoxitPhantomPDF.exe"
1"FoxitReader.exe"
1"wordpad.exe"