Try in Splunk Security Cloud


The following analytic identifies the creation of WMI permanent event subscriptions, which can be used to establish persistence or perform privilege escalation. It leverages Sysmon data, specifically EventCodes 19, 20, and 21, to detect the creation of WMI EventFilters, EventConsumers, and FilterToConsumerBindings. This activity is significant as it may indicate an attacker setting up mechanisms to execute code with elevated SYSTEM privileges when specific events occur. If confirmed malicious, this could allow the attacker to maintain persistence, escalate privileges, and execute arbitrary code, posing a severe threat to the environment.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-20
  • Author: Rico Valdez, Michael Haag, Splunk
  • ID: ad05aae6-3b2a-4f73-af97-57bd26cee3b9




ID Technique Tactic
T1546.003 Windows Management Instrumentation Event Subscription Privilege Escalation, Persistence
T1546 Event Triggered Execution Privilege Escalation, Persistence
Kill Chain Phase
  • Exploitation
  • Installation
  • DE.CM
  • CIS 10
`sysmon` EventCode=21 
| rename host as dest 
| table _time, dest, user, Operation, EventType, Query, Consumer, Filter 
| `wmi_permanent_event_subscription___sysmon_filter`


The SPL above uses the following Macros:

:information_source: wmi_permanent_event_subscription_-_sysmon_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • EventCode
  • host
  • user
  • Operation
  • EventType
  • Query
  • Consumer
  • Filter

How To Implement

To successfully implement this search, you must be collecting Sysmon data using Sysmon version 6.1 or greater and have Sysmon configured to generate alerts for WMI activity (eventID= 19, 20, 21). In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields.

Known False Positives

Although unlikely, administrators may use event subscriptions for legitimate purposes.

Associated Analytic Story


Risk Score Impact Confidence Message
30.0 30 100 WMI Permanent Event Subscription detected on $dest$ by $user$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 3