Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / LATERAL MOVEMENT / EXEC

WMIExec

This note documents detection patterns related to WMIExec within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4624Successful logonHighNetwork logon to remote system using admin credentials.
Security4672Special privileges assignedHighAdministrative privileges used for remote execution.
Security4688Process createdCriticalProcess spawned via WMI provider on remote host.
Sysmon1Process creationCriticalcmd.exe or powershell.exe spawned by wmiprvse.exe.
Sysmon3Network connectionMediumWMI RPC communication between hosts.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
wmiprvse spawning shellwmiprvse.exe → cmd.exe or powershell.exeCriticalClassic WMIExec execution chain.
Remote process creationCommand execution initiated remotelyHighTypical lateral movement behavior.
RPC traffic between hostsDCOM/WMI traffic from attacker machineMediumSupports execution activity.

Common Tools

ToolUsage
Impacket wmiexec.pyRemote command execution via WMI.
CrackMapExecAutomated WMI command execution.
PowerShell Invoke-WmiMethodNative WMI execution technique.

Relevant Artifacts

  • Security logs (4624, 4672, 4688)
  • Sysmon process creation logs
  • RPC network telemetry
  • EDR telemetry for WMI activity
  • Prefetch artifacts

MITRE ATT&CK References

  • T1047 Windows Management Instrumentation
  • T1021.003 Remote Services: WMI

Decision Tree

  1. Detect process creation from wmiprvse.exe.
  2. Identify remote initiating host.
  3. Verify administrative authentication.
  4. Inspect executed command.
  5. Determine lateral movement spread.

Example Detection Templates

KQL

DeviceProcessEvents
| where InitiatingProcessFileName == "wmiprvse.exe"

EQL

process where parent.name == "wmiprvse.exe"

Sigma

title: Suspicious WMIExec Execution
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    ParentImage|endswith: wmiprvse.exe
  condition: selection
level: high

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
WMI restrictionsLimit remote WMI permissionsHighReduces remote execution.
MonitoringAlert on wmiprvse child processesHighStrong detection signal.
Credential hygieneLimit admin credential reuseCriticalPrevents lateral movement.