LateralMovement
Powershell Remoting
PS Remoting is a feature in windows server just like ssh in linux where administrators can perform tasks on remote machines without having to physically be present at each machine. It uses Windows Remote Management(WinRM) port 5985 http and 5986 https.
Command to enable PSRemoting
Command to enable PSRemoting on remote machine
IF we have administrative access on another machine after use hunting
OR
TO execute commands parallely on many machines
If we have privilge to execute commands on many machines use below. Here create a file with names of computers to run commands on.
To execute scripts prallely on many machines
Similarly as above create a file with names of computers/servers to run commands on.
To evade logging by blue team we can use winrs
enable rdp access on another computer using scriptblock
Over Pass The Hash
Here, the needed aes256key, rc4 hash all can be got using mimikatz or safetykatz. Here, overpass the hash using any of the below techniques uses logon type 9 which means running whoami still shows as student1 or default username but we can access the remote resource like the domain controller simply by doing winrs -r:dcorp-dc cmd
Using Mimikatz( Needs elevation (Run as administrator))
Using safetykatz( Needs elevation (Run as administrator))
Using BetterSafetyKatz
Using rubeus(doesn't need elevation)
Using rubeus(needs elevation)
DCSync(Needs Domain Admin Privilege by default)
DCSync is a late stage kill chain attack this means an attacker has hold of a user who has Active Directory Domain replication rights, domain replication is the method of updating objects from one DC to another DC and during this process the DC returns replication data to the requester including password hashes.
DCSync to extract krbtgt hash for us domain
DCSync to extract krbtgt hash for us domain using safetykatz
DCSync to extract krbtgt hash using bettersafetykatz
If above does not work use below to get NTLM hash not AES key.
use "lsadump::lsa /patch" "exit" flag
Last updated