Detection rules › Elastic

Microsoft Office File Execution via WMI

Time window
1m
Sequence by
file.path, process.executable
Source
github.com/elastic/protections-artifacts

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

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.

FieldKindExcluded valuesSearch
process.Ext.token.integrity_level_nameeqsystemexcludes:process.Ext.token.integrity_level_name field:"process.Ext.token.integrity_level_name" value:"system"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.actionne
  • deletion corpus 86 (elastic 86)
field:"EventType" kind:ne value:"deletion"
file.Ext.header_byteswildcard
  • 4d5a* corpus 46 (elastic 46)
field:"file.Ext.header_bytes" kind:wildcard value:"4d5a*"
file.extensionwildcard
  • com corpus 16 (elastic 16)
  • exe corpus 32 (elastic 32)
field:"file.extension" kind:wildcard
process.namewildcard
  • EXCEL.EXE corpus 34 (elastic 34)
  • MSACCESS.EXE corpus 19 (elastic 19)
  • MSPUB.EXE corpus 15 (elastic 15)
  • POWERPNT.EXE corpus 31 (elastic 31)
  • WINWORD.EXE corpus 35 (elastic 35)
  • fltldr.exe corpus 8 (elastic 8)
field:"process_name" kind:wildcard
process.parent.namewildcard
  • wmiprvse.exe corpus 25 (elastic 19, splunk 5, kusto 1)
field:"parent_process_name" kind:wildcard value:"wmiprvse.exe"