Detection rules › Splunk
Malicious Document Execution (Windows Event Log)
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
| Tactic | Techniques |
|---|---|
| Initial Access | T1566.001 Phishing: Spearphishing Attachment |
| Execution | T1204.001 User Execution: Malicious Link, T1204.002 User Execution: Malicious File |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
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.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
_raw | regex_match |
|
parent_process_path | match |
|
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.
| Stage | Term |
|---|---|
| 1 | TERM |
| 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" |
| 1 | TERM |
| 1 | Microsoft |
| 1 | TERM |
| 1 | Office |
| 1 | TERM |
| 1 | WINWORD.EXE |
| 1 | TERM |
| 1 | EXCEL.EXE |
| 1 | TERM |
| 1 | POWERPNT.EXE |
| 1 | TERM |
| 1 | MSACCESS.EXE |
| 1 | TERM |
| 1 | OUTLOOK.EXE |
| 1 | TERM |
| 1 | VISIO.EXE |
| 1 | TERM |
| 1 | WINPROJ.EXE |
| 1 | TERM |
| 1 | pdf |
| 1 | TERM |
| 1 | wordpad.exe |
| 1 | TERM |
| 1 | ONENOTE.EXE |