SOP-30: Suspicious WMI / DCOM Execution Response

·

Windows Management Instrumentation (WMI) and the Distributed Component Object Model (DCOM) are legitimate Windows management frameworks that attackers abuse for fileless lateral movement, remote code execution, and persistent event-driven backdoors. WMI is particularly powerful for attackers because it requires no new binary on the target system — commands execute via the built-in WmiPrvSE.exe host process.

Key data sources: DeviceProcessEvents (WmiPrvSE.exe parent, wmic.exe command lines), DeviceNetworkEvents (wmic.exe / WmiPrvSE.exe outbound on TCP 135 / dynamic RPC ports), DeviceEvents (WMI subscription creation — __EventFilter, __EventConsumer binding).

☰ Table of Contents

01 Background 02 Identification 03 Containment 04 Eradication 05 Escalation
🛠

01 — BACKGROUND

TECHNIQUE OVERVIEW
01
Technique Overview — WMI & DCOM Abuse
MITRE T1047 / T1021.003

WMI allows remote process execution, event subscription persistence, and system reconnaissance — all via authenticated RPC connections that most firewalls allow on internal networks. DCOM (Distributed COM) extends COM objects across the network, enabling attackers to invoke arbitrary COM interfaces on remote hosts. Both techniques leave minimal forensic artefacts compared to PSExec or RDP — no files are dropped, no services installed, execution happens inside trusted Windows processes.

FieldValue
MITRE TechniquesT1047 — Windows Management Instrumentation
T1021.003 — Remote Services: Distributed Component Object Model
Kill-chain PhaseLateral Movement, Execution, Persistence
Primary Log SourceDeviceProcessEvents (WmiPrvSE.exe parent), DeviceNetworkEvents
Secondary Log SourcesDeviceEvents (WMI subscription), SecurityEvent 4648 (explicit DCOM credential use), Microsoft-Windows-WMI-Activity/Operational (Event 5857/5858/5861)
Common Toolswmic.exe (built-in), impacket wmiexec, SharpWMI, CrackMapExec --wmiexec, Cobalt Strike WMI lateral movement
Default SeveritySEV2 for WMI exec; SEV1 if WMI subscription detected (persistence mechanism)

A WMI event subscription (ActiveScriptEventConsumer or CommandLineEventConsumer binding) is a persistent backdoor that survives reboots. Treat any confirmed WMI subscription created outside a known software deployment as SEV1 persistence.

🔍

02 — IDENTIFICATION

2 INDICATORS
▶ Investigation Workflow
I1
WmiPrvSE.exe Spawning Command Interpreters
T1047
WHY CHECK

WmiPrvSE.exe (WMI Provider Host) is the Windows process that executes WMI queries and operations. When an attacker executes a remote command via WMI, WmiPrvSE.exe spawns that command as a child process. Seeing WmiPrvSE.exe as the parent of cmd.exe, powershell.exe, or any shell interpreter is the definitive indicator of WMI-based execution — either local via malicious script or remote via wmic/impacket.

📍 Portal Navigation — MDE Advanced Hunting
security.microsoft.com› Hunting› Advanced Hunting
  • 1Run the KQL query below in Advanced Hunting. Set time range to Last 1 hour for active incidents; extend to 7 days for threat hunting.
  • 2For each result, click the DeviceName link to open the Device page, then navigate to Device Timeline to trace the full execution chain leading to the WMI event.
  • 3Check ProcessCommandLine of the child process — encoded commands, download cradles, or reverse shell patterns indicate malicious WMI execution vs legitimate management scripts.
  • 4Identify the source host initiating remote WMI: query DeviceNetworkEvents on the affected host to find inbound TCP 135 (RPC endpoint mapper) connections and correlate the source IP to another device in the fleet.
  • 5Check whether scrcons.exe (ActiveScriptEventConsumer) appears in the process tree — this confirms WMI subscription-based persistence, which survives reboots.
IndicatorMeaningSeverity
WmiPrvSE.exe → cmd.exe / powershell.exeWMI process execution — remote or local command running via WMIHIGH
wmic.exe /node:<IP> process call createRemote WMI execution targeting another hostCRITICAL
scrcons.exeWMI ActiveScriptEventConsumer — persistent WMI backdoor executing VBScript/JScriptCRITICAL
WmiPrvSE.exe → mshta.exe / wscript.exeWMI executing HTA or Windows Script — LOLBin WMI chainHIGH
mmc.exe network connection inboundMMC20.Application DCOM lateral movement — mmc.exe receiving DCOM callHIGH
impacket / wmiexec strings in command lineOpen-source WMI lateral movement framework detectedCRITICAL
DETECTS: WmiPrvSE.exe spawning command interpreters — primary indicator of WMI-based execution (remote or subscription)
KQL — WmiPrvSE.exe Spawning Shell Processes
DeviceProcessEvents | where Timestamp > ago(1h) | where InitiatingProcessFileName =~ "WmiPrvSE.exe" and FileName in~ ("cmd.exe","powershell.exe","wscript.exe","cscript.exe", "mshta.exe","rundll32.exe","regsvr32.exe","scrcons.exe", "certutil.exe","bitsadmin.exe") | project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine, InitiatingProcessCommandLine, InitiatingProcessParentFileName | order by Timestamp desc
DETECTS: wmic.exe with /node: flag — direct remote WMI command execution targeting other hosts
KQL — Remote wmic /node: Execution
DeviceProcessEvents | where Timestamp > ago(1h) | where FileName =~ "wmic.exe" and ProcessCommandLine has "/node:" | project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine | order by Timestamp desc
SPL — WmiPrvSE.exe Shell Spawn & Remote WMI
index=mde sourcetype=DeviceProcessEvents (InitiatingProcessFileName="WmiPrvSE.exe" AND FileName IN ("cmd.exe","powershell.exe","wscript.exe","cscript.exe","mshta.exe","scrcons.exe")) OR (FileName="wmic.exe" AND like(ProcessCommandLine,"%/node:%")) | table _time DeviceName AccountName InitiatingProcessFileName FileName ProcessCommandLine | sort -_time
I2
WMI Event Subscription (Persistence) & DCOM Lateral Movement
T1047 Persistence / T1021.003
WHY CHECK

WMI event subscriptions are a fileless, registry-less persistence mechanism. An attacker creates a __EventFilter (trigger condition), an ActiveScriptEventConsumer or CommandLineEventConsumer (action), and a __FilterToConsumerBinding (links them). This survives reboots and runs as SYSTEM. DCOM lateral movement via COM objects like MMC20.Application, ShellWindows, or ShellBrowserWindow executes code on remote hosts using the standard DCOM port (TCP 135 + dynamic RPC).

📍 Portal Navigation — MDE Device Timeline (WMI Subscription)
security.microsoft.com› Assets› Devices› [Device Name]› Device Timeline
  • 1On the Device Timeline, filter the event type to WmiActivityEventConsumer-Trace or search for scrcons.exe in the process column.
  • 2Run the WMI subscription detection KQL below in Advanced Hunting to look for __EventFilter creation across the fleet.
  • 3For DCOM: query DeviceNetworkEvents for inbound connections to mmc.exe or dllhost.exe from remote IPs, which indicates DCOM invocation (MMC20.Application CLSID: 49B2791A-B1AE-4C90-9B8E-E860BA07F889).
  • 4For impacket wmiexec: look for cmd.exe /Q /c patterns with output redirection to \\127.0.0.1\ADMIN$\__ — a distinctive impacket wmiexec artefact.
  • 5Check the Windows WMI-Activity event log (Microsoft-Windows-WMI-Activity/Operational, Event 5857/5858/5861) for provider load errors or subscription binding events that are not present in MDE telemetry.
Indicator / PatternMeaningSeverity
__EventFilter + __FilterToConsumerBinding createdWMI subscription persistence — survives reboot, runs as SYSTEMCRITICAL
scrcons.exe executionActiveScriptEventConsumer fired — VBScript/JScript WMI backdoor triggeredCRITICAL
cmd.exe /Q /c ... \\127.0.0.1\ADMIN$\__impacket wmiexec output redirect pattern — confirms use of open-source WMI frameworkCRITICAL
dllhost.exe inbound network connectionDCOM server process receiving remote invocation — potential DCOM lateral movementHIGH
mmc.exe → cmd.exe (from remote caller)MMC20.Application DCOM lateral movement — mmc spawning shell via DCOM callHIGH
DETECTS: WMI persistence subscription creation — __EventFilter and Consumer binding events in DeviceEvents telemetry
KQL — WMI Subscription Persistence Creation
DeviceEvents | where Timestamp > ago(24h) | where ActionType == "WmiActivityEventConsumerTrace" or (ActionType == "ProcessCreated" and InitiatingProcessFileName =~ "scrcons.exe") | project Timestamp, DeviceName, AccountName, ActionType, FileName, ProcessCommandLine, InitiatingProcessFileName | order by Timestamp desc
DETECTS: impacket wmiexec pattern — cmd.exe /Q /c with ADMIN$ output redirection; also catches other WMI execution frameworks using the same pattern
KQL — impacket wmiexec Artefact Detection
DeviceProcessEvents | where Timestamp > ago(1h) | where InitiatingProcessFileName =~ "WmiPrvSE.exe" and FileName =~ "cmd.exe" and (ProcessCommandLine has "\\\\127.0.0.1\\ADMIN$\\_" or ProcessCommandLine has "/Q /c " and ProcessCommandLine has "ADMIN$") | project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessCommandLine | order by Timestamp desc
SPL — WMI Persistence & DCOM Execution
index=mde (sourcetype=DeviceEvents ActionType="WmiActivityEventConsumerTrace") OR (sourcetype=DeviceProcessEvents InitiatingProcessFileName="WmiPrvSE.exe" FileName="cmd.exe" ProcessCommandLine="*/Q /c*ADMIN$*") | table _time DeviceName AccountName ActionType FileName ProcessCommandLine InitiatingProcessFileName | sort -_time

WMI subscriptions persist in the WMI repository (C:\Windows\System32\wbem\Repository). After eradication, validate removal by querying: Get-WMIObject -Namespace root\subscription -Class __EventFilter and __EventConsumer. Both should return empty for a clean system.

🚫

03 — CONTAINMENT

IMMEDIATE ACTION
C1
Verdict & Escalation Decision
DECISION GATE
▶ Triage Verdict — Select One
CONFIRMED WmiPrvSE.exe spawning shell with encoded command; wmic /node: to internal host; WMI subscription with scrcons.exe; impacket pattern — SEV1/SEV2, isolate both source and target hosts, delete WMI subscription
PARTIAL WmiPrvSE.exe spawning legitimate admin script; wmic /node: from known SCCM/RMM tool — SEV3, verify tool inventory, cross-check change ticket
FALSE POSITIVE SCCM, Intune, or documented RMM tool invoking WMI for software inventory or patch deployment with matching change ticket — whitelist source account and host, close with documentation
C2
Isolate Affected Hosts & Remove WMI Subscription
CONTAINMENT
  • 1Isolate both the source host (where wmic /node: was executed) and the target host (where WmiPrvSE.exe spawned the shell) via MDE: Assets → Devices → [Device] → Actions → Isolate Device.
  • 2Via Live Response on the target, remove any WMI subscriptions: Get-WMIObject -Namespace root\subscription -Class __EventFilter | Remove-WMIObject and Get-WMIObject -Namespace root\subscription -Class __EventConsumer | Remove-WMIObject.
  • 3Block lateral WMI at the firewall: create a host-based firewall rule blocking inbound TCP 135 (RPC) from any host not in the approved management VLAN/subnet.
  • 4Check all devices that received inbound TCP 135 connections from the source host in the last 48 hours — lateral movement may have spread to multiple targets.
  • 5Revoke credentials used in the WMI lateral movement — force password reset for any domain account involved.
🗑

04 — ERADICATION

CLEANUP
E1
WMI Subscription Removal & Scope Assessment
ERADICATION
  • 1Enumerate all WMI subscriptions across the fleet: run the KQL query targeting DeviceEvents for WmiActivityEventConsumerTrace across the last 7 days to identify all affected hosts.
  • 2Remove subscriptions via Live Response or on-device: query and delete __EventFilter, __EventConsumer, and __FilterToConsumerBinding objects in root\subscription namespace.
  • 3Trace back to the initial access point — WMI lateral movement typically originates from an already-compromised endpoint. Identify patient zero via DeviceLogonEvents and DeviceNetworkEvents.
  • 4Assess credential exposure — WMI lateral movement with pass-the-hash requires no plaintext credentials, so any domain account that has authenticated to the source host is a potential pivot credential. Audit and reset.
  • 5Harden WMI access: restrict DCOM permissions via Component Services (dcomcnfg) — remove remote launch and activation rights from non-admin groups on sensitive hosts.
📢

05 — ESCALATION

ESCALATION PATHS
ES1
Escalation Matrix
ESCALATION
ConditionSeverityActionNotify
WMI subscription (scrcons.exe) confirmedSEV1Isolate, delete subscription, fleet-wide huntSOC Lead → CISO
impacket wmiexec pattern confirmedSEV1Isolate source + target, credential reset, scope assessmentSOC Lead → CISO
wmic /node: lateral movement to multiple hostsSEV1Contain all affected hosts, escalate to IRSOC Lead → CISO → IR Team
Single WmiPrvSE.exe shell spawn (unconfirmed)SEV2Investigate, verify source, prepare isolationSOC Lead
SCCM / documented RMM toolFPWhitelist, document, closeL3 Analyst

Stay Threat-Ready

Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.

📺 YouTube 🎤 TikTok 🐦 X / Twitter 📡 Telegram
All SOPs Blog Web App (Free)
They can't exploit you if you are the Exploit.