WMI: Source System Artifacts
WMI: Source System Artifacts Quick Reference
security.evtx:
Event ID 4648 – Logon specifying alternate credentials
Current logged-on User Name
Alternate User Name
Destination Host Name/IP
Process Name
ShimCache – SYSTEM
mstsc.exe Remote Desktop Client
BAM/DAM – SYSTEM – Last Time Executed
mstsc.exe Remote Desktop Client
AmCache.hve – First Time Executed
mstsc.exe
Prefetch – C:\Windows\Prefetch
wmic.exe-{hash}.pf
Understanding "process call create"
The command "process call create" is used within WMI to instantiate a new process on a local or remote system. It's akin to using PsExec for remote command execution but is native to Windows and leaves fewer artifacts. This command can be invoked via the command line using wmic or through PowerShell with Invoke-WmiMethod, making it a versatile tool for legitimate administration and malicious exploitation alike.
Key Source System Artifacts for WMI Activity
While WMI activity may not always generate clear, easily identifiable artifacts, certain logs and files can provide evidence of such actions:
Event Logs
Event ID 4648: Indicates the use of explicit credentials, possibly for remote WMI connections. Monitoring for logon events that precede WMI or PowerShell activity can provide context for potential lateral movement attempts.
Microsoft-Windows-WMI-Activity/Operational Log: Starting with Windows Server 2012 R2 and Windows 8.1, this log can contain valuable information about WMI activity, including provider operations and errors which could hint at malicious use.
Registry
ShimCache: Found under
SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache, this can indicate the execution ofwmic.exe, a command-line interface for WMI.BAM/DAM: Background Activity Moderator (BAM) and Desktop Activity Moderator (DAM) registry keys under
SYSTEM\CurrentControlSet\Services\bam\UserSettings\{SID}can record last execution times of binaries, includingwmic.exe.AmCache.hve: Records binaries executed on the system and can be used to identify the first time execution of WMI-related tools or scripts.
File System
Prefetch: Windows Prefetch files (
C:\Windows\Prefetch) can contain records ofwmic.exeexecution, providing timestamps that help establish a timeline of WMI command usage.
Additional Artifacts for WMI Analysis
Beyond the basic indicators, several other artifacts can help in the detection and analysis of malicious WMI activity:
PowerShell Logs: If enabled, PowerShell logging can capture the execution of WMI commands, including those that utilize "process call create". Script block logging, in particular, is invaluable for capturing the full command that was executed.
Network Forensics: Monitoring network traffic for WMI usage (typically over TCP port 135 for RPC and additional dynamic ports) can help identify remote management or lateral movement activities. Encrypted WMI traffic (via WinRM) may require additional inspection techniques.
WMI Repository: The WMI repository stores definitions for WMI classes, instances, and Event Consumers. Malicious modifications or additions to the repository can be a sign of persistence mechanisms or other unauthorized activities.
Investigating "process call create" Usage
When investigating the use of "process call create", it's essential to correlate the timing of such commands with other suspicious activities on the system or network. This includes:
Reviewing login events and session creations that precede the WMI activity.
Checking for the creation or modification of files and processes directly related to the executed command.
Analyzing subsequent network connections or security events that might indicate the purpose of the malicious process creation.
Tools and Commands for Investigation
PowerShell provides robust capabilities for querying WMI and investigating related artifacts:
Examples
Creating a Malicious Event Consumer:
This creates an event filter to trigger after the system has been up for 5 minutes and sets a command line event consumer to execute a PowerShell script, binding them together so the script runs whenever the filter's conditions are met.
Using wmic to Execute a Remote Payload:
wmic to Execute a Remote Payload:This command uses wmic to remotely create a process on the target host that launches a PowerShell script from a network share controlled by the attacker, demonstrating lateral movement or remote execution capability.
Event ID 4648
In this example, the attacker uses wmic.exe to execute a command with explicit credentials targeting another account within the domain. The use of explicit credentials and a tool like wmic.exe for process creation outside of normal administrative activity could be indicative of malicious behavior, especially when originating from unusual source addresses or atypical user accounts.
Last updated
Was this helpful?