| name | Hash Cracking Workflow |
| description | This skill should be used when the user asks about "crack hash", "identify hash",
"hashcat", "john", "found hash", or needs to crack password hashes. Provides
complete workflow from hash identification to cracking.
|
| version | 1.0.0 |
Hash Cracking Workflow
Step 1: Identify Hash Type
By Length
| Length | Possible Types |
|---|
| 32 | MD5, NTLM |
| 40 | SHA1 |
| 56 | SHA224 |
| 64 | SHA256 |
| 96 | SHA384 |
| 128 | SHA512 |
By Format
| Format | Type | Hashcat Mode |
|---|
$1$salt$hash | md5crypt | 500 |
$5$salt$hash | sha256crypt | 7400 |
$6$salt$hash | sha512crypt | 1800 |
$2a$, $2b$, $2y$ | bcrypt | 3200 |
$apr1$ | Apache MD5 | 1600 |
$P$ or $H$ | phpass (WordPress) | 400 |
Tools
hashid '<HASH>'
hashid -m '<HASH>'
hash-identifier
haiti '<HASH>'
Step 2: Find Wordlist
Common Locations
ls /usr/share/wordlists/rockyou.txt 2>/dev/null
zcat /usr/share/wordlists/rockyou.txt.gz > /tmp/rockyou.txt 2>/dev/null
ls /usr/share/seclists/Passwords/
ls ~/wordlists/ /opt/wordlists/ 2>/dev/null
Wordlist Priority
rockyou.txt - 14M passwords, good coverage
top-passwords-shortlist.txt - Quick check
- Custom company/target wordlist
- Rule-based mutations
Step 3: Crack with Hashcat
Common Modes
hashcat -m 0 hash.txt /path/to/rockyou.txt
hashcat -m 1000 hash.txt /path/to/rockyou.txt
hashcat -m 100 hash.txt /path/to/rockyou.txt
hashcat -m 1400 hash.txt /path/to/rockyou.txt
hashcat -m 1800 hash.txt /path/to/rockyou.txt
hashcat -m 3200 hash.txt /path/to/rockyou.txt
hashcat -m 13100 hash.txt /path/to/rockyou.txt
hashcat -m 18200 hash.txt /path/to/rockyou.txt
With Rules (Better Coverage)
hashcat -m <MODE> hash.txt wordlist.txt -r /usr/share/hashcat/rules/best64.rule
Check Cracked
hashcat -m <MODE> hash.txt --show
Step 4: Alternative - John the Ripper
john hash.txt --wordlist=/path/to/rockyou.txt
john --format=raw-md5 hash.txt --wordlist=/path/to/rockyou.txt
john --format=nt hash.txt --wordlist=/path/to/rockyou.txt
john hash.txt --show
Quick One-Liners
MD5
echo "<HASH>" > /tmp/h.txt && hashcat -m 0 /tmp/h.txt /path/to/rockyou.txt --force
NTLM
echo "<HASH>" > /tmp/h.txt && hashcat -m 1000 /tmp/h.txt /path/to/rockyou.txt --force
Online Lookup (Faster)
For common hashes, try online databases first:
- CrackStation (crackstation.net)
- Hashes.com
- cmd5.com
curl -s "https://crackstation.net/crackstation-api.php?hash=<HASH>"
Common Hash Sources
| Source | Command to Extract |
|---|
| Linux shadow | cat /etc/shadow |
| Windows SAM | secretsdump.py -sam sam -system system LOCAL |
| SQLite DB | sqlite3 db.sqlite "SELECT * FROM users" |
| MySQL | SELECT user,password FROM mysql.user |
| Web app config | Check config files for password fields |
Performance Tips
hashcat -m <MODE> hash.txt wordlist.txt -d 1
hashcat -m <MODE> hash.txt wordlist.txt -w 3
hashcat -m <MODE> hash.txt wordlist.txt --force
hashcat -m <MODE> hash.txt wordlist.txt --session=crack1
hashcat --restore --session=crack1