↳ GitHub sourceAnalytics ruleHigh

WMI Spawning Suspicious Child Process (Living off the Land)

Description

Detects WmiPrvSE.exe (the WMI Provider Host) spawning high-risk processes such as PowerShell, cmd.exe, cscript, or other LOLBins. WMI requires no external tools, generates minimal disk artifacts, and can execute code on remote systems over DCOM/RPC while bypassing many controls. Tune AllowlistedCmdPatterns for known-safe management tools such as SCCM.
Rule type
Scheduled
Version
1.0.5
Declared status
Available
Query frequency
1h
Query period
1h
Trigger
gt 0

Declared MITRE coverage

Declared sources

Metadata from the source file. No dependencies inferred from KQL.

Connectors

Data types

KQL query

Original query, unchanged.

let Lookback = 1h;
let SuspiciousChildProcesses = dynamic([
  "powershell.exe", "pwsh.exe", "cmd.exe", "cscript.exe", "wscript.exe",
  "mshta.exe", "certutil.exe", "bitsadmin.exe", "regsvr32.exe",
  "rundll32.exe", "msiexec.exe", "installutil.exe", "cmstp.exe",
  "msbuild.exe", "wmic.exe", "net.exe", "net1.exe", "nltest.exe",
  "whoami.exe", "ipconfig.exe", "tasklist.exe", "schtasks.exe",
  "at.exe", "sc.exe", "reg.exe"
]);
let AllowlistedCmdPatterns = dynamic([
  "ccmexec", "SMSAgent", "MOMAgent", "nessus", "qualys"
]);
let NetworkIndicators = dynamic([
  "http://", "https://", "ftp://", "Net.WebClient",
  "DownloadString", "IEX", "Invoke-Expression", "/transfer", "-urlcache"
]);
let CredentialIndicators = dynamic([
  "lsass", "mimikatz", "sekurlsa", "dump", "sam", "ntds"
]);
let MDE_Results =
  DeviceProcessEvents
  | where Timestamp >= ago(Lookback)
  | where InitiatingProcessFileName =~ "WmiPrvSE.exe"
  | where FileName in~ (SuspiciousChildProcesses)
  | where not(ProcessCommandLine has_any (AllowlistedCmdPatterns))
  | extend
      ChildProcess       = FileName,
      ChildCmdLine       = ProcessCommandLine,
      AccountName        = InitiatingProcessAccountName,
      AccountDomain      = InitiatingProcessAccountDomain,
      HostName           = DeviceName,
      EventTime          = Timestamp,
      NetworkActivity    = ProcessCommandLine has_any (NetworkIndicators),
      CredentialActivity = ProcessCommandLine has_any (CredentialIndicators)
  | project EventTime, HostName, AccountName, AccountDomain, ChildProcess,
      ChildCmdLine, NetworkActivity, CredentialActivity;
let SecEvent_Results =
  SecurityEvent
  | where TimeGenerated >= ago(Lookback)
  | where EventID == 4688
  | where ParentProcessName endswith "\\WmiPrvSE.exe"
  | extend ChildProcess = tostring(split(NewProcessName, "\\")[-1])
  | where ChildProcess in~ (SuspiciousChildProcesses)
  | where not(CommandLine has_any (AllowlistedCmdPatterns))
  | extend
      ChildCmdLine       = CommandLine,
      AccountName        = SubjectUserName,
      AccountDomain      = SubjectDomainName,
      HostName           = Computer,
      EventTime          = TimeGenerated,
      NetworkActivity    = CommandLine has_any (NetworkIndicators),
      CredentialActivity = CommandLine has_any (CredentialIndicators)
  | project EventTime, HostName, AccountName, AccountDomain, ChildProcess,
      ChildCmdLine, NetworkActivity, CredentialActivity;
union MDE_Results, SecEvent_Results
| extend RiskScore = iif(CredentialActivity == true, 3, iif(NetworkActivity == true, 2, 1))
| sort by RiskScore desc, EventTime desc

Declared entities

HostAccountProcess

Related content

Links established from declared identifiers and solution manifests.

Source provenance

GitHub

Displayed values come from files in Azure/Azure-Sentinel. They describe the published template, not your workspace configuration.

Source identifier
3c8e5f0b-1d4a-4b69-9c2e-7f0d3a5e8b1f
Additional source files 2Solutions/Windows Security Events/Analytic Rules/WMI-Abuse.yamlsource ↗Solutions/Windows Security Events/Data/Solution_Windows Security Events.jsonsolution-membership ↗
GSTEP / CATALOG TRACKING

Added to catalog : 16 Sept 2026 · 05:49 UTC
Last change observed : 16 Sept 2026 · 05:49 UTC

GSTEP sync dates, separate from the source content’s publication dates.