John the Ripper Cheat Sheet: Master Password Cracking

Photo by Cottonbro Studio on Pexels
Published 14 April 2024 Last updated 15 April 2024 An older guide that hasn't been re-checked yet, so commands or versions may have moved on. How guides are made and checked

This cheat sheet briefly references some of the most commonly used John the Ripper commands, along with a brief description and practical examples to illustrate their use. Whether you’re a seasoned professional looking to brush up on your password-cracking skills or a newcomer eager to explore the possibilities of this powerful tool, you’ll find valuable insights and shortcuts here.

Installation

John the Ripper is included in many Linux distributions and can be installed easily. Here are commands for popular distributions:

DistributionCommand
Debian/Ubuntusudo apt-get install john
CentOS/Fedorasudo yum install john (CentOS 7 and below), sudo dnf install john (Fedora and CentOS 8+)
NixOSnix-env -iA nixos.john

Usage

TaskCommand
Basic password crackingjohn passwd_file
Show cracked passwordsjohn --show passwd_file
Use specific wordlistjohn --wordlist=path/to/wordlist.txt passwd_file
Crack using rulesjohn --rules passwd_file
Specify hash typejohn --format=md5crypt passwd_file
List available formatsjohn --list=formats

Examples

Cracking Unix passwords:

john --format=descrypt /etc/shadow

Using a custom wordlist:

john --wordlist=/usr/share/john/password.lst --rules /etc/shadow

Force using OpenMP for parallel processing:

OMP_NUM_THREADS=4 john --format=md5crypt /etc/shadow

Wrapping Up

This cheat sheet has outlined the tool’s flexibility and power for everything from simple password cracking to complex hash-breaking tasks. Mastering John the Ripper can significantly enhance your understanding of system vulnerabilities and improve your defensive cybersecurity strategies. Continue to practice, explore advanced options, and share your experiences to help enrich the community’s collective knowledge.

You May Also Be Interested In

References

John the Ripper Official Site: Offers comprehensive resources, including documentation, tutorials, and downloads for John the Ripper. Visit the Official John the Ripper Site