Skip to main content

Overview

The WMIFilterBinding command enumerates WMI Filter-to-Consumer bindings. These bindings connect WMI Event Filters (triggers) to Event Consumers (actions), creating complete event-driven automation or persistence mechanisms. A binding is necessary for a WMI event to actually execute an action - the filter and consumer alone are not sufficient.

Syntax

This command does not support remote execution.

Output

Returns WMI Filter Binding information:
  • Filter name (trigger condition)
  • Consumer name (action to execute)
  • Binding creation timestamp
  • Creator SID

Use Cases

  • Identify active WMI persistence mechanisms
  • Understand complete event-action chains
  • Find orphaned filters or consumers
  • Discover WMI-based automation

Example Output

Remote Execution

This command does NOT support remote execution.

Detection Considerations

Active WMI bindings represent complete persistence mechanisms and should be carefully reviewed.
  • WMI Namespace: Queries root\subscription namespace for __FilterToConsumerBinding instances
  • Sysmon Events: Event ID 21 logs binding creation/modification
  • Event Logs: WMI-Activity logs may capture binding activity
  • Persistence: Bindings survive reboots and execute with SYSTEM privileges

Understanding the Binding Relationship

Three Required Components:
  1. Event Filter (Trigger)
    • Defines WHEN something happens
    • WQL query monitoring system events
    • Example: Process creation, system boot, time interval
  2. Event Consumer (Action)
    • Defines WHAT to execute
    • Command, script, or other action
    • Example: Run executable, execute script
  3. Filter-to-Consumer Binding (Connection)
    • Links filter to consumer
    • Activates the persistence mechanism
    • Without binding, filter and consumer are inactive
Complete Chain:

Detection Strategy

Step 1: Enumerate All Components
Step 2: Correlate Components
  • Match binding filter/consumer names
  • Verify all three components exist
  • Check creation timestamps
  • Validate creator SIDs
Step 3: Analyze Legitimacy
  • Review filter WQL queries
  • Examine consumer commands
  • Check for obfuscation (Base64, encoding)
  • Validate business justification
Step 4: Investigate Suspicious Indicators
  • Recently created bindings
  • Boot/logon triggers
  • PowerShell execution
  • Encoded commands
  • Non-standard paths
  • SYSTEM privilege consumers

Removal Procedure

PowerShell Method:
Note: Remove all three components (binding, filter, consumer) for complete cleanup.