← All Cheatsheets
exploitation

John the Ripper — Password Cracking

John the Ripper — versatile password cracker with hash extraction helpers for common file formats.

22 views Apr 2026 lazyhackers
Basic Cracking (8)
john hash.txt
Auto-detect hash and crack with default wordlist
basic auto
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
Dictionary attack with rockyou
wordlist
john hash.txt --wordlist=rockyou.txt --rules
Dictionary + mangling rules
wordlist rules
john hash.txt --format=NT
Crack NTLM hashes specifically
ntlm windows
john hash.txt --format=sha512crypt
Crack Linux SHA512crypt shadow hashes
linux shadow
john hash.txt --format=bcrypt
Crack bcrypt hashes
bcrypt
john --show hash.txt
Show cracked passwords
show
john --list=formats
List all supported hash formats
formats list
Hash Extraction Tools (John suite) (8)
unshadow /etc/passwd /etc/shadow > hash.txt
Combine passwd+shadow for cracking
linux shadow unshadow
zip2john archive.zip > zip_hash.txt && john zip_hash.txt --wordlist=rockyou.txt
Crack password-protected ZIP
zip extract
rar2john archive.rar > rar_hash.txt && john rar_hash.txt --wordlist=rockyou.txt
Crack password-protected RAR
rar extract
pdf2john document.pdf > pdf_hash.txt && john pdf_hash.txt --wordlist=rockyou.txt
Crack PDF password
pdf extract
ssh2john id_rsa > ssh_hash.txt && john ssh_hash.txt --wordlist=rockyou.txt
Crack SSH private key passphrase
ssh private-key extract
office2john protected.docx > docx_hash.txt && john docx_hash.txt --wordlist=rockyou.txt
Crack Office document password
office docx extract
keepass2john database.kdbx > kp_hash.txt && john kp_hash.txt --wordlist=rockyou.txt
Crack KeePass database
keepass extract
7z2john archive.7z > 7z_hash.txt && john 7z_hash.txt --wordlist=rockyou.txt
Crack 7-Zip archive password
7zip extract
Advanced Options (7)
john hash.txt --incremental
Brute force with incremental mode
bruteforce incremental
john hash.txt --incremental=digits
Brute force digits only
bruteforce digits
john hash.txt --mask=?u?l?l?l?l?d?d
Mask attack pattern
mask
john hash.txt --fork=4
Use 4 CPU cores in parallel
speed parallel
john hash.txt --pot=custom.pot
Custom pot file path
potfile
john hash.txt --restore
Resume interrupted session
resume
john hash.txt --session=mysession
Name the cracking session
session