A Windows SAM database dump sits before you, containing encrypted password hashes from a corporate network. The NTLM hashes hold the keys to user accounts and potentially sensitive information. With the right tools and wordlists, can you crack these hashes and uncover what's hidden inside?
Download the SAM hash dump from the challenge page:
wget https://lab.hdna.me/142-windows-password-cracker/sam_hashes.txt
View the contents of the SAM hash file to understand the format:
cat sam_hashes.txt
The format is: username:RID:LM_hash:NTLM_hash:::
The NTLM hash is in the 4th field (the second long hash). These are MD4 hashes of the user passwords.
For easier cracking, extract just the NTLM hashes (4th field):
cut -d: -f4 sam_hashes.txt > ntlm_hashes.txt cat ntlm_hashes.txt
Hashcat is a powerful GPU-accelerated password cracker. NTLM hashes use mode 1000:
Using SecLists 10k-most-common.txt for a quick first pass:
hashcat -m 1000 ntlm_hashes.txt /usr/share/seclists/Passwords/Common-Credentials/10k-most-common.txt
Or use rockyou.txt wordlist:
hashcat -m 1000 ntlm_hashes.txt /usr/share/wordlists/rockyou.txt
Show cracked passwords:
hashcat -m 1000 ntlm_hashes.txt --show
Alternatively, use John the Ripper with the raw NTLM format:
Using SecLists for quick results:
john --format=NT ntlm_hashes.txt --wordlist=/usr/share/seclists/Passwords/Common-Credentials/10k-most-common.txt
Or use rockyou.txt:
john --format=NT ntlm_hashes.txt --wordlist=/usr/share/wordlists/rockyou.txt
Show cracked passwords:
john --format=NT ntlm_hashes.txt --show
Once you've cracked the hashes, match them back to the original usernames in sam_hashes.txt:
Cracked Credentials:
The password for the secretuser account is the flag: TOPSECRET
You can also crack hashes directly from the SAM dump format using john:
john --format=NT sam_hashes.txt --wordlist=/usr/share/seclists/Passwords/Common-Credentials/10k-most-common.txt
NTLM Hash Details:
| Hash | Status |
|---|---|
31d6cfe0d16ae931b73c59d7e0c089c0 |
Empty/blank password (Administrator) |
823893adfad2cda6e1a414f3ebdf58f7 |
Weak password - user: Guest (password: guest) |
69bf94898385467264708f3cc51cf0a4 |
Username as password - user: john (password: john) |
a9fdfa038c4b75ebc76dc855dd74f0da |
Common password - user: admin (password: password123) |
5fc5d15aac645ea16c1d363ab539724e |
Target password - user: secretuser (TOPSECRET - THIS IS THE FLAG) |
Protecting Windows Passwords:
| Tool | Purpose | Command Example |
|---|---|---|
| hashcat | GPU-accelerated NTLM cracking | hashcat -m 1000 hashes.txt wordlist.txt |
| john | CPU-based NTLM cracking | john --format=NT hashes.txt |
| cut | Extract specific fields | cut -d: -f4 sam_hashes.txt |
| SecLists | Password wordlists collection | git clone https://github.com/danielmiessler/SecLists.git |
Choose how you want to get started
Choose a username to get started
We've sent a 9-character code to your email