John the Ripper (JtR) is the oldest still-maintained offline password cracker in active use, first released by Solar Designer in 1996 and now developed openly by the Openwall community. The version practitioners actually run is "jumbo" — a community fork that adds hundreds of hash and cipher formats, GPU support through OpenCL, and a fleet of *2john extractors that turn ZIP archives, SSH keys, PDFs and KeePass databases into crackable hashes.
This guide takes you from an empty terminal to cracking real credentials: four install paths (distro package, source build, Docker and Windows/macOS), the four core cracking modes, wordlist-and-rule mangling, and format-specific attacks against Linux, Windows and encrypted files. Every command is copy-pasteable.
It closes on the side CyberHawk cares about most — the blue-team view: what JtR proves about your password policy, how to detect the hash-dumping that precedes it, and the hashing choices (yescrypt, Argon2, long passphrases) that make offline cracking economically pointless. Use it only against systems you own or are authorised to test.
◈ Table of Contents
01 · What John the Ripper Is & Why Defenders Use It
Phase 1/11John the Ripper is an offline cracker: it never touches the target system during cracking. You first extract a password representation — a Unix shadow entry, a Windows NTLM hash, the encryption verifier from a ZIP file — and JtR then generates candidate passwords, hashes each candidate with the same algorithm, and compares. A match means the plaintext is recovered. Because it runs entirely on your own hardware, there is no account lockout, no rate limit and no network noise to slow it down. That is exactly why it is the reference tool for password auditing: it measures, in wall-clock time, how long your users' passwords would survive a real attacker who stole your hash store.
For a SOC or IR team the value is concrete. After an incident where ntds.dit or a Linux /etc/shadow was exfiltrated, JtR tells you which accounts an adversary can trivially unlock and prioritise for reset. In a proactive audit it turns "our password policy is fine" into "34% of domain accounts fell in under an hour" — a number executives act on.
Password Policy Audits
Crack a copy of your own hash store to quantify weak, reused and policy-violating passwords, then feed the numbers into a hardening plan.
Red Team & OSCP
Recover cleartext from dumped hashes for lateral movement and privilege escalation in authorised engagements and lab exams.
DFIR & Forensics
Open password-protected archives, Office files, PDFs and KeePass vaults recovered as evidence — with owner or legal authorisation.
Detection Tuning
Generate realistic cracking activity in a lab to validate that your Sysmon, auditd and SIEM rules fire on credential-access tooling.
JtR ships in two flavours. Know which one you have — nearly everything interesting lives in jumbo.
| Edition | What it is | Formats | Use it when |
|---|---|---|---|
| Core (1.9.0) | The lean official release from openwall.com | ~a dozen Unix hashes | Almost never — legacy only |
| Jumbo (1.9.0-jumbo-1 / bleeding-jumbo) | Community fork on GitHub, actively developed | 400+ hash & cipher types, OpenCL GPU, *2john tools | Always — this is "John" in practice |
Kali, Parrot and BlackArch ship the jumbo build already. If you type john --list=formats | wc -l and see hundreds of entries, you have jumbo. A dozen entries means you are on core and should build from source (Phase 4).
LEGAL: cracking password hashes you are not authorised to possess is a criminal offence in most jurisdictions. Only run JtR against systems you own, or where you have explicit written authorisation (engagement scope, lab, or account owner consent).
02 · Prerequisites & Requirements
Phase 2/11JtR is famously undemanding — it runs on a Raspberry Pi — but cracking throughput scales directly with CPU cores (for CPU formats) and GPU compute (for OpenCL formats). Plan hardware around the hash algorithm you will attack: fast hashes like NTLM and raw-MD5 fly on any CPU, while deliberately slow hashes like bcrypt and yescrypt reward a strong GPU.
| Component | Minimum | Recommended | Notes |
|---|---|---|---|
| CPU | Any x86-64 / ARM64MIN | 8+ cores with AVX2/AVX-512REC | OpenMP scales across cores |
| RAM | 1 GB | 8 GB+ | Large wordlists & incremental state |
| GPU (optional) | none | NVIDIA/AMD with OpenCL runtime | Big win on bcrypt, sha512crypt, WPA |
| Disk | 1 GB | 20 GB+ | rockyou is 133 MB; big lists are tens of GB |
| OS | Linux, macOS, Windows, *BSD | Linux (Kali/Ubuntu/Debian) | Linux has the smoothest OpenCL path |
| Build tools | gcc/clang, make | + libssl, libgmp, libpcap, ocl-icd | Only needed for the source build |
Rule of thumb: John excels at CPU formats and complex rule logic; Hashcat usually wins on raw GPU throughput for fast hashes. Serious teams run both. Our companion Hashcat Complete Tutorial covers the GPU-first side.
03 · Method 1 — Install From Distro Packages
Phase 3/11The fastest path. On most security distros the packaged build is already the jumbo edition. Use this when you want John working in under a minute and do not need bleeding-edge formats.
Debian and Ubuntu ship the package as john (with data in john-data). On Kali and Parrot this pulls the jumbo build with all formats.
Red Hat family uses dnf; the EPEL repo carries jumbo. Arch and derivatives package it as john in the community repo.
Two checks separate jumbo from core: the format count and the presence of the *2john helper tools. If either is missing, build from source in Phase 4.
Ubuntu's universe package historically lagged behind jumbo and shipped fewer formats than Kali. If --list=formats shows only a few dozen entries, do not fight it — build from source.
04 · Method 2 — Build Jumbo From Source (Recommended)
Phase 4/11Building the bleeding-jumbo branch yourself gives you the newest formats, OpenCL GPU support compiled for your card, and CPU instructions tuned to your exact hardware (AVX2/AVX-512). This is the setup serious auditors run. It takes about five minutes.
These headers unlock the widest format coverage: OpenSSL for many ciphers, GMP for big-integer maths, libpcap for WPA handshakes, and the OpenCL ICD loader for GPU cracking.
Openwall develops jumbo in the open on GitHub. Clone the active branch — it is where new formats land first.
./configure auto-detects your CPU features and OpenCL. Compile with all cores; every binary — john plus the *2john tools — lands in ../run.
Symlink the run directory into your PATH so john and the extractors work from anywhere, then run the built-in benchmark to confirm the build is healthy.
The source build is self-contained. To update later: cd ~/john && git pull && cd src && make -sj$(nproc). No system files are touched, so you can keep several builds side by side.
05 · Method 3 — Docker & Other Platforms
Phase 5/11Containerising John keeps your host clean, pins a reproducible build, and is ideal for CI-driven password audits. Because cracking is CPU-bound, a container is a natural fit. Below is a self-building image plus a Compose file that mounts a working directory for your hashes and wordlists.
Multi-stage keeps the final image small: build in a full toolchain layer, copy only the run output into a slim runtime.
Mount your current directory into /work so John reads hashes and writes its john.pot back to the host.
A Compose file pins CPU limits and the data volume so an audit is one docker compose run away and behaves identically on every machine.
Openwall publishes an official pre-built Windows binary; macOS users get jumbo straight from Homebrew. On Windows, WSL2 with the Linux build is usually smoother than the native binary.
On Apple Silicon, OpenCL is deprecated by Apple — GPU cracking is unreliable on macOS. Use the CPU formats there, or run heavy GPU jobs on a Linux box with a discrete NVIDIA/AMD card.
06 · First Run — Core Concepts & Workflow
Phase 6/11Every John session follows the same loop: identify the hash type, put the hashes in a file one per line, run John, and read the results from the .pot file. Understanding four concepts — the pot file, format auto-detection, sessions, and status — makes everything else obvious.
Attacking with the wrong --format wastes hours. John will guess, but confirm first. List what John supports, and use a helper like hashid to name an unknown hash.
Linux stores usernames in /etc/passwd and hashes in /etc/shadow. The unshadow tool merges them into the single format John expects. You need root (or a copied pair from an authorised host).
Run John with no options and it applies its default pipeline (single → wordlist → incremental). Cracked pairs are appended to the .pot file — John never re-cracks what is already there, so --show reads results back instantly.
If you re-run a job and John instantly says "No password hashes left to crack", it already cracked them — check --show. To start fresh, remove or rename ~/.john/john.pot (source builds use ~/john/run/john.pot).
Long jobs need names so you can resume after a reboot. Name a session with --session, press any key during a run to print progress, and use --restore to pick up exactly where you stopped.
07 · The Four Cracking Modes
Phase 7/11John's power is in how it generates candidate passwords. There are four built-in modes, and knowing when to reach for each is the difference between cracking 60% of a dump in ten minutes and burning a week on brute force. Order them from cheapest to most expensive: single, wordlist, mask, incremental.
Single mode mangles the login name, GECOS full name and home directory into candidates. It is astonishingly effective because people base passwords on their own identity — always run it first, it costs almost nothing.
Feed John a dictionary and it tries each entry. This is where the vast majority of real passwords fall. Add --rules (Phase 8) to multiply each word into hundreds of realistic variants.
When you know the password shape — say a corporate pattern of Capital + five letters + two digits — a mask brute-forces only that keyspace. Placeholders: ?l lower, ?u upper, ?d digit, ?s symbol, ?a all printable.
?w inside a mask means "the current wordlist word", so --wordlist=... --mask='?w?d?d' appends digits to every dictionary entry — the single most productive hybrid attack against corporate passwords.
Incremental is pure brute force driven by character-frequency statistics, so it tries likely combinations first. It never truly finishes on long passwords — bound it with a length limit and reserve it for short, fast hashes only.
Incremental against a slow hash (bcrypt, sha512crypt) beyond ~7 characters is a waste of hardware. Prove weak passwords with wordlist+rules and mask; do not try to exhaust the keyspace of a well-hashed strong password.
08 · Wordlists, Rules & Mangling
Phase 8/11A dictionary alone catches only passwords typed verbatim. Rules transform each word — capitalising, appending years, leet-substituting — to match how humans actually build passwords. This is John's signature strength; its rule engine is more expressive than most competitors'.
rockyou.txt (14 million real leaked passwords) is the default starting point and ships compressed on Kali. Combine and de-duplicate multiple lists for wider coverage.
John ships curated rule sets in john.conf. Escalate from light to heavy: Single is cheapest, Jumbo is broad, and the bundled KoreLogic rules model real corporate password patterns.
Rules use a compact syntax: c capitalise, $X append character X, sXY substitute, A0"..." prepend. Add a named block to john.conf and call it by name. This models an organisation's exact policy.
| Rule op | Meaning | Example in → out |
|---|---|---|
| c | Capitalise first letter | summer → Summer |
| $X | Append character X | summer $1 → summer1 |
| ^X | Prepend character X | summer ^! → !summer |
| sXY | Substitute all X with Y | pass sa@ → p@ss |
| r | Reverse the word | summer → remmus |
| d | Duplicate the word | ab → abab |
Test a rule without cracking anything: john --wordlist=corp-terms.txt --rules=CorpAudit --stdout | less prints every candidate the rule generates so you can sanity-check it before spending GPU time.
09 · Cracking Real-World Formats + GPU
Phase 9/11The jumbo edition's real superpower is the *2john family: dozens of extractors that pull a crackable hash out of an encrypted artefact. Below are the attacks you will actually run in audits and IR, followed by GPU acceleration.
NTLM hashes come from ntds.dit or the local SAM (via secretsdump). Net-NTLMv2 is what you capture from Responder/relay. They are different formats — attack them accordingly.
Debian 12+ and Ubuntu 24.04 default to yescrypt ($y$ prefix); older systems use sha512crypt ($6$). These are deliberately slow, so lean on wordlist+rules rather than brute force.
Password-protected archives recovered as evidence are a classic DFIR task. Extract the verifier with the matching helper, then crack it like any other hash.
The same pattern extends across artefacts: an encrypted SSH key passphrase, a locked PDF, a Word document, or a KeePass .kdbx vault. Each has a dedicated extractor.
For slow hashes, a GPU is worth an order of magnitude. Jumbo exposes OpenCL variants of many formats, suffixed -opencl. Confirm your device is visible, then select the GPU format.
| Hash | John format | Speed class | Best engine |
|---|---|---|---|
| Windows NTLM | nt | Fast | Either — GPU for huge lists |
| Net-NTLMv2 | netntlmv2 | Fast | CPU rules / GPU |
| sha512crypt ($6$) | sha512crypt / -opencl | Slow | GPU |
| bcrypt ($2b$) | bcrypt / -opencl | Very slow | CPU (bcrypt resists GPU) |
| yescrypt ($y$) | crypt (system) | Very slow | CPU — memory-hard |
bcrypt and yescrypt are memory-hard or GPU-hostile by design — a GPU barely helps. That resistance is precisely why you should recommend them as the target hashing scheme in your audit report.
10 · Tuning, Troubleshooting & Blue-Team Defence
Phase 10/11Get the most from your hardware, fix the errors everyone hits, and — because CyberHawk is a defensive shop — turn the exercise into detections and hardening that make offline cracking pointless.
Measure before you optimise. --test reports candidates-per-second for a format; --fork spreads a CPU job across cores; --node splits one keyspace across multiple machines.
Nearly every "John isn't working" report is one of these six. Match the message to the fix.
| Symptom | Cause | Fix |
|---|---|---|
| No password hashes loaded | Wrong format or malformed file | Set --format= explicitly; check the line layout |
| No password hashes left to crack (see FAQ) | Already in the pot file | Run --show; delete john.pot to redo |
| Unknown ciphertext format name | Core build lacks jumbo formats | Build jumbo from source (Phase 4) |
| No OpenCL devices found | Missing GPU runtime/ICD | Install vendor OpenCL + ocl-icd-libopencl1 |
| Cracking is painfully slow | Slow hash + brute force | Use wordlist+rules; add --fork; try GPU |
| zip2john: command not found | Extractors not on PATH | Add the run/ dir to PATH, or use full path |
Offline cracking itself is invisible on the target — but the credential access that feeds it is not. Hunt for the hash-theft precursors and for cracker binaries in your environment.
| Telemetry | What to hunt | Signal |
|---|---|---|
| Sysmon EID 1 | Process create: john.exe, hashcat.exe, *2john | Cracker tooling on an endpoint |
| Windows 4662 / DCSync | Replication of ntds.dit / secretsdump | Bulk hash theft precursor |
| Sysmon EID 10 | lsass.exe access by non-system tools | Credential dumping (T1003) |
| auditd shadow_access | Non-root/cron read of /etc/shadow | Linux hash theft (T1003.008) |
MITRE ATT&CK maps offline cracking to T1110.002 (Password Cracking), fed by T1003 (OS Credential Dumping). Your detections should focus on T1003 — by the time cracking runs, the hashes are already gone.
The point of the audit is action. Turn results into policy: kill fast hashing, force length over complexity, and block the passwords rockyou already knows.
- Migrate password storage to a slow, memory-hard scheme: yescrypt or Argon2id, or bcrypt cost 12+
- Enforce length (15+ char passphrases) over character-class complexity — length beats John, complexity does not
- Screen new passwords against breach corpora (rockyou, HIBP) at set time
- Reset every account John cracked in the audit; expire reused passwords org-wide
- Protect the hash store: restrict ntds.dit/SAM access, monitor DCSync, LAPS for local admins
- Enforce MFA so a cracked password alone does not grant access
Re-run the exact same John session after remediation and put both numbers in the report: "before, 34% cracked in one hour; after moving to Argon2id and 15-char minimums, 0% in 24 hours." That before/after is what gets budget approved.
11 · Sources & References
Phase 11/11Primary documentation and the tooling referenced throughout this guide. Always prefer the official Openwall docs for format-specific behaviour.
◈ AUDIT YOUR OWN HASHES BEFORE AN ATTACKER DOES
John the Ripper turns "our passwords are fine" into a hard number. Pair it with our Hashcat and Active Directory hardening guides for the full credential-security picture, and drop suspicious artefacts into the CyberHawk IOC Scanner. Explore more hands-on SOC tooling walkthroughs on the CyberHawk Blog.
◈ Stay Connected
Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.
"They can't exploit you if you are the Exploit."