Understanding password cracking is essential for penetration testing, audits, and security assessments. Below are two commonly used tools and real-world scenarios, explained step by step.

1. Password Cracking with John the Ripper (JtR)
Scenario A: Cracking ZIP Files
First, extract the hash from the ZIP file, then start the attack.
Extract ZIP Hash
zip2john secret.zip > hashed.txt
Simple Crack
john hashed.txt
Advanced Crack (Wordlist + Rules)
john --wordlist=/usr/share/wordlists/rockyou.txt --rules hashed.txt
Rules help generate password variations such as
Password123, P@ssword, password!, etc.
Scenario B: Cracking Linux /etc/shadow
To crack Linux password hashes, unshadowing is required.
Merge passwd & shadow files
unshadow /etc/passwd /etc/shadow > combined.txt
Check Supported Formats
john --list=formats | grep -i crypt
Start Cracking
john --format=crypt --wordlist=/usr/share/wordlists/rockyou.txt --rules combined.txt
2. High‑Speed Password Cracking with Hashcat (MD5 Example)
Hashcat leverages GPU power, making it extremely fast for hash cracking.
Step 1: Save the hash
md5.hash
Step 2: Execute Hashcat
hashcat -m 0 -a 0 md5.hash /usr/share/wordlists/rockyou.txt
Explanation
• -m 0 → MD5 hash type
• -a 0 → Straight wordlist attack

1. Password Cracking with John the Ripper (JtR)
Scenario A: Cracking ZIP Files
First, extract the hash from the ZIP file, then start the attack.
Extract ZIP Hash
zip2john secret.zip > hashed.txt
Simple Crack
john hashed.txt
Advanced Crack (Wordlist + Rules)
john --wordlist=/usr/share/wordlists/rockyou.txt --rules hashed.txt
Rules help generate password variations such as
Password123, P@ssword, password!, etc.
Scenario B: Cracking Linux /etc/shadow
To crack Linux password hashes, unshadowing is required.
Merge passwd & shadow files
unshadow /etc/passwd /etc/shadow > combined.txt
Check Supported Formats
john --list=formats | grep -i crypt
Start Cracking
john --format=crypt --wordlist=/usr/share/wordlists/rockyou.txt --rules combined.txt
2. High‑Speed Password Cracking with Hashcat (MD5 Example)
Hashcat leverages GPU power, making it extremely fast for hash cracking.
Step 1: Save the hash
md5.hash
Step 2: Execute Hashcat
hashcat -m 0 -a 0 md5.hash /usr/share/wordlists/rockyou.txt
Explanation
• -m 0 → MD5 hash type
• -a 0 → Straight wordlist attack