Cracking turns an opaque hash into a usable password. Two tools matter — hashcat (GPU, modern, fast) and john (CPU, flexible, better format detection). You’ll use john’s *2john helpers to extract hashes from files, then feed them to hashcat for the actual crack.

Hash Identification First

Wrong mode = wasted hours. Confirm the format before starting.

# Hashid — pattern match
hashid '$2y$10$SKbsp0vkvSHOjuO5Q...'
 
# Hash-identifier — interactive
hash-identifier
 
# Cross-reference with the hashcat wiki
https://hashcat.net/wiki/doku.php?id=example_hashes

Common ones:

HashExample starthashcat -m
NTLM30B3783CE2ABF1AF...1000
NetNTLMv2user::DOMAIN:...:11223344556677885600
Kerberos TGS$krb5tgs$23$*SPN*$...13100
Kerberos AS-REP$krb5asrep$23$user@DOMAIN:...18200
DCC2$DCC2$10240#user#hash2100
sha512crypt$6$salt$...1800
yescrypt$y$j9T$salt$...29700
bcrypt$2a$/2y$/2b$3200
MD55f4dcc3b5aa765d6...0
SHA-15baa61e4c9b93f3f...100
MySQL 4.1+*HexHash300
MSSQL 2012+0x0200...1731

Hashcat — The Workhorse

Four attack modes you’ll actually use:

Dictionary (-a 0)

hashcat -m 1000 ntlm.txt rockyou.txt
hashcat -m 1000 ntlm.txt /usr/share/wordlists/rockyou.txt -O         # optimized kernel (shorter passwords)
hashcat -m 1000 ntlm.txt rockyou.txt --session=job1 --restore-disable

Dictionary + Rules (-a 0 -r)

Rules mutate every wordlist entry — capitalize, add digits, swap characters, append years, etc.

hashcat -m 1000 ntlm.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 1000 ntlm.txt rockyou.txt -r /usr/share/hashcat/rules/OneRuleToRuleThemAll.rule
# OneRule combines the best 52k rules — slower but extremely effective

Mask (-a 3)

Brute force a known pattern.

# Charsets
?l = abcdefghijklmnopqrstuvwxyz
?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ
?d = 0123456789
?s = !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
?a = ?l?u?d?s
?h = 0123456789abcdef
?H = 0123456789ABCDEF
 
# 8-char: uppercase, then 5 lowercase, then 2 digits — "Winter2025" pattern
hashcat -m 1000 ntlm.txt -a 3 ?u?l?l?l?l?l?d?d
 
# Custom charset
hashcat -m 1000 ntlm.txt -a 3 -1 '!@#$' ?u?l?l?l?l?d?d?1
 
# Increment length
hashcat -m 1000 ntlm.txt -a 3 ?a?a?a?a?a?a?a?a --increment --increment-min=6

Hybrid (-a 6 and -a 7)

-a 6 = wordlist + mask (append) -a 7 = mask + wordlist (prepend)

# Append 4 digits + a special to every rockyou entry
hashcat -m 1000 ntlm.txt -a 6 rockyou.txt ?d?d?d?d?s
 
# Prepend a company prefix
hashcat -m 1000 ntlm.txt -a 7 ?u?u?u?u rockyou.txt

Useful hashcat Flags

--show              # print already-cracked hash:pw pairs (from potfile)
--username          # strip 'user:' prefix before cracking
-O                  # optimized kernel (faster, max len 27)
-w 3                # workload (1 = low, 3 = hard — faster but system-unusable)
--status            # live status updates
--restore           # resume from session
--potfile-path=...  # custom potfile
-o cracked.txt      # output file

John the Ripper

# Autodetect
john hashes.txt
john --wordlist=rockyou.txt hashes.txt
john --wordlist=rockyou.txt --rules=KoreLogic hashes.txt
 
# Force format (crucial for NT, md5crypt, etc.)
john --wordlist=rockyou.txt --format=NT ntlm.txt
john --wordlist=rockyou.txt --format=sha512crypt shadow.txt
 
# Show cracked
john --show --format=NT ntlm.txt

John shines at format detection (feed it something weird, it’ll ID it) and at the --rules=KoreLogic ruleset. Hashcat wins on raw speed for NTLM / Kerberos / sha512crypt on GPU.

Cracking Non-Hash Files (*2john)

Every protected file format has a john extractor that produces a hashcat-compatible hash:

zip2john archive.zip > zip.hash
7z2john.pl archive.7z > sevenz.hash
rar2john archive.rar > rar.hash
pdf2john document.pdf > pdf.hash
office2john file.docx > office.hash          # .docx .xlsx .pptx
keepass2john file.kdbx > kp.hash
ssh2john id_rsa > ssh.hash
bitlocker2john -i /dev/sda1 > bitlocker.hash
truecrypt2john file.tc > tc.hash
dmg2john file.dmg > dmg.hash

Match to hashcat mode:

FormatMode
PKZIP17200
WinZip AES13600
7-Zip11600
RAR3/512500 / 13000
PDF 1.1-1.3 / 1.4-1.6 / 1.710400 / 10500 / 10700
Office (varies)9400–9800
KeePass13400
SSH key (RSA/DSA/EC)22921
BitLocker22100
LUKS14600
hashcat -m 13400 kp.hash rockyou.txt
hashcat -m 22921 ssh.hash rockyou.txt

Custom Wordlists

Default rockyou is a starting point, not an ending point. Smart wordlists come from the target.

# Scrape words from the organization's website
cewl https://target.com -d 2 -m 5 -w site.txt
 
# Pull leaked passwords from a breach compilation
# RockYou2024, SecLists/Passwords/*.txt
 
# Mangle an existing list with rules to generate a fresh wordlist
hashcat --stdout rockyou.txt -r /usr/share/hashcat/rules/best64.rule > mangled.txt
 
# crunch — generate masks as a wordlist
crunch 8 8 -t Winter@,,  -o winter.txt
 
# Combine multiple wordlists uniquely
cat list1.txt list2.txt | awk '!seen[$0]++' > merged.txt

Username-Based Wordlist

# Generate username variations from a names list
./username-anarchy -i names.txt > users.txt
 
# Common seasonal/company patterns to try first
printf '%s\n' "Password1" "Welcome1" "Winter2025!" "Spring2025!" "Summer2025!" "Fall2025!" "ACME2025!" "Password123!" > spray.txt

Potfile — Already Cracked

Hashcat writes every crack to ~/.hashcat/hashcat.potfile. If you re-run against the same hash set, it uses the potfile first.

hashcat --show -m 1000 ntlm.txt
hashcat --show -m 1000 ntlm.txt --potfile-path /custom/path.pot

Benchmarking

Know what your rig can do.

hashcat -b -m 1000     # NTLM speed
hashcat -b -m 1800     # sha512crypt speed
hashcat -b             # every mode

Rough GPU benchmarks:

  • NTLM: 30 GH/s (RTX 4090) — rockyou-size dictionaries finish in milliseconds
  • sha512crypt: 200 kH/s — rockyou completes in hours, not seconds
  • bcrypt: 50 kH/s — practically uncrackable beyond common passwords

Methodology

  1. hashid to identify the format
  2. hashcat -m <mode> hashes.txt rockyou.txt — fast baseline
  3. + -r best64.rule — catches most human passwords
  4. + -r OneRuleToRuleThemAll.rule — slower but comprehensive
  5. Custom wordlist (cewl, breached lists)
  6. Mask attack against known length/pattern
  7. Move on — some hashes just don’t crack. Use them for PtH or walk away.