Hash Extraction Utilities
Before John can crack a password, you must extract the password hash from the file or system that stores it. John the Ripper Jumbo ships with a large collection of format-specific extraction tools — each ends in 2john and produces a plain-text hash file that John understands.
The general pattern is: tool2john <input_file> > output_hashes.txt. Then run john output_hashes.txt.
Commonly Used Extraction Tools
Extract password hash from ZIP archives (traditional PKZIP or AES encrypted).
zip2john secret.zip > zip_hash.txtExtract password hash from RAR archives (v3 and v5).
rar2john secret.rar > rar_hash.txtExtract password hash from PDF documents (40/128-bit RC4 or AES).
pdf2john.pl document.pdf > pdf_hash.txtExtract passphrase hash from SSH private keys (RSA, DSA, ECDSA, Ed25519).
ssh2john id_rsa > ssh_hash.txtExtract hash from KeePass databases (.kdb, .kdbx).
keepass2john database.kdbx > keepass_hash.txtExtract hash from MS Office documents (.doc, .docx, .xls, .xlsx, .ppt, .pptx).
office2john document.docx > office_hash.txtExtract hash from GPG/OpenPGP private keys.
gpg2john private.asc > gpg_hash.txtConvert WPA/WPA2 handshake capture to crackable hash.
hccap2john capture.hccap > wpa_hash.txtExtract wallet encryption hash from Bitcoin wallet.dat.
bitcoin2john wallet.dat > btc_hash.txtExtract password hash from 7-Zip archives.
7z2john archive.7z > sevenz_hash.txtExtract hash from TrueCrypt/VeraCrypt volumes.
truecrypt2john volume.tc > tc_hash.txtExtract hash from CVS repository passfiles.
cvs2john passfile > cvs_hash.txtFull Example: ZIP File
Let us walk through cracking a password-protected ZIP archive from start to finish:
Step 1: Extract the hash
1zip2john secret.zip > zip_hash.txt
The output is the PKZIP encrypted-hash string that John consumes.
Step 2: Inspect the hash
1cat zip_hash.txt
You will see a line containing the file name inside, salt, and encrypted checksum — all in one.
Step 3: Crack with wordlist
1john --wordlist=rockyou.txt zip_hash.txt
Step 4: View cracked password
1john --show zip_hash.txt
Full Example: SSH Private Key
Extract from encrypted RSA key
1ssh2john ~/.ssh/id_rsa > ssh_hash.txt
If your key has a passphrase, this extracts the encrypted blob for cracking.
Crack with rules (or incrementally if necessary)
1john --wordlist=rockyou.txt --rules=Jumbo ssh_hash.txt
Show recovered passphrase
1john --show ssh_hash.txt
Warning
Full Example: PDF Document
Extract PDF hash (older RC4 encryption)
1pdf2john.pl document.pdf > pdf_hash.txt
Extract AES-encrypted PDF (newer files)
1pdf2john.pl -s document.pdf > pdf_hash.txt
-s enables AES-256 support for newer Adobe versions.
Crack
1john --wordlist=rockyou.txt --rules pdf_hash.txt
Tip
List All Available Extraction Tools
The 2john tools are scattered across /usr/share/john or in the source's run directory. List them:
List all 2john scripts in default path
1ls /usr/share/john/*2john* 2>/dev/null || find . -name '*2john*'
From the John source directory
1find ./run -name '*2john*' -type f | head -20
Info