| name | hashcat |
| description | Operate hashcat — the world's fastest CPU/GPU-based password recovery tool. Use when cracking password hashes obtained during a pentest, CTF, or red team engagement, when the user asks about offline password cracking, hash identification, rule-based attacks, mask attacks, combinator attacks, or integrating hashcat with secretsdump/mimikatz output. Covers installation with GPU drivers, all attack modes (-a 0/1/3/6/7), hash types (-m), rule engines, mask charsets, potfile management, session control, brain server, distributed cracking, and end-to-end AD credential cracking workflows.
|
| license | MIT |
| metadata | {"author":"redhoundinfosec","version":"1.0","repo":"https://github.com/hashcat/hashcat"} |
hashcat Agent Skill
When to Use This Skill
Use this skill when:
- Cracking hashes captured from an AD environment (NTLM, NetNTLMv2, Kerberoast, AS-REP)
- The user asks about offline password recovery or wordlist/rule/mask attacks
- Integrating hashcat with impacket secretsdump, Responder, or mimikatz lsadump output
- Benchmarking GPU hash speeds or optimizing cracking performance
- Building custom rule sets or mask policies for targeted campaigns
What hashcat Does
hashcat is an advanced CPU and GPU accelerated password recovery utility supporting over 300
hash types. It is the de-facto standard offline cracker used in penetration testing to
recover plaintext credentials from captured hashes, enabling pass-the-hash, lateral movement,
and further AD compromise. It supports six attack modes ranging from pure dictionary to
hybrid mask attacks and includes a powerful rule engine for wordlist mutation.
Installation
Pre-built binary (recommended)
wget https://hashcat.net/files/hashcat-6.2.6.tar.gz
tar xf hashcat-6.2.6.tar.gz
cd hashcat-6.2.6/
./hashcat --version
sudo apt install hashcat
GPU drivers (critical for performance)
sudo apt install nvidia-driver nvidia-cuda-toolkit
./hashcat -I
sudo apt install rocm-opencl-runtime
./hashcat --force
Docker (CPU-only)
docker run --rm -it dizcza/docker-hashcat hashcat --version
docker run --rm --gpus all -v $(pwd):/data dizcza/docker-hashcat hashcat \
-m 1000 /data/hashes.txt /data/rockyou.txt
Core Concepts
Attack Modes (-a)
| Mode | Name | Description |
|---|
-a 0 | Dictionary | Wordlist ± rules |
-a 1 | Combinator | Concat two wordlists |
-a 3 | Brute-force/Mask | Positional charsets |
-a 6 | Hybrid wordlist+mask | Word then mask suffix |
-a 7 | Hybrid mask+wordlist | Mask prefix then word |
Hash Types (-m) — Common Pentest Values
-m | Hash Type | Example context |
|---|
0 | MD5 | Web app databases |
100 | SHA-1 | Legacy apps |
1000 | NTLM | Windows SAM / NTDS |
1400 | SHA-256 | Linux shadow ($5$) |
1800 | sha512crypt | Linux shadow ($6$) |
3200 | bcrypt | Modern web apps |
5500 | NetNTLMv1 | Responder capture |
5600 | NetNTLMv2 | Responder capture |
13100 | Kerberoast (TGS-REP) | SPN ticket cracking |
18200 | AS-REP Roasting | No-preauth accounts |
19600 | Kerberos 5 TGT (etype 17) | AES-128 TGT |
19700 | Kerberos 5 TGT (etype 18) | AES-256 TGT |
22000 | WPA-PBKDF2-PMKID | Wi-Fi |
2500 | WPA/WPA2 (old format) | .hccapx |
Mask Charsets
| Token | Charset |
|---|
?l | abcdefghijklmnopqrstuvwxyz |
?u | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
?d | 0123456789 |
?s | Special characters (32 symbols) |
?a | ?l + ?u + ?d + ?s (all printable) |
?h | 0-9a-f (hex lowercase) |
?H | 0-9A-F (hex uppercase) |
CLI Reference
Dictionary Attack (-a 0)
hashcat -m 1000 hashes.txt /usr/share/wordlists/rockyou.txt
hashcat -m 1000 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 1000 hashes.txt rockyou.txt \
-r rules/best64.rule -r rules/toggles1.rule
hashcat -m 1000 hashes.txt rockyou.txt \
-r /opt/OneRuleToRuleThemAll/OneRuleToRuleThemAll.rule
hashcat -m 1000 hashes.txt rockyou.txt -r rules/dive.rule
Mask Attack (-a 3)
hashcat -m 1000 hashes.txt -a 3 ?l?l?l?l?l?l?l?l
hashcat -m 1000 hashes.txt -a 3 ?u?l?l?l?l?d?d?s
hashcat -m 1000 hashes.txt -a 3 --increment --increment-min 6 \
--increment-max 10 ?a?a?a?a?a?a?a?a?a?a
hashcat -m 1000 hashes.txt -a 3 -1 ?u?l ?1?l?l?l?l?l?d?d?d?d
hashcat -m 1000 hashes.txt -a 3 -1 "?u?l" -2 "?d!" ?1?1?1?1?2?2
Combinator Attack (-a 1)
hashcat -m 1000 hashes.txt -a 1 words1.txt words2.txt
hashcat -m 1000 hashes.txt -a 1 words1.txt words2.txt \
-j 'c' -k '$1'
Hybrid Attacks (-a 6 / -a 7)
hashcat -m 1000 hashes.txt -a 6 rockyou.txt ?d?d?d?s
hashcat -m 1000 hashes.txt -a 7 ?d?d?d?s rockyou.txt
Performance Flags
hashcat -m 1000 hashes.txt rockyou.txt -O
hashcat -m 1000 hashes.txt rockyou.txt -w 3
hashcat -m 1000 hashes.txt rockyou.txt -d 1
hashcat -m 1000 hashes.txt rockyou.txt --gpu-temp-abort 90
hashcat -m 1000 hashes.txt rockyou.txt --status --status-timer 10
Session Management
hashcat -m 1000 hashes.txt rockyou.txt --session mysession
hashcat --session mysession --restore
ls ~/.local/share/hashcat/sessions/
Potfile Management
hashcat -m 1000 hashes.txt --show
hashcat -m 1000 hashes.txt rockyou.txt -o cracked.txt
hashcat -m 1000 hashes.txt rockyou.txt -o cracked.txt --outfile-format 2
hashcat -m 1000 hashes.txt rockyou.txt --potfile-disable
hashcat -m 1000 hashes.txt rockyou.txt --potfile-path ./engagement.potfile
Benchmark Mode
hashcat -b
hashcat -b -m 1000
hashcat -b -m 3200
Rule-Based Attacks
Hashcat rules are single-character transformations applied to each word in a wordlist.
Built-in Rule Files (Kali: /usr/share/hashcat/rules/)
| File | Rules | Use Case |
|---|
best64.rule | 64 | Fast, high-value mutations |
rockyou-30000.rule | 30k | Broad coverage |
dive.rule | 99k+ | Exhaustive, slow |
toggles1-5.rule | varies | Case toggling |
leetspeak.rule | ~20 | e→3, a→@, etc. |
unix-ninja-leetspeak.rule | ~60 | Extended leet |
OneRuleToRuleThemAll
git clone https://github.com/NotSoSecure/password_cracking_rules /opt/OneRuleToRuleThemAll
hashcat -m 1000 hashes.txt rockyou.txt \
-r /opt/OneRuleToRuleThemAll/OneRuleToRuleThemAll.rule
Custom Rule Syntax
: No-op (identity)
l Lowercase all
u Uppercase all
c Capitalize first
C Lowercase first, uppercase rest
t Toggle all
T N Toggle char at position N
r Reverse
d Duplicate
p N Append word N times
$X Append character X
^X Prepend character X
[ ] Delete first / last char
{ } Rotate left / right
D N Delete char at position N
i N X Insert char X at position N
o N X Overwrite char at position N with X
Generate rules with hashcat --generate-rules
hashcat --generate-rules 1000 --generate-rules-seed 12345 > custom.rule
hashcat -m 1000 hashes.txt rockyou.txt -r custom.rule
Common Workflows
AD Credential Cracking Pipeline (secretsdump → hashcat)
impacket-secretsdump -just-dc-ntlm DOMAIN/admin@dc01.corp.local \
-outputfile ntds_dump
cut -d: -f4 ntds_dump.ntds > ntlm_hashes.txt
hashcat -m 1000 ntlm_hashes.txt rockyou.txt -O -w 3
hashcat -m 1000 ntlm_hashes.txt rockyou.txt \
-r rules/best64.rule -r rules/d3ad0ne.rule -O -w 3
hashcat -m 1000 ntlm_hashes.txt -a 6 \
/usr/share/wordlists/rockyou.txt ?d?d?d?d?s -O
hashcat -m 1000 ntlm_hashes.txt --show | tee cracked_ntlm.txt
Kerberoasting Crack
impacket-GetUserSPNs -request DOMAIN/user:pass@dc01 \
-outputfile kerberoast_hashes.txt
hashcat -m 13100 kerberoast_hashes.txt rockyou.txt \
-r rules/best64.rule -O -w 3
hashcat -m 19700 kerberoast_hashes.txt rockyou.txt -O
AS-REP Roasting Crack
hashcat -m 18200 asrep_hashes.txt rockyou.txt \
-r rules/best64.rule -O -w 3
NetNTLMv2 (Responder Capture)
hashcat -m 5600 responder_hashes.txt rockyou.txt \
-r rules/best64.rule -O -w 3
bcrypt Cracking (slow but necessary)
hashcat -m 3200 bcrypt_hashes.txt targeted_wordlist.txt \
-r rules/best64.rule -w 3
Advanced Techniques
Brain Server (deduplication across distributed clients)
hashcat --brain-server --brain-password secret123
hashcat -m 1000 hashes.txt rockyou.txt \
--brain-client --brain-server 192.168.1.10 \
--brain-client-features 3 --brain-password secret123
Distributed Cracking (keyspace splitting)
hashcat -m 1000 hashes.txt -a 3 ?a?a?a?a?a?a?a?a \
--keyspace
hashcat -m 1000 hashes.txt -a 3 ?a?a?a?a?a?a?a?a \
--skip 0 --limit 1800000000000
hashcat -m 1000 hashes.txt -a 3 ?a?a?a?a?a?a?a?a \
--skip 1800000000000 --limit 1800000000000
Prince Attack (with princeprocessor)
git clone https://github.com/hashcat/princeprocessor
cd princeprocessor/src && make
./pp64.bin --pw-min 6 --pw-max 10 < wordlist.txt | \
hashcat -m 1000 hashes.txt --stdin
Loopback Attack (crack → feed cracked back as wordlist)
hashcat -m 1000 hashes.txt rockyou.txt \
-r rules/best64.rule --loopback
Create Targeted Wordlist from OSINT
cewl https://target.corp.com -d 2 -m 6 -w target_words.txt
hashcat -m 1000 hashes.txt target_words.txt \
-r rules/best64.rule -r rules/leetspeak.rule
Integration with Other Tools
secretsdump (Impacket)
impacket-secretsdump DOMAIN/admin@dc01.corp.local -just-dc-ntlm \
-outputfile dump
impacket-secretsdump -system SYSTEM -ntds ntds.dit LOCAL
mimikatz NTLM output
hashcat -m 1000 ntlm_from_mimi.txt rockyou.txt -O
Responder integration
cat /usr/share/responder/logs/*NTLMv2*.txt > all_netntlmv2.txt
hashcat -m 5600 all_netntlmv2.txt rockyou.txt \
-r rules/best64.rule -O -w 3
Identify hash type with hashid / haiti
pip install hashid
hashid '$6$rounds=656000$Gu6bJBZMKOwf1T8c$...'
hashid 'aad3b435b51404eeaad3b435b51404ee'
gem install haiti-hash
haiti '5f4dcc3b5aa765d61d8327deb882cf99'
Troubleshooting
No OpenCL devices found / clGetPlatformIDs() failed
sudo apt install ocl-icd-opencl-dev opencl-headers
hashcat -I
Token length exception
hashcat -m 5600 hash.txt wordlist.txt --hex-salt
Cracked but --show shows nothing
hashcat -m 1000 hashes.txt --show --potfile-path ./engagement.potfile
Speed drops during attack
nvidia-smi -l 1
Status: Exhausted with 0 cracked
iconv -f latin1 -t utf8 wordlist.txt -o wordlist_utf8.txt
Built by Red Hound InfoSec — On-demand offensive security expertise for SMBs.
20+ years of Fortune 500 experience. Penetration testing, attack surface analysis, and security consulting.
Related reading: 5 Active Directory Misconfigurations We See in Every Engagement
redhound.us | GitHub | Book a consultation