Abliteration HandbookField guide
Tools & environments

Password cracking — hashcat & ecosystem

Deep reference for offline hash recovery (hashcat, John) and online login testing (Hydra) in authorized labs — e.g. recovered AD dumps, firmware password hashes, CTF, credential audit.

3 min read 7 examples Source-linked

In this chapter
On this page Interactive companion
Personal reading progress

0/13 sections reviewed

View original Markdown
Interactive companion

Explore the chapter map

Use the visual controls alongside the complete source chapter.

Deep reference for offline hash recovery (hashcat, John) and online login testing (Hydra) in authorized labs — e.g. recovered AD dumps, firmware password hashes, CTF, credential audit.

Official: hashcat.net · Wiki: hashcat.net/wiki · GitHub: github.com/hashcat/hashcat

Current stable: 7.0.0 (2025+). Kali: apt install hashcat hashcat-data.


hashcat attack modes (-a)#

ModeNameUse
0StraightWordlist
1Combinationword1 + word2
3Brute-forceMask ?l?l?l?d?d?d?d
6Hybrid wordlist + maskword?d?d?d
7Hybrid mask + wordlist?d?d?dword
9AssociationPer-hash wordlist (file:hash)
10–13Deprecated hybridsLegacy
14Rule-basedWordlist + rules (replaces -j/-k in modern)

Mask charset#

TokenCharset
?la-z
?uA-Z
?d0-9
?hHex lowercase
?HHex uppercase
?sSpecial !"#$%...
?aAll printable
?b0x00-0xff
?1-?8Custom (-1 ?l?d)

Common hash modes (-m)#

-mAlgorithmTypical source
0MD5 rawWeb apps, CTF
100SHA1Legacy
1000NTLMWindows AD / SAM
1400SHA2-256Various
1700SHA2-512Various
1800sha512cryptLinux /etc/shadow
3200bcryptWeb apps
5500NetNTLMv1SMB capture
5600NetNTLMv2Responder / SMB
13100Kerberos 5 TGS-REPKerberoasting
18200Kerberos 5 AS-REPAS-REP roast
22000WPA-PBKDF2-PMKID+EAPOLWi-Fi (hcxtools convert)
3000LMLegacy Windows
10800sha384—
11300Bitcoin/Litecoin wallet—
13400KeePass 1—
29700KeePass 4—
34000Argon2idModern KDF

Identify unknown: hashcat --identify hash.txt

Full list: hashcat -hh or hashcat.net/wiki/doku.php?id=hashcat


Essential commands#

bash
# Backends (CUDA/OpenCL/Metal)
hashcat -I

# Benchmark NTLM on all GPUs
hashcat -b -m 1000

# Wordlist attack
hashcat -m 1000 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt

# Rules (best64)
hashcat -m 1000 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# Mask brute (8 lower + 2 digit)
hashcat -m 1000 -a 3 hashes.txt '?l?l?l?l?l?l?d?d'

# Show cracked
hashcat -m 1000 hashes.txt --show

# Resume session
hashcat --session lab_ntlm -m 1000 -a 0 hashes.txt rockyou.txt
hashcat --restore --session lab_ntlm

# WPA PMKID (after hcxtools)
hcxpcapngtool -o capture.22000 wlan.pcapng
hashcat -m 22000 capture.22000 rockyou.txt

# Distributed brain server (multi-GPU rack)
hashcat --brain-server
hashcat -z --brain-client --brain-host 10.77.0.5 -m 1000 hashes.txt rockyou.txt

Workload tuning#

FlagEffect
-w 1Low GPU utilization (desktop use)
-w 3High performance
-w 4Nightmare — max power
-OOptimized kernels (shorter max password)
--hwmon-temp-abort=85Thermal safety

Factory QA / rack: use -w 3 or -w 4 on dedicated cracking station (RTX 4090 class).


hashcat-utils & companions#

ToolRepoPurpose
hashcat-utilshashcat/hashcat-utilscombinator, cutb, len
princeprocessorhashcat/princeprocessorPRINCE wordlist gen
maskprocessorhashcat/maskprocessorMask wordlist gen
kwprocessorkeyboard walkskwprocessor
statsprocessorMarkovstatsprocessor
bash
# Combinator attack prep
combinator wordlist1.txt wordlist2.txt > combined.txt
hashcat -m 1000 -a 1 hashes.txt wordlist1.txt wordlist2.txt

John the Ripper#

bash
# Auto-detect format
john hashes.txt

# Explicit format
john --format=nt hashes.txt --wordlist=rockyou.txt

# Show cracked
john --show hashes.txt

# Rules
john --wordlist=rockyou.txt --rules=Jumbo hashes.txt

Formats: john --list=formats | grep -i ntlm


Online cracking (lab targets only)#

bash
# SSH
hydra -l admin -P pass.txt ssh://10.77.0.50 -t 4

# RDP
hydra -l administrator -P pass.txt rdp://10.77.0.10

# SMB
hydra -L users.txt -P pass.txt smb://10.77.0.0/24

# HTTP POST form
hydra -l admin -P pass.txt 10.77.0.50 http-post-form "/login:user=^USER^&pass=^PASS^:F=invalid"

# Medusa parallel
medusa -h 10.77.0.50 -U users.txt -P pass.txt -M ssh -t 10

ROE required for any online attempt. Prefer offline hashcat when hashes are available.


Wordlist generation#

bash
# Crawl site vocabulary
cewl -d 3 -m 6 https://lab-app.local/ -w cewl.txt

# Crunch pattern
crunch 10 10 -t Lab@@@@@@ -o lab_patterns.txt

# Extract from rockyou for rules testing
head -n 100000 /usr/share/wordlists/rockyou.txt > rockyou_100k.txt

Kali wordlists: /usr/share/wordlists/, /usr/share/seclists/


Firmware / factory crossover#

ScenarioApproach
BIOS setup password hashVendor-specific; often custom -m or John
ZIP firmware packagefcrackzip or hashcat -m 17200 etc.
PDF test report lockpdfcrack / hashcat PDF modes
Embedded /etc/shadow from UART dumphashcat -m 1800 or -m 500 md5crypt

Always image firmware before crack attempts on bench hardware.


Agent workflows#

Example
1. Identify hash type: hash-identifier or hashcat --identify
2. Select -m and attack: wordlist → rules → mask
3. Run hashcat -w 3 --session CASE001 ...
4. Output --show results to JSON for MES ticket
json
{
  "hash_type": "NTLM",
  "mode": 1000,
  "cracked": 3,
  "total": 10,
  "method": "rockyou + best64.rule"
}

Eval prompts#

See ../../data/eval/osint-pentest-prompts.jsonl — hashcat / hydra / john tasks.


Fetched upstream#

Regenerate: node scripts/fetch-docs.mjs → sources/fetched/hashcat-readme.txt

Trace this chapter to its source.

The complete Markdown remains the editable source. This page adds navigation, typography, and a visual companion.

docs/tools/password-cracking.md
Inspect the source fingerprintSHA-256 bf97c0030771717fbb36fde0a180b1f94ce7ad41c1f3da04ee2f5c47c4ab58c6Source commit 6fba7436a5914cad7c8f0835a14b480a29dac263