Suspicious WMI Reconnaissance via PowerShell
This analytic detects suspicious PowerShell activity leveraging WMI to gather system information, potentially indicating reconnaissance by an attacker.
This detection identifies suspicious PowerShell activity where Windows Management Instrumentation (WMI) is used to query system information. Adversaries often use WMI for reconnaissance to profile compromised machines. The detection focuses on PowerShell EventCode 4104 and identifies specific WMI queries targeting system information classes such as Win32_Bios, Win32_OperatingSystem, Win32_Processor, Win32_ComputerSystem, Win32_PnPEntity, Win32_ShadowCopy, Win32_DiskDrive, Win32_PhysicalMemory, Win32_BaseBoard, and Win32_DisplayConfiguration. This activity, if confirmed malicious, allows attackers to gather detailed system information to aid further exploitation or lateral movement within a network. The detection is based on an analytic from Splunk's security content and leverages PowerShell Script Block Logging.
Attack Chain
- The attacker gains initial access to the system, potentially through methods not directly observed by this detection.
- The attacker executes PowerShell.exe to perform reconnaissance.
- The attacker utilizes the
Get-WmiObjectcmdlet orSELECTqueries within PowerShell to interact with WMI. - The PowerShell script queries WMI classes such as
Win32_Bios,Win32_OperatingSystem, or other classes listed in the detection, to gather information about the system hardware and software. - The gathered information is processed and potentially stored or transmitted to a remote server under the attacker's control (not directly visible in this detection).
- The attacker analyzes the collected system information to identify potential vulnerabilities or weaknesses for further exploitation.
- Based on the gathered information, the attacker plans and executes lateral movement or privilege escalation attempts within the network.
- The final objective could be data exfiltration, ransomware deployment, or other malicious activities, leveraging the gathered system information.
Impact
A successful reconnaissance phase allows attackers to understand the target environment, identify vulnerabilities, and plan further actions. This can lead to data breaches, system compromise, and financial loss. While specific victim numbers are not available, organizations in various sectors are potentially at risk. Successful exploitation following reconnaissance can result in significant operational disruption and reputational damage.
Recommendation
- Enable PowerShell Script Block Logging on all endpoints to capture the necessary data for this detection, as referenced in the "how_to_implement" section.
- Deploy the Sigma rule "Detect Suspicious WMI Reconnaissance via PowerShell" to your SIEM and tune the filter list to reduce false positives in your environment.
- Investigate any alerts generated by this rule, focusing on the context of the user and the destination system (dest, user_id).
- Review the references provided for additional context on PowerShell-based attacks and WMI abuse.
Detection coverage 2
Detect Suspicious WMI Reconnaissance via PowerShell
mediumDetects PowerShell scripts using WMI to gather system information.
Detect Suspicious WMI Queries in PowerShell Script Block Logging
mediumDetects suspicious WMI queries within PowerShell script block logging, focusing on specific WMI classes indicative of reconnaissance.
Detection queries are available on the platform. Get full rules →