☼
⌃
☰

John The Ripper

Table of Contents

Password cracker with broad hash format support and bundled file conversion tools. Preferred over Hashcat for file format cracking (ZIP, PDF, SSH keys) — conversion tools are built in. For raw hash cracking speed on a GPU, use Hashcat instead.

Related: Password Cracking Methodology Hashcat Dictionary Attack

Common Flags

Flag Description
--wordlist= Wordlist path
--format= Specify hash format e.g. --format=NT
--rules= Apply mutation rules e.g. --rules=best64
--show Display cracked passwords from pot file
--list=formats List all supported formats

Format Conversion and Cracking

SHELL
# Auto-detect format
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt

# ZIP
zip2john protected.zip > zip.hash
john zip.hash --wordlist=/usr/share/wordlists/rockyou.txt

# PDF
pdf2john protected.pdf > pdf.hash
john pdf.hash --wordlist=/usr/share/wordlists/rockyou.txt

# SSH private key
ssh2john id_rsa > ssh.hash
john ssh.hash --wordlist=/usr/share/wordlists/rockyou.txt

# Linux shadow
unshadow /etc/passwd /etc/shadow > combined.hash
john combined.hash --wordlist=/usr/share/wordlists/rockyou.txt

# NTLM / Windows
john hash.txt --format=NT --wordlist=/usr/share/wordlists/rockyou.txt

# Show results
john hash.txt --show

# stream passwords
zcat /usr/share/wordlists/rockyou.txt.gz | john --stdin hash.txt

Rules

SHELL
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt --rules=best64
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt --rules=jumbo

Tips

  • Auto-detection fails on ambiguous formats — specify --format explicitly if john misidentifies the hash
  • Results persist in ~/.john/john.pot — always run --show after cracking to read them
  • For SSH keys check the header — ENCRYPTED in the first line means the key is passphrase-protected and crackable
  • Jumbo rules are aggressive and slow — start with best64