Overview
impacket-secretsdump extracts credentials from Windows systems both remotely and locally. It can dump SAM hashes, LSA secrets, cached domain credentials, and the full NTDS.dit Active Directory database. Operates over SMB/RPC (ports 445/135) for remote targets or parses registry hives and database files offline.
Authentication Methods
Password
NTLM Hash (Pass-the-Hash)
Kerberos Ticket
AES Key
Remote SAM Dump
Extracts local account NTLM hashes from the remote SAM database. Requires local administrator privileges on the target.
Output format:
Format: username:RID:LMhash:NThash:::
Remote LSA Secrets
Extracted automatically alongside SAM. Contains service account passwords, DPAPI machine keys, cached domain credentials, and auto-logon passwords.
Output includes:
Cached Domain Credentials (DCC2)
LSA secrets include cached domain logons (stored as DCC2/mscachev2 hashes):
Remote NTDS.dit Dump
Dumps the entire Active Directory database from a Domain Controller. Requires Domain Admin or equivalent privileges (replication rights for DRSUAPI).
DRSUAPI Method (Default — DCSync)
Uses the Directory Replication Service protocol. Does not touch disk or create shadow copies. Stealthier than VSS.
VSS Method (Volume Shadow Copy)
Creates a Volume Shadow Copy on the DC, copies NTDS.dit and SYSTEM hive, then parses them. Noisier — writes to disk, creates event logs.
Output Flags for NTDS
Local SAM / SYSTEM / SECURITY Parsing
Parse registry hives offline without network access. Useful when you have copied hive files from a compromised machine.
Dump Hives on Target (if you have shell access)
Parse Locally
The SYSTEM hive is always required — it contains the boot key needed to decrypt SAM and SECURITY.
Local NTDS.dit Parsing
Parse a copied NTDS.dit file offline. Requires the SYSTEM hive for decryption.
SAM Hashes (NTLM)
LMhash is aad3b435b51404eeaad3b435b51404ee when LM is disabled (modern Windows default)
NThash is the NTLM hash — this is what you crack or pass
NTDS.dit Hashes
When using -just-dc (not -just-dc-ntlm), Kerberos keys are also dumped:
Cached Domain Credentials (DCC2 / mscachev2)
LSA Secrets (Plaintext)
Dump a single account from NTDS.dit without pulling the entire database:
History Hashes
Dump previous password hashes. Useful when current hash is already known or when looking for password reuse patterns.
Output appends _history0, _history1, etc.:
Pass-the-Hash
Use an NTLM hash instead of a password for authentication:
Kerberos Authentication
Use Kerberos tickets instead of passwords or hashes:
Ensure DNS resolves the DC hostname or add it to /etc/hosts. Kerberos does not work with IP addresses.
Common Use Cases
Post-Exploitation: Dump Local Hashes
DCSync: Extract Domain Hashes
Offline Analysis: Hives from Disk Image
Offline Analysis: NTDS.dit from Backup
Output to File
NTLM Hashes (SAM / NTDS)
Cached Domain Credentials (DCC2 / mscachev2)
LM Hashes (Legacy)
Hash Type Summary
Quick Reference — All Flags