John the Ripper: Offline Cracking and Why Hashing Matters

John the Ripper takes password hashes an attacker has already captured and tries to recover the plaintext offline. It is the step that follows credential theft, such as the SAM hive export in my privilege escalation lab. The defensive lesson is the important one: because cracking happens off your systems, you cannot detect it, so the defence is making the hashes not worth cracking and keeping them out of reach in the first place.

Scope: authorised lab work only, on hashes captured from TryHackMe machines or VMs I own. Hash values below are placeholders.

Identify the Hash Type

Cracking starts with knowing the format. John can auto-detect, or the type can be identified first.

john hashes.txt            # auto-detect and run
john --list=formats        # supported formats
# NT hashes from a Windows SAM dump:
john --format=NT hashes.txt

Choose a Mode

Dictionary: try a wordlist. Fastest and most effective against weak passwords.

Rules: mutate the wordlist (append numbers, swap letters) to catch common variations.

Incremental: brute force every combination. Only feasible for short passwords.

john --wordlist=rockyou.txt hashes.txt
john --wordlist=rockyou.txt --rules hashes.txt
john --show hashes.txt       # reveal what cracked

Why Some Hashes Fall Fast

The hash algorithm decides how quickly cracking works. This is the whole defensive point.

NTLM / unsalted MD5 / SHA1: fast to compute, so a GPU tries billions per second. Weak passwords fall in seconds.

bcrypt / scrypt / Argon2: deliberately slow and salted, so each guess costs far more and precomputed tables are useless. Cracking becomes impractical.

Password length beats complexity against cracking: each extra character multiplies the search space far more than a symbol substitution does.

You Cannot Detect the Cracking

Cracking runs on the attacker's own hardware, so there is nothing to see on your network. The detectable event is the moment before it: the theft of the hashes. That is where monitoring pays off.

SAM / SYSTEM hive export: Event ID 4688 for reg save hklm\sam, or esentutl / VSS access to the hives.

NTDS.dit theft on a domain controller: volume shadow copy creation and access to ntds.dit.

LSASS access: Sysmon Event ID 10 against lsass.exe for in-memory credential dumping.

These map to the detections in my Splunk detection lab.

Making Hashes Not Worth Cracking

Strong, long passwords: length is the single biggest factor against offline cracking.

Slow, salted hashing for applications: bcrypt, scrypt, or Argon2, never plain MD5 or SHA1.

Disable LM hashes and avoid legacy NTLM where possible.

Protect the hash store: restrict and audit access to the SAM and NTDS.dit; this is where the PrivEsc hardening overlaps.

LAPS: unique, rotated local admin passwords, so one cracked hash does not unlock every machine.

MFA: the backstop. Even a cracked password is not enough on its own.

The Takeaway

Offline cracking is invisible, so prevention is the whole game. Strong, long passwords and modern salted hashing make the hashes impractical to crack, protecting the hash store stops them being stolen, and MFA means a recovered password still is not a login. Knowing how fast weak hashes fall is what makes those choices feel urgent rather than theoretical.