Detection rules › Splunk

Detect WMI Event Subscription Persistence

Status
production
Severity
medium
Group by
dest, dvc, group.name, object_category, object_path, signature, signature_id, src, status, user, user_id, vendor_product
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic identifies the creation of WMI Event Subscriptions, which can be used to establish persistence or perform privilege escalation. It detects EventID 19 (EventFilter creation), EventID 20 (EventConsumer creation), and EventID 21 (FilterToConsumerBinding creation) from Sysmon logs. This activity is significant because WMI Event Subscriptions can execute code with elevated SYSTEM privileges, making it a powerful persistence mechanism. If confirmed malicious, an attacker could maintain long-term access, escalate privileges, and execute arbitrary code, posing a severe threat to the environment.

Known false positives

  • It is possible some applications will create a consumer and may be required to be filtered. For tuning, add any additional LOLBin's for further depth of coverage.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

name: Detect WMI Event Subscription Persistence
id: 01d9a0c2-cece-11eb-ab46-acde48001122
version: 12
creation_date: '2021-06-16'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic identifies the creation of WMI Event Subscriptions, which can be used to establish persistence or perform privilege escalation. It detects EventID 19 (EventFilter creation), EventID 20 (EventConsumer creation), and EventID 21 (FilterToConsumerBinding creation) from Sysmon logs. This activity is significant because WMI Event Subscriptions can execute code with elevated SYSTEM privileges, making it a powerful persistence mechanism. If confirmed malicious, an attacker could maintain long-term access, escalate privileges, and execute arbitrary code, posing a severe threat to the environment.
data_source:
    - Sysmon EventID 20
search: |-
    `sysmon` EventID=20
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY dest dvc object
           object_category object_path signature
           signature_id src status
           user user_id vendor_product
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `detect_wmi_event_subscription_persistence_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs with that provide WMI Event Subscription from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA and have enabled EventID 19, 20 and 21. Tune and filter known good to limit the volume.
known_false_positives: It is possible some applications will create a consumer and may be required to be filtered. For tuning, add any additional LOLBin's for further depth of coverage.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.003/T1546.003.md
    - https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/
    - https://github.com/trustedsec/SysmonCommunityGuide/blob/master/chapters/WMI-events.md
    - https://in.security/2019/04/03/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/
finding:
    title: Possible malicious WMI Subscription created on $dest$
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - Suspicious WMI Use
    - Hellcat Ransomware
asset_type: Endpoint
mitre_attack_id:
    - T1546.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon` EventID=20

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY dest dvc object
       object_category object_path signature
       signature_id src status
       user user_id vendor_product

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `detect_wmi_event_subscription_persistence_filter`

Indicators

These rows show field, operator, and value matches.