Detection rules › Elastic
Microsoft Office File Execution via WMI
Identifies the execution of a file written or modified by Microsoft Office processes followed by a child process spawned via Windows Management Instrumentation (WMI). This behavior may indicate adversarial activity to avoid spawning a suspicious MS Office child process.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Rule body
[rule]
description = """
Identifies the execution of a file written or modified by Microsoft Office processes followed by a child process spawned
via Windows Management Instrumentation (WMI). This behavior may indicate adversarial activity to avoid spawning a
suspicious MS Office child process.
"""
id = "792411bd-59ef-4ac0-89be-786d52d1a5c8"
license = "Elastic License v2"
name = "Microsoft Office File Execution via WMI"
os_list = ["windows"]
reference = [
"https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16",
]
version = "1.0.31"
query = '''
sequence with maxspan=1m
[file where event.action != "deletion" and
(file.extension : ("exe", "com") or file.Ext.header_bytes : "4d5a*") and
process.name : ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE", "MSACCESS.EXE", "MSPUB.EXE", "fltldr.exe")] by file.path
[process where event.action == "start" and process.parent.name : "wmiprvse.exe" and
not process.Ext.token.integrity_level_name == "system"] by process.executable
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"
[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1047"
name = "Windows Management Instrumentation"
reference = "https://attack.mitre.org/techniques/T1047/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by file.path, process.executable.
Stage 1: file
[file where event.action != "deletion" and
(file.extension : ("exe", "com") or file.Ext.header_bytes : "4d5a*") and
process.name : ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE", "MSACCESS.EXE", "MSPUB.EXE", "fltldr.exe")] by file.path
Stage 2: process
[process where event.action == "start" and process.parent.name : "wmiprvse.exe" and
not process.Ext.token.integrity_level_name == "system"] by process.executable
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.token.integrity_level_name | eq | system | excludes:process.Ext.token.integrity_level_name field:"process.Ext.token.integrity_level_name" value:"system" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
event.action | ne |
| field:"EventType" kind:ne value:"deletion" |
file.Ext.header_bytes | wildcard |
| field:"file.Ext.header_bytes" kind:wildcard value:"4d5a*" |
file.extension | wildcard |
| field:"file.extension" kind:wildcard |
process.name | wildcard |
| field:"process_name" kind:wildcard |
process.parent.name | wildcard |
| field:"parent_process_name" kind:wildcard value:"wmiprvse.exe" |