Detection rules › Splunk

WMI subscription execution (Windows Event Log)

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

Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription

MITRE ATT&CK coverage

References

Telemetry coverage

Rule body

id: '5975.6319'
title: WMI subscription execution
description: 'Adversaries may establish persistence and elevate privileges by executing
  malicious content triggered by a Windows Management Instrumentation (WMI) event
  subscription. -- Threat Actor Association: APT29, Metador, Mustang Panda (aka. Stately
  Taurus//Earth Preta/BRONZE PRESIDENT/TA416/RedDelta), TA551 - Software Association:
  BumbleBee, TargetCompany, TrailBlazer, Trickbot -- Atomics T1047 Test#7 Atomics
  T1047 Test#8 Atomics T1047 Test#9 -- While this use case can detect the above atomics,
  it is not mapped to its MITRE execution techniques due to adversaries utilizing
  this method of WMI for Privilege-Escalation and Persistence.'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<") TERM(WmiPrvSE) | regex parent_process_name="(?i)(WmiPrvSE)" |
  table _time, host, user parent_*, process, process_*, signature_id | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- persistence:event triggered execution:windows management instrumentation event subscription
- execution:windows management instrumentation
- privilege-escalation:event triggered execution:windows management instrumentation
  event subscription
technique_id:
- T1546.003
- T1047
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://pentestlab.blog/2020/01/21/persistence-wmi-event-subscription/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<") TERM(WmiPrvSE)

Stage 2: regex

| regex parent_process_name="(?i)(WmiPrvSE)"

Stage 3: table

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

Stage 4: bucket

| bin span=1s

Stage 5: stats

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

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4688 corpus 317 (splunk 283, kusto 33, elastic 1)
field:"EventID" kind:eq value:"4688"
parent_process_nameregex_match
  • "(?i)(WmiPrvSE)" corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4688<"
1WmiPrvSE