Credential dumping is easy. Cracking what you dump is where most people get stuck.
Mimikatz hands you hashes. BloodHound shows you attack paths. But if those hashes are NTLM and the account has a decent password, you’re not moving anywhere until you crack them. That’s Hashcat’s job — and it’s very good at it.
Hashcat is the fastest CPU and GPU-based password cracker available. It supports over 300 hash types, runs on Windows and Linux, scales across multiple GPUs, and has an attack mode for every situation from simple dictionary attacks to sophisticated rule-based mangling.
This guide covers everything: installation, hash identification, every attack mode, wordlists, rules, GPU setup, and practical red team workflows.
What Is Hashcat?
Hashcat is an open-source password recovery tool that cracks hashes by computing candidate passwords and comparing them against target hashes. Unlike older tools like John the Ripper, Hashcat offloads computation to the GPU, which can process billions of hash comparisons per second.
Key stats for context:
- NTLM hashes: 100+ billion per second on a modern gaming GPU
- bcrypt (cost 10): ~25,000 per second (by design — slow hash)
- MD5: 60+ billion per second
- SHA-256: 10+ billion per second
The gap between hash types matters enormously. NTLM is fast to crack. bcrypt is designed to be slow. Know what you’re dealing with before choosing your attack strategy.
GitHub: https://github.com/hashcat/hashcat
Docs: https://hashcat.net/wiki/
Installation
Kali Linux (pre-installed)
Hashcat ships with Kali. Check your version:
hashcat --version
Update to the latest if needed:
sudo apt update && sudo apt install -y hashcat
Ubuntu / Debian
sudo apt update && sudo apt install -y hashcat
For the latest version (apt often lags), install from GitHub releases:
wget https://github.com/hashcat/hashcat/releases/latest/download/hashcat-6.x.x.7z
7z x hashcat-6.x.x.7z
cd hashcat-6.x.x
sudo cp hashcat.bin /usr/local/bin/hashcat
sudo chmod +x /usr/local/bin/hashcat
Windows
Download the Windows binary from https://hashcat.net/hashcat/ and extract. Run from PowerShell or CMD.
OpenCL / GPU Drivers (Linux)
For GPU acceleration on Linux, you need OpenCL drivers. For NVIDIA:
sudo apt install -y nvidia-opencl-dev ocl-icd-libopencl1
Verify GPU detection:
hashcat -I
This lists all detected devices — CPUs and GPUs. If your GPU shows up, you’re ready to accelerate.
Hash Identification
Before cracking, you need to know what you’re cracking. Hashcat won’t do this for you — that’s what hashid and hash-identifier are for.
hashid
pip3 install hashid
hashid '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy'
Output:
Analyzing '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy'
[+] Blowfish(OpenBSD) [JtR Format: bcrypt]
[+] Woltlab Burning Board 4.x
[+] bcrypt
hash-identifier
hash-identifier
# Paste your hash and press enter
Common Hash Formats You’ll See on Engagements
| Format | Example | Hashcat Mode (-m) |
|---|---|---|
| NTLM | aad3b435b51404eeaad3b435b51404ee | 1000 |
| NTLMv1 | u4-netntlm::kNS:338... | 5500 |
| NTLMv2 | Admin::N46iSNekpT:... | 5600 |
| Net-NTLMv2 | (from Responder) | 5600 |
| MD5 | 5f4dcc3b5aa765d61d8327deb882cf99 | 0 |
| SHA-1 | 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 | 100 |
| SHA-256 | 5e884898da... | 1400 |
| bcrypt | $2a$10$... | 3200 |
| WPA/WPA2 | .hccapx file | 22000 |
| SHA-512crypt | $6$... (Linux /etc/shadow) | 1800 |
| Kerberos 5 TGS | (from Kerberoasting) | 13100 |
| AS-REP | (from AS-REP roasting) | 18200 |
| DPAPI | (from Windows credential stores) | 15300 |
Attack Modes
Hashcat has six core attack modes. Each fits a different scenario.
Mode 0: Straight (Dictionary Attack)
The simplest and most common mode. You supply a wordlist; Hashcat hashes each word and compares.
hashcat -m 1000 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt
When to use: First pass on any hash set. Fast, low resource use, effective against weak passwords.
Mode 1: Combination Attack
Takes two wordlists and concatenates every word from list1 with every word from list2.
hashcat -m 1000 -a 1 hashes.txt wordlist1.txt wordlist2.txt
Example output combinations:
password+123→password123admin+2026→admin2026
When to use: Targeting passwords built from two common words (very common in corporate environments).
Mode 3: Brute-Force / Mask Attack
Generates candidates based on a character mask. More targeted than pure brute-force.
# 8-char alphanumeric
hashcat -m 1000 -a 3 hashes.txt ?a?a?a?a?a?a?a?a
# Common pattern: Capital + 6 lowercase + digit + special
hashcat -m 1000 -a 3 hashes.txt ?u?l?l?l?l?l?l?d?s
Mask character sets:
| Mask | Character set |
|---|---|
?l | abcdefghijklmnopqrstuvwxyz |
?u | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
?d | 0123456789 |
?s | !"#$%&’()*+,-./:;<=>?@[]^_`{ |
?a | All of the above |
?b | 0x00–0xff (all bytes) |
Custom character sets:
# Define ?1 as digits+special, ?2 as lowercase
hashcat -m 1000 -a 3 hashes.txt -1 ?d?s -2 ?l ?2?2?2?2?1?1
When to use: When you know the password policy (length, complexity requirements). Very effective for 6–9 char passwords with known structure.
Mode 6: Hybrid Wordlist + Mask
Combines a wordlist with a mask appended to each word.
# Append 1-4 digits to every word in rockyou
hashcat -m 1000 -a 6 hashes.txt rockyou.txt ?d?d?d?d
Common outputs:
password→password2024,password1!
When to use: Catching users who took a dictionary word and added numbers/symbols at the end (extremely common behavior).
Mode 7: Hybrid Mask + Wordlist
Mask prepended to wordlist words.
# Prepend 2-digit year to every word
hashcat -m 1000 -a 7 hashes.txt ?d?d rockyou.txt
When to use: Catching passwords like 2026password, 99admin.
Mode 9: Association Attack
Uses metadata (username, email, etc.) to generate candidates tailored to each hash.
hashcat -m 5600 -a 9 hashes.txt passwords.txt
When to use: When you have per-user context. Users often use their name or username in their password.
Wordlists
Your wordlist is your ammo. The right wordlist for the right situation matters.
rockyou.txt
The classic. 14 million real-world passwords from the 2009 RockYou breach. Ships with Kali at /usr/share/wordlists/rockyou.txt.
# If gzipped:
gunzip /usr/share/wordlists/rockyou.txt.gz
SecLists
The most comprehensive collection of wordlists for security testing. Includes passwords, usernames, fuzzing lists, and more.
sudo apt install -y seclists
# Location: /usr/share/seclists/
Key password lists in SecLists:
/usr/share/seclists/Passwords/Common-Credentials/10-million-password-list-top-1000000.txt/usr/share/seclists/Passwords/darkweb2017-top10000.txt/usr/share/seclists/Passwords/Leaked-Databases/
Custom Wordlists with CeWL
For targeted attacks, generate a wordlist from the target’s website:
cewl https://targetcompany.com -d 3 -m 6 -w company_wordlist.txt
This scrapes the site and builds a wordlist from words found — often capturing company names, product names, and jargon that employees use in passwords.
Combining Wordlists
cat rockyou.txt company_wordlist.txt > combined.txt
sort -u combined.txt > combined_dedup.txt
Rules
Rules transform wordlist candidates on the fly — adding, removing, or substituting characters without pre-generating millions of variants. This is where Hashcat gets surgical.
Rules ship with Hashcat at rules/.
ls /usr/share/hashcat/rules/
# best64.rule, rockyou-30000.rule, d3ad0ne.rule, dive.rule, ...
Common Built-in Rules
# Apply best64 rules to rockyou
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule
# More aggressive — dive.rule
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/dive.rule
# Stack two rule files
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -r rules/best64.rule -r rules/toggles1.rule
Rule Syntax
Rules are single-character functions applied left to right to each candidate:
| Rule | Effect | Example |
|---|---|---|
l | Lowercase all | Password → password |
u | Uppercase all | password → PASSWORD |
c | Capitalize first | password → Password |
r | Reverse | password → drowssap |
d | Duplicate | pass → passpass |
$1 | Append 1 | password → password1 |
^! | Prepend ! | password → !password |
so0 | Substitute o→0 | password → passw0rd |
sa@ | Substitute a→@ | password → p@ssword |
Writing Custom Rules
Create a file custom.rule:
# Common corporate patterns
c$!
c$1$2$3
c$2$0$2$6
$1$2$3$!
so0sa@se3si1
hashcat -m 1000 -a 0 hashes.txt company_wordlist.txt -r custom.rule
Practical Red Team Scenarios
Cracking NTLM Hashes (from Mimikatz/Secretsdump)
After running Mimikatz or secretsdump, you get NTLM hashes like:
Administrator:500:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c:::
Extract just the NTLM portion (after the last aad3b435...:):
# Extract hashes from secretsdump output
grep -oP '(?<=:::).*(?=:)' secretsdump_output.txt | sort -u > ntlm_hashes.txt
# Or use CrackMapExec's --ntds output format directly
hashcat -m 1000 -a 0 ntlm_hashes.txt rockyou.txt -r rules/best64.rule
Cracking NTLMv2 (from Responder)
After capturing Net-NTLMv2 hashes with Responder:
hashcat -m 5600 -a 0 /usr/share/responder/logs/NTLMv2-*.txt rockyou.txt -r rules/best64.rule
Cracking Kerberoasted Hashes
After extracting Kerberos TGS tickets with Rubeus or Impacket:
hashcat -m 13100 -a 0 kerberoast_hashes.txt rockyou.txt -r rules/best64.rule
Cracking AS-REP Hashes
For accounts without Kerberos pre-auth required:
hashcat -m 18200 -a 0 asrep_hashes.txt rockyou.txt -r rules/best64.rule
Cracking WPA2 Handshakes
After capturing a WPA2 handshake with aircrack-ng or hcxdumptool, convert to Hashcat format:
# Convert .cap to .hc22000
hcxpcapngtool -o handshake.hc22000 capture.cap
hashcat -m 22000 -a 0 handshake.hc22000 rockyou.txt -r rules/best64.rule
Cracking Linux /etc/shadow
# Example shadow entry:
# root:$6$rounds=5000$saltsalt$hash...:...
hashcat -m 1800 -a 0 shadow_hashes.txt rockyou.txt
GPU Cracking: Setup and Performance
Your local GPU is good. A cloud GPU is better when you need throughput.
Local GPU Optimization
Force GPU only (skip CPU):
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -D 2
# -D 1 = CPU, -D 2 = GPU, omit for auto
Tune workload for sustained performance:
# -w 3 = high performance (may cause GPU heat)
# -w 4 = nightmare (maximum — watch temps)
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -w 3
Monitor GPU utilization:
watch -n 1 nvidia-smi
Cloud GPU for Large Hash Sets
When you have a large dump — tens of thousands of NTLM hashes — a cloud GPU instance will crack significantly faster than a local machine, and you can spin it up only when you need it.
Vultr offers GPU compute instances (NVIDIA A16, A100) on-demand, by the hour. Spin one up, run your session, destroy it. No idle spend.
DigitalOcean has GPU Droplets (H100) for high-throughput cracking workloads. Useful when you need maximum speed on bcrypt or other slow hashes where the GPU parallelism matters most.
Cloud cracking workflow:
# 1. Spin up GPU instance on Vultr or DigitalOcean
# 2. Install Hashcat + NVIDIA drivers
sudo apt update && sudo apt install -y hashcat nvidia-driver-535
# 3. Upload your hashes and wordlists
scp hashes.txt wordlists.zip root@<gpu-ip>:/root/
# 4. Run Hashcat
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -r rules/best64.rule -O
# 5. Download results
scp root@<gpu-ip>:/root/hashcat.potfile ./cracked.txt
# 6. Destroy the instance
The -O flag enables optimized kernels — often 10–20% faster at the cost of limiting max password length to 32 chars (fine for most cases).
Multi-GPU Cracking
If you have multiple GPUs, Hashcat uses them all by default:
# Verify all GPUs detected
hashcat -I
# Force specific devices
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -d 1,2,3
Session Management
Long crack jobs? Don’t babysit them.
# Named session — survives terminal close
hashcat -m 1000 -a 0 hashes.txt rockyou.txt --session mysession
# Restore a session
hashcat --session mysession --restore
# Check status of running session
# Press 's' while running for status
# Press 'p' to pause, 'r' to resume, 'q' to quit (saves progress)
Output and Post-Processing
Viewing Cracked Passwords
# Show all cracked from potfile
hashcat -m 1000 --show hashes.txt
# Format: hash:password
hashcat -m 1000 --show hashes.txt --username
# Format: username:hash:password (when hashes include usernames)
The potfile (~/.local/share/hashcat/hashcat.potfile) stores all previously cracked hashes. Hashcat skips hashes already in the potfile on subsequent runs — saves time on repeated operations.
Mapping Cracked Hashes Back to Users
When you have output from secretsdump with usernames:
# secretsdump format: DOMAIN\user:RID:LMhash:NThash:::
# Crack just the NT hashes, then map back:
# Extract user:NThash pairs
grep -oP '\\[^:]+:\d+:[^:]+:\K[^:]+(?=:::)' secretsdump.txt | paste - <(grep -oP '(?<=\\)[^:]+(?=:\d+)' secretsdump.txt) > user_hash_map.txt
# After cracking, cross-reference potfile
while IFS=: read hash password; do
user=$(grep "$hash" user_hash_map.txt | awk '{print $2}')
echo "$user:$password"
done < <(hashcat --show -m 1000 nt_hashes.txt | tr ':' '\n' | paste - -)
Common Options Reference
| Option | Description |
|---|---|
-m | Hash type (e.g., -m 1000 for NTLM) |
-a | Attack mode (0=dict, 1=combo, 3=mask, 6=hybrid) |
-r | Rule file |
-w | Workload profile (1-4, default 2) |
-O | Optimized kernel (faster, max 32-char limit) |
-D | Device types (1=CPU, 2=GPU) |
-d | Specific device IDs |
--session | Named session for resume |
--restore | Resume named session |
--show | Display cracked hashes from potfile |
--username | Hash files include usernames |
--force | Ignore warnings (use on VMs with no GPU) |
-o | Output file for cracked passwords |
--outfmt | Output format (0=hash, 2=plain, 3=hash:plain) |
--increment | Auto-increment mask length |
--increment-min | Minimum length for increment mode |
--increment-max | Maximum length for increment mode |
--status | Enable periodic status updates |
--status-timer | Status update interval (seconds) |
Red Team Workflow Integration
Here’s how Hashcat fits into a real engagement:
Phase 1 — Initial Access
- Capture Net-NTLMv2 hashes via Responder or mitm6
- Crack with mode 5600 → dictionary + rules
- Cracked credentials = valid domain access
Phase 2 — Post-Exploitation
- Dump NTLM hashes via Mimikatz, secretsdump, or CrackMapExec
- Pass-the-Hash for lateral movement (no cracking needed)
- Crack remaining hashes for password spray across other services (VPN, email, Citrix)
Phase 3 — Privilege Escalation
- Kerberoast service accounts → mode 13100
- AS-REP roast pre-auth disabled accounts → mode 18200
- Higher-privilege accounts often have weaker passwords (service accounts especially)
Phase 4 — Credential Reuse
- Many orgs have password reuse across on-prem AD and cloud (Azure, AWS)
- Cracked AD password → try against AzureAD, Okta, O365
- Use cracked passwords in password spray against externally exposed services
Troubleshooting
“No devices found” — OpenCL drivers not installed or GPU not recognized. Run hashcat -I. On VMs without GPU passthrough, use --force to run on CPU.
“Temperature limit reached” — GPU overheating. Reduce workload: -w 1 or -w 2. Add cooling. Cloud GPU instances handle this better than laptops.
“ATTENTION! ‘Markov’ is currently not supported” — Not an error, just informational on some hash modes.
“Exhausted” — Your wordlist + rules didn’t crack the hash. Try a different wordlist, more aggressive rules, or brute-force mode 3.
Potfile collisions — If you’re cracking a hash that’s already in your potfile from a different context, Hashcat will skip it. Use --potfile-disable to force re-cracking, or --show to retrieve the already-cracked result.
Summary
Hashcat is non-negotiable in a red teamer’s toolkit. The workflow is consistent:
- Identify your hash type (
hashidor format inspection) - Choose your attack mode (dictionary first, rules second, brute-force for short/structured passwords)
- Pick your wordlist (rockyou → SecLists → custom → combined)
- Run, check status, pivot strategy if exhausted
- Map cracked credentials back to users
- Weaponize them in your engagement
GPU matters. Even a mid-range gaming GPU crushes CPU performance on fast hashes like NTLM. For large dumps or tight timelines, a cloud GPU instance on Vultr or DigitalOcean is worth the few dollars it costs to run for a few hours.
Master the attack modes. Build a rules library. Keep your wordlists updated.
Need a Professional Pentest Report?
If you’re running engagements and need polished reports that clients actually read, check out CipherWrite — technical writing for security professionals.
