← LeaderboardThe Skill Leaderboard

detecting-wmi-persistence

Detect WMI event subscription persistence (MITRE T1546.003) by analyzing Sysmon Event IDs 19, 20, and 21 for malicious EventFilter, EventConsumer, and FilterToConsumerBinding creation, cross-referenced against root\subscription namespace contents and Sysinternals Autoruns. Use when hunting WMI-based persistence, triaging a Sysmon alert on these event IDs, or during incident response and purple-team validation of WMI defenses.

Published by mukul975 ↗mukul975/Anthropic-Cybersecurity-Skills

Try your first task

detecting-wmi-persistence

Start a fresh conversation. Replace the highlighted placeholders.

Use detecting-wmi-persistence to triage [Sysmon Event IDs 19/20/21 telemetry] from [Windows environment], correlate suspicious filters, consumers, and bindings, and produce documented findings with recommended containment and remediation steps; do not remove anything.

Required inputs

  • [Sysmon Event IDs 19/20/21 telemetry]
  • [Windows environment]

User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗

SKILL.md

name: detecting-wmi-persistencedescription: Detect WMI event subscription persistence (MITRE T1546.003) by analyzing Sysmon  Event IDs 19, 20, and 21 for malicious EventFilter, EventConsumer, and FilterToConsumerBinding  creation, cross-referenced against root\subscription namespace contents and Sysinternals  Autoruns. Use when hunting WMI-based persistence, triaging a Sysmon alert on these event  IDs, or during incident response and purple-team validation of WMI defenses.domain: cybersecuritysubdomain: threat-huntingtags: - threat-hunting- wmi- persistence- sysmon- t1546.003- mitre-attack- windows- dfirversion: '1.0'author: mahipallicense: Apache-2.0d3fend_techniques: - Application Protocol Command Analysis- Network Isolation- Network Traffic Analysis- Client-server Payload Profiling- Platform Monitoringnist_csf: - DE.CM-01- DE.AE-02- DE.AE-07- ID.RA-05mitre_attack: - T1546.003- T1047- T1059.001

Detecting WMI Persistence

When to Use

  • When hunting for WMI event subscription persistence (MITRE ATT&CK T1546.003)
  • After detecting suspicious WMI activity in endpoint telemetry
  • During incident response to identify attacker persistence mechanisms
  • When Sysmon alerts trigger on Event IDs 19, 20, or 21
  • During purple team exercises testing WMI-based persistence

Prerequisites

  • Sysmon v6.1+ deployed with WMI event logging enabled (Event IDs 19, 20, 21)
  • Windows Security Event Log forwarding configured
  • SIEM with Sysmon data ingested (Splunk, Elastic, Sentinel)
  • PowerShell access for WMI enumeration on endpoints
  • Sysinternals Autoruns for manual WMI subscription review

Workflow

  1. Collect Telemetry: Parse Sysmon Event IDs 19 (WmiEventFilter), 20 (WmiEventConsumer), 21 (WmiEventConsumerToFilter).
  2. Identify Suspicious Consumers: Flag CommandLineEventConsumer and ActiveScriptEventConsumer types executing code.
  3. Analyze Event Filters: Examine WQL queries in EventFilters for process start triggers or timer-based execution.
  4. Correlate Bindings: Match FilterToConsumerBindings linking suspicious filters to consumers.
  5. Check Persistence Locations: Query WMI namespaces root\subscription and root\default for active subscriptions.
  6. Validate Findings: Cross-reference with known-good WMI subscriptions (SCCM, AV products).
  7. Document and Remediate: Remove malicious subscriptions and update detection rules.

Key Concepts

ConceptDescription
Sysmon Event 19WmiEventFilter creation detected
Sysmon Event 20WmiEventConsumer creation detected
Sysmon Event 21WmiEventConsumerToFilter binding detected
T1546.003Event Triggered Execution: WMI Event Subscription
CommandLineEventConsumerExecutes system commands when filter triggers
ActiveScriptEventConsumerRuns VBScript/JScript when filter triggers

Tools & Systems

ToolPurpose
SysmonWindows event monitoring for WMI activity
WMI ExplorerGUI tool for browsing WMI namespaces
AutorunsSysinternals tool listing persistence mechanisms
PowerShell Get-WMIObjectEnumerate WMI event subscriptions
SplunkSIEM analysis of Sysmon WMI events
VelociraptorEndpoint WMI artifact collection

Output Format

Hunt ID: TH-WMI-[DATE]-[SEQ]
Technique: T1546.003
Host: [Hostname]
Event Type: [EventFilter|EventConsumer|Binding]
Consumer Type: [CommandLine|ActiveScript]
WQL Query: [Filter query text]
Command: [Executed command or script]
Risk Level: [Critical/High/Medium/Low]
Recommended Action: [Remove subscription, investigate lateral movement]