NTDS.dit Extraction & Analysis

🎯 Overview

NTDS.dit (NT Directory Services Directory Information Tree) is the holy grail of Active Directory attacks. This file contains:

  • Every domain user's password hash

  • Group memberships and permissions

  • Kerberos keys and authentication data

  • Complete domain schema information

"If this file can be captured, we could potentially compromise every account on the domain"

πŸ—οΈ Active Directory Authentication Architecture

Domain Authentication Flow

User Login β†’ LSASS.exe β†’ Authentication Packages β†’ NTLM/Kerberos β†’ AD Directory Services

Key Points

  • Domain-joined systems authenticate against Domain Controller, not local SAM

  • Local accounts still accessible with hostname\username or .\username

  • NTDS.dit location: %systemroot%\ntds\NTDS.dit (usually C:\Windows\NTDS\NTDS.dit)

πŸ” Username Enumeration and Discovery

OSINT for Employee Discovery

Username Generation with Username Anarchy

Username Enumeration with Kerbrute

πŸ—‘οΈ Password Attacks Against Active Directory

Dictionary Attacks with NetExec

Kerbrute Password Attacks

🎫 NTDS.dit Extraction Methods

Method 1: NetExec ntdsutil Module (Fastest)

Method 2: Manual VSS (Volume Shadow Copy)

Method 3: Impacket secretsdump

πŸ”“ Hash Cracking and Analysis

Hash Format Understanding

Extracting and Cracking Jennifer Stapleton's Hash

Bulk Hash Processing

βš”οΈ Pass-the-Hash Attacks

When Cracking Fails

πŸ† Complete HTB Academy Attack Workflow

Phase 1-2: Discovery and Enumeration

Phase 3-4: Password Attack and NTDS Extraction

Phase 5: Hash Cracking

πŸ“‹ Quick Reference Commands

Discovery

NTDS.dit Extraction

Hash Analysis

🎯 HTB Academy Answer Key

Based on the complete walkthrough:

  1. NTDS.dit file name: NTDS.dit

  2. Administrator NT hash: 64f12cddaa88057e06a81b54e73b949b

  3. John Marston credentials: jmarston:P@ssword!

  4. Jennifer Stapleton password: Winter2008

πŸ’‘ Key Takeaways

  1. OSINT drives success - Real employee names lead to valid usernames

  2. Username enumeration first - Validate targets before password attacks

  3. NTDS.dit = domain ownership - Every account's hash in one file

  4. NetExec ntdsutil - Fastest extraction method

  5. VSS understanding - Manual method for deeper control

  6. Pass-the-Hash - Use hashes when cracking fails

  7. Complete methodology - From OSINT to domain compromise


This guide covers the complete NTDS.dit attack methodology as demonstrated in HTB Academy's Password Attacks module.

Last updated