NTDS.dit — Active Directory Database

Ctrl+F: NTDS.dit · NTDS · NT Directory Services · AD database · C:\Windows\NTDS · /etc/shadow equivalent

External: Internal All The Things — NTDS Dumping

NTDS.dit is the Active Directory database.

If you only remember one thing, remember this:

NTDS.dit is to Active Directory what /etc/shadow is to Linux—but much bigger and much more important.

It contains nearly everything the Domain Controller knows about the domain.


What does NTDS stand for?

NT Directory Services

The file is typically located at:

C:\Windows\NTDS\ntds.dit

It is a Microsoft Extensible Storage Engine (ESE) database.


Linux vs Windows — where hashes live

StorePlatformPathContents
/etc/shadowLinux/etc/shadowLocal password hashes
SAMWindows (local)C:\Windows\System32\config\SAMLocal users + NTLM hashes
NTDS.ditWindows (domain)C:\Windows\NTDS\ntds.ditAll domain users, groups, computers, GPO metadata, etc.

Local workstation → dump SAM + SYSTEM. Domain Controller → dump NTDS.dit + SYSTEM (not SAM for domain accounts).

Registry Hives and Linux Equivalents


What’s inside (OSCP-relevant)

  • Domain user NTLM hashes (and often Kerberos keys)
  • Computer accounts
  • Group membership
  • OU structure
  • Much of AD object data

Locked while DC runs — cannot copy directly; use VSS shadow copy, nxc backup_operator, DCSync, or backup privileges.


How to dump & parse (quick map)

MethodWhenNote
nxc -M backup_operatorSeBackupPrivilege + creds on KaliSeBackupPrivilege
diskshadow + robocopy /bOn-box evil-winrm shelldiskshadow · robocopy
impacket-secretsdump remoteAdmin/DA creds on DCsecretsdump
DCSyncReplicating privileges (not file copy)Mimikatz · secretsdump
wbadmin + SMBSeBackup + SeRestoreSeBackupPrivilege > 📌 6) Method 5 — wbadmin + SMB share (SeBackup + SeRestore)

Always need SYSTEM hive with offline NTDS parse:

impacket-secretsdump LOCAL -system SYSTEM -security SECURITY -ntds ntds.dit
secretsdump.py LOCAL -system SYSTEM -security SECURITY -ntds ntds.dit
impacket-secretsdump -system system -security SECURITY -ntds ntds.dit LOCAL -just-dc-ntlm
impacket-secretsdump -system system -ntds ntds.dit LOCAL

After dump → Credential Graph · PtH · spray · hunt DA.


OSCP mental model

Linux domain?     →  /etc/passwd + /etc/shadow (local only)
Windows workstation →  SAM + SYSTEM
Windows DC (AD)     →  NTDS.dit + SYSTEM   ← entire domain hash database