← Back to SOC feed Coverage →

detect-office-products-spawning-wmic

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
backdoorhuntingmicrosoftofficialwmi
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-20T23:00:01Z · Confidence: medium

Hunt Hypothesis

Adversaries may use WMIC to execute arbitrary commands and maintain persistence within a network. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential compromise from advanced threats leveraging WMI for command and control.

KQL Query

// Office products spawning WMI
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "outlook.exe")
and FileName =~"wmic.exe"

Analytic Rule Definition

id: 2c0a068e-b30c-4e6a-928c-f05b60c43066
name: detect-office-products-spawning-wmic
description: |
  This query was originally published in the threat analytics report, Ursnif (Gozi) continues to evolve.
  Windows Management Instrumentation, or WMI, is a legitimate Microsoft framework used to obtain management data and perform administrative tasks on remote devices. However, attackers can also use WMI to gather information about a target or hijack control of a device. The MITRE ATT&CK framework includes WMI among its list of common enterprise attack techniques.
  The following query detects when Microsoft Office software spawns an instance of the WMI command-line utility, wmic.exe.
  References:
  https://docs.microsoft.com/windows/win32/wmisdk/about-wmi
  https://attack.mitre.org/techniques/T1047/
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Execution
query: |
  // Office products spawning WMI
  DeviceProcessEvents
  | where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "outlook.exe")
  and FileName =~"wmic.exe"

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Execution/detect-office-products-spawning-wmic.yaml