Overview
Theps action enumerates running processes on local and remote systems, including process ID, name, owner, and command line. It queries the Win32_Process WMI class and invokes the GetOwner method to retrieve process ownership information.
Syntax
Parameters
Usage Examples
Example Output
Output Fields
Operational Use Cases
Scenario 1: Hunt for Admin Processes
- Processes owned by domain admins
- Privileged service accounts
- SYSTEM-owned processes
- Interactive admin sessions
Scenario 2: Detect Security Tools
- AV processes (MsMpEng.exe, AvastSvc.exe)
- EDR agents (CrowdStrike, Carbon Black)
- Monitoring tools (Sysmon)
- PowerShell activity
Scenario 3: Identify Credential Sources
- lsass.exe (credential dumping)
- Browser processes (saved passwords)
- Password managers (KeePass, 1Password)
- Database connections
Scenario 4: Post-Exploitation Verification
- Beacon is running
- Process ID and owner
- Command line arguments
- Parent process
Remote vs Local Usage
- Local Enumeration
- Remote Enumeration
- Post-exploitation enumeration
- Local process discovery
- No remote access available
- No network traffic
- No authentication required
- Faster execution
Detection Considerations
WMI Detection
WMI Detection
- WMI queries for
Win32_Processclass - GetOwner method invocations
- Event ID 5857: WMI activity
- Sysmon Event ID 19-21: WMI operations
Reconnaissance Patterns
Reconnaissance Patterns
- Process enumeration across multiple systems
- Queries from non-administrative hosts
- Bulk queries in short timeframe
- Correlation with other enumeration
Network Detection
Network Detection
- WMI/DCOM traffic on port 135
- Multiple connections from single source
Best Practices
Operational Security
- Limit query frequency
- Blend with legitimate admin activity
- Use during business hours
- Avoid bulk enumeration
Data Analysis
- Filter system processes
- Focus on user-owned processes
- Look for unusual command lines
- Identify high-value targets
Filtering Process Output
Since SharpWMI returns all processes, you may want to filter results. Here are common targets:Interesting Processes
- PowerShell:
powershell.exe,pwsh.exe - Credential Access:
lsass.exe,mstsc.exe - Security Tools:
MsMpEng.exe,cb.exe,falcon-sensor.exe - Browsers:
chrome.exe,firefox.exe,msedge.exe - Shells:
cmd.exe,conhost.exe
Troubleshooting
Access Denied
Access Denied
Cause: Insufficient privilegesSolution:
- Use
usernameandpasswordparameters - Verify admin rights on target
- Check UAC remote restrictions
Empty Owner Field
Empty Owner Field
Cause: GetOwner method failedSolution:
- Some system processes don’t have owners
- This is normal for SYSTEM processes
- Check permissions if user processes show empty
Related Actions
terminate
Kill processes by name or PID
query
Custom process queries
exec
Create new processes
loggedon
Enumerate logged-on users
Alternative Query Methods
Processes by Name
Processes by Name
Processes by Path
Processes by Path
High CPU Processes
High CPU Processes