Password Cracking Methodology
Table of Contents
A structured approach to cracking password hashes, from identification through to tool selection and wordlist strategy.
Related: Hashcat Passwords Dictionary Attack Mask Attack Brute Force Attack
1. Identify the Hash
Before cracking, identify the hash type. Tools:
hashid hash.txt
hash-identifier
Common hash types and their Hashcat modes:
| Hash Type | Mode | Example Length |
|---|---|---|
| MD5 | 0 | 32 chars |
| SHA1 | 100 | 40 chars |
| SHA256 | 1400 | 64 chars |
| NTLM | 1000 | 32 chars |
| NTLMv2 | 5600 | varies |
| bcrypt | 3200 | 60 chars |
| Kerberoast | 13100 | varies |
| AS-REP Roast | 18200 | varies |
| WPA2 | 22000 | varies |
2. Choose a Strategy
Start fast and escalate complexity only if needed:
- Common wordlist (rockyou.txt) — covers most CTF hashes
- Wordlist with rules — mutates words with common substitutions
- Targeted wordlist — built from OSINT about the target
- Mask attack — structured brute force with known patterns
- Full brute force — last resort, impractical for strong hashes
3. Wordlists
| Wordlist | Use Case |
|---|---|
| /usr/share/wordlists/rockyou.txt | General purpose, CTFs |
| SecLists/Passwords/ | Targeted and specialised |
| CeWL generated | Target-specific from website |
Generate a target-specific wordlist with CeWL:
cewl http://target.com -d 2 -m 5 -w wordlist.txt
4. Cracking
Dictionary attack
hashcat -m <mode> hash.txt /usr/share/wordlists/rockyou.txt
Dictionary with rules
hashcat -m <mode> hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
Mask attack
# ?u=uppercase ?l=lowercase ?d=digit ?s=special # Example: Password1! pattern hashcat -m <mode> hash.txt -a 3 ?u?l?l?l?l?l?l?d?s
Show cracked passwords
hashcat -m <mode> hash.txt --show
Tips
- Always try rockyou.txt first — it cracks the majority of CTF hashes immediately.
- Use
best64.rulebefore escalating to mask attacks — it covers common mutations like Password → P@ssw0rd. - bcrypt is slow to crack by design — GPU matters significantly here. Consider whether cracking is the right approach.
- NTLM hashes from a domain environment are often reused — try cracked passwords against other services and accounts.
- Keep a personal wordlist of passwords you encounter during engagements — patterns repeat.