John the Ripper Basics: Audit Your Own Password Hashes (Legally)


You can tell users to pick strong passwords all day — but how do you prove a password is weak? John the Ripper, the classic open-source password auditor, answers that question by doing exactly what an attacker would do: trying to crack your password hashes, so you can fix the weak ones before anyone else finds them.

What Is John the Ripper?

John the Ripper (often just “John”) is a password auditing tool that has existed since the 1990s. It takes password hashes — the scrambled versions of passwords stored by systems — and tries to recover the original passwords using wordlists, rules and brute force. Security teams use it to audit their own users’ passwords; attackers use it on stolen hash dumps. Same tool, opposite sides — which is why you should only ever run it on hashes from systems you own or have written permission to test.

Installing John

On most Linux systems it is one command away:

sudo apt update && sudo apt install john

(Kali Linux ships with it preinstalled, along with its bigger brother Hashcat — Hashcat uses your GPU, John uses your CPU, and John is often easier to start with.)

Your First Audit: A Hash You Made Yourself

Never practice on someone else’s hashes. Make your own test file first:

echo -n "password123" | md5sum

Save the hash to a file, then let John do its work:

john --format=Raw-MD5 --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
john --show --format=Raw-MD5 hashes.txt

The –wordlist flag feeds John rockyou.txt — a famous list of 14 million real leaked passwords. If your password appears in it, John cracks it in seconds. That is the whole point: if a free wordlist recovers it, so can any attacker.

How John Cracks Passwords

John works in three modes:

  • Wordlist mode — tries every password in a list. Fast, and catches the most common passwords instantly.
  • Rules mode — mutates wordlist entries (adds numbers, capitalizes, leetspeak). This is how “password” becomes “Password123!” in the attacker’s guesses.
  • Incremental (brute force) mode — tries every combination, character by character. Slow, but it eventually gets everything short enough.

For most audits, wordlist + rules is enough to find the dangerously weak passwords — the ones that matter.

Reading the Results Like a Defender

A cracked hash is not a trophy — it is a to-do list:

  1. Force a password reset for every cracked account, and require a longer minimum length (16+ characters).
  2. Ban common passwords. Block the top 10,000 passwords from rockyou.txt at signup — most systems can do this with a simple blocklist.
  3. Upgrade your hashing. If you are still storing MD5 or SHA1, migrate to bcrypt, Argon2 or scrypt. Fast hashes are an attacker’s best friend; slow, salted hashes are yours.
  4. Turn on MFA. A cracked password stops being a break-in when the second factor blocks the login.

Practice Legally

John the Ripper is a defender’s tool when used on your own systems. Build a small lab: spin up a Linux VM, create a few test accounts with weak passwords, dump the hashes, and audit them. That hands-on loop — crack, fix, re-audit — is how real password policy gets built. Only test systems you own or have written permission to test.

Comments

Popular Posts