Pentest Tools


John the Ripper Cheatsheet

How to Install John the Ripper

John the Ripper installation:

Installation
username@machine_name:~$ sudo apt install john

Useful Commands for John the Ripper


--wordlist=[file]: Specify the wordlist to use
--rules: Enable word mangling rules for wordlist mode
--incremental: Use incremental mode
--mask=[mask]: Use mask mode for brute-forcing
--single: Use single crack mode
--format=[format]: Specify the hash format
--show: Show cracked passwords
--session=[name]: Save the session with the specified name
--restore=[name]: Restore the session with the specified name
--fork=[N]: Fork N processes

Examples of John the Ripper Commands

Crack a password hash using a wordlist:

Wordlist Mode
username@machine_name:~$ john --wordlist=/path/to/wordlist.txt /path/to/hashfile

Enable word mangling rules:

Word Mangling Rules
username@machine_name:~$ john --wordlist=/path/to/wordlist.txt --rules /path/to/hashfile

Use incremental mode for brute-forcing:

Incremental Mode
username@machine_name:~$ john --incremental /path/to/hashfile

Use mask mode for brute-forcing:

Mask Mode
username@machine_name:~$ john --mask=?a?a?a?a?a /path/to/hashfile

Show cracked passwords:

Show Cracked Passwords
username@machine_name:~$ john --show /path/to/hashfile

Save and restore session:

Save and Restore Session
username@machine_name:~$ john --session=my_session --wordlist=/path/to/wordlist.txt /path/to/hashfile
username@machine_name:~$ john --restore=my_session

Fork multiple processes:

Fork Processes
username@machine_name:~$ john --fork=4 --wordlist=/path/to/wordlist.txt /path/to/hashfile