Detection of WMI Reconnaissance via WMIC
This brief focuses on identifying the abuse of the WMIC utility for system information discovery, a technique frequently used by adversaries to fingerprint target environments during post-exploitation.
Adversaries frequently utilize the Windows Management Instrumentation Command-line (WMIC) utility to conduct host reconnaissance and environmental discovery. By querying specific Win32 WMI classes, such as Win32_OperatingSystem, Win32_Processor, and csproduct, attackers can effectively fingerprint a host's hardware, operating system version, and system configuration. This information is vital for post-exploitation phases, allowing attackers to assess the virtualization environment, determine system privileges, and tailor follow-on malicious activities. This behavior has been observed in various campaigns, including the BlankGrabber Stealer malware. Detection efforts should focus on identifying WMIC executions that originate from anomalous parent processes or occur outside of expected administrative file paths, as these indicators differentiate malicious reconnaissance from standard administrative or inventory tasks.
Attack Chain
- Initial access is established on the victim endpoint through an undisclosed delivery mechanism.
- The attacker executes a stager or secondary payload, such as a stealer or beacon.
- The malicious process attempts to gain situational awareness of the infected environment.
- The attacker invokes wmic.exe to query sensitive system information.
- Specific Win32 classes are targeted (e.g., Win32_OperatingSystem, Win32_DiskDrive) to extract system metadata.
- The gathered information is processed by the attacker's script or binary to fingerprint the host.
- Fingerprint data is exfiltrated to attacker-controlled infrastructure for further decision-making.
- Follow-on payloads are deployed based on the discovered system architecture and configuration.
Impact
Successful reconnaissance allows attackers to tailor their payloads, optimize lateral movement, and evade security controls specific to the host configuration. While reconnaissance alone does not cause direct data destruction, it is a critical precursor to information theft and ransomware deployment in enterprise environments.
Recommendation
- Deploy the Sigma rule provided in this brief to detect suspicious WMIC executions.
- Enable Sysmon Event ID 1 or Windows Event ID 4688 to capture comprehensive process creation telemetry, including command-line arguments and parent process information.
- Establish an allowlist for known administrative applications that legitimately execute wmic.exe to reduce noise from common management scripts.
- Investigate endpoints where wmic.exe is executed by non-administrative users or uncommon parent processes, specifically those matching the T1047 technique.
Immediate actions
Deploy the Sigma detection rule to capture potential reconnaissance activity.
Threat Hunt
Search for wmic.exe process execution where the parent process is not a known system binary.
Data: Process creation events
Detection coverage 1
Detect Suspicious WMIC Reconnaissance Queries
mediumDetects the use of WMIC to query sensitive system information classes from non-standard parent processes or paths.
Detection queries are available on the platform. Get full rules →