EXPLORE
← Back to Explore
splunk_escuTTP

WMI Permanent Event Subscription

The following analytic detects the creation of permanent event subscriptions using Windows Management Instrumentation (WMI). It leverages Sysmon EventID 5 data to identify instances where the event consumers are not the expected "NTEventLogEventConsumer." This activity is significant because it suggests an attacker is attempting to achieve persistence by running malicious scripts or binaries in response to specific system events. If confirmed malicious, this could lead to severe impacts such as data theft, ransomware deployment, or other damaging outcomes. Investigate the associated scripts or binaries to identify the source of the attack.

MITRE ATT&CK

Detection Query

`wmi` EventCode=5861 Binding
  | rex field=Message "Consumer =\s+(?<consumer>[^;
  | ^$]+)"
  | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\""
  | stats count min(_time) as firstTime max(_time) as lastTime
    BY ComputerName, consumer, Message
  | `security_content_ctime(firstTime)`
  | `security_content_ctime(lastTime)`
  | rename ComputerName as dest
  | `wmi_permanent_event_subscription_filter`

Author

Rico Valdez, Splunk

Created

2026-03-10

Tags

Suspicious WMI Use
Raw Content
name: WMI Permanent Event Subscription
id: 71bfdb13-f200-4c6c-b2c9-a2e07adf437d
version: 8
date: '2026-03-10'
author: Rico Valdez, Splunk
status: experimental
type: TTP
description: The following analytic detects the creation of permanent event subscriptions using Windows Management Instrumentation (WMI). It leverages Sysmon EventID 5 data to identify instances where the event consumers are not the expected "NTEventLogEventConsumer." This activity is significant because it suggests an attacker is attempting to achieve persistence by running malicious scripts or binaries in response to specific system events. If confirmed malicious, this could lead to severe impacts such as data theft, ransomware deployment, or other damaging outcomes. Investigate the associated scripts or binaries to identify the source of the attack.
data_source: []
search: |-
    `wmi` EventCode=5861 Binding
      | rex field=Message "Consumer =\s+(?<consumer>[^;
      | ^$]+)"
      | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\""
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY ComputerName, consumer, Message
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | rename ComputerName as dest
      | `wmi_permanent_event_subscription_filter`
how_to_implement: To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational].
known_false_positives: Although unlikely, administrators may use event subscriptions for legitimate purposes.
references: []
rba:
    message: WMI Permanent Event Subscription detected on $dest$
    risk_objects:
        - field: dest
          type: system
          score: 50
    threat_objects: []
tags:
    analytic_story:
        - Suspicious WMI Use
    asset_type: Endpoint
    mitre_attack_id:
        - T1047
    product:
        - Splunk Enterprise
        - Splunk Enterprise Security
        - Splunk Cloud
    security_domain: endpoint