Overview
Password cracking is an essential skill in penetration testing. Two tools dominate this space: Hashcat (GPU-focused) and John the Ripper (CPU-focused with GPU support). Let's compare them head-to-head.
GPU vs CPU Performance
Attack Modes
Hashcat Attack Modes
- Dictionary Attack (-a 0): Straight wordlist attack
- Combination Attack (-a 1): Combine two wordlists
- Brute-Force (-a 3): Mask-based attack
- Rule-Based (-a 0 -r rules): Apply transformation rules
- Hybrid (-a 6, -a 7): Wordlist + mask combinations
- Single Crack: Uses login names and GECOS info
- Wordlist: Dictionary with optional rules
- Incremental: Brute-force with character frequency optimization
- External: Custom cracking modes via C-like config
- You have a powerful GPU
- Cracking large hash lists
- Need maximum speed for common hash types
- Working with modern hash algorithms
- Working with exotic/uncommon hash formats
- Need automatic hash detection
- Running on servers without GPUs
- Need incremental mode's smart brute-force
John the Ripper Modes
When to Use Which
Choose Hashcat when:
Choose John the Ripper when:
Practical Example
Hashcat: Crack NTLM hashes with rockyou
hashcat -m 1000 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.ruleJohn: Crack shadow file
john --wordlist=/usr/share/wordlists/rockyou.txt --rules=All /etc/shadowHashcat: Mask attack for 8-char passwords
hashcat -m 0 -a 3 hashes.txt ?u?l?l?l?l?d?d?s
Conclusion
Both tools are essential in a penetration tester's arsenal. Use Hashcat for raw GPU power and John for versatility. Many professionals use both in their workflows.