Enumeration With Powershell 1
Enumeration With Powershell 1
Goals
- Determine and see how many processes named “svchost” are running
on the system
- Learn how to quickly enumerate processes that would help during
incident handling.
Scenario
Requirements
- Windows VM
- PowerShell
1. Open PowerShell
2. Counting Processes
- For the first goal, you want to see how many processes named
“svchost” are running on the host. To do this, you can use the
Get-Process command to list all processes
- If you want to see how many processes are running, you can use
the pipeline and pass Get-Process to the measure command
3. Filter Processes
- The $_.Id part in the above command references the column we are
filtering on the PowerShell object. These columns are displayed
when you run Get-Process by itself. You can filter on any of
these columns.
How would you go about identifying how many svchost processes are
running on the machine?
Solution
1. Open PowerShell
- "Powershell.exe" is located in
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe", or
use the Start menu to search for PowerShell
2. List Processes
3. Filter Processes