John the Ripper

On this page 7

John the Ripper is an open-source password cracking tool that recovers plaintext passwords from password hashes by generating candidate guesses, hashing them with the same algorithm and comparing the results. In cybersecurity and in security testing in particular, it serves as a standard instrument for password strength auditing, letting authorized testers prove how quickly an attacker who steals a credential database could turn it into working logins.

The project is maintained by Openwall and was first released in 1996 for Unix systems. Today it exists in two branches: the compact core edition and the community-maintained jumbo edition, which adds hundreds of hash formats, GPU support through OpenCL and many extraction utilities. Results matter less as a list of cracked passwords than as evidence about password policy, hashing choices and user behavior.

How John the Ripper recovers passwords

John the Ripper works offline against captured hashes, never against a live login prompt. Because cryptographic hash functions are one-way, the tool cannot reverse a hash; instead it guesses, hashes and compares at high speed. A guess that produces an identical hash is, for practical purposes, the original password.

A typical run follows a fixed sequence. The tester obtains hashes during an authorized engagement, converts them into the input format with a helper utility, lets John autodetect the hash format, and starts one or more cracking modes. Every recovered password is written to the pot file (john.pot), so the same hash is never cracked twice and the command john --show lists the results.

  1. Acquire hashes, for example from /etc/shadow, an NTDS.dit extract or an encrypted archive.
  2. Convert them with tools such as unshadow, zip2john or office2john.
  3. Run single, wordlist, incremental or mask mode, often in that order.
  4. Review cracked accounts with --show and report patterns rather than raw passwords.

Long sessions are interruptible and resumable with --restore, and work can be split across CPU cores with --fork or across machines with --node. This session management makes multi-day audits of slow hashes practical.

Cracking modes and when each applies

The cracking mode decides which candidate passwords John generates, and the choice of mode usually matters more than raw hardware speed. The following table compares the main modes of the jumbo edition.

ModeCandidate sourceBest use
Single crack modeLogin names, full names and GECOS fields with manglingQuick wins on accounts that reuse their own name
Wordlist modeDictionary file plus optional rulesCommon and leaked passwords
Incremental modeCharacter frequency statistics from .chr filesExhaustive search of short passwords
Mask modeFixed pattern such as ?u?l?l?l?d?dKnown policy structures
External modeGenerator written in a C-like languageCustom logic and special filters
PRINCE and Markov modesWord combinations or probabilistic chainsLong passphrase-like guesses
Main cracking modes in John the Ripper

Mangling rules are what make wordlist mode effective. A rule set appends digits, capitalizes the first letter, substitutes characters such as “a” with “@” or doubles a word, turning one dictionary entry into dozens of realistic variants. Well-tuned rules often crack more passwords than a far larger wordlist used without rules.

Hash formats and the jumbo extraction tools

John the Ripper supports several hundred hash and cipher formats in the jumbo edition, from legacy Unix crypt to modern application formats. Cracking speed depends overwhelmingly on the cost of the hashing algorithm, which is why the same password may fall in seconds under one format and resist for years under another.

FormatTypical sourceRelative cracking speed
LMLegacy Windows systemsExtremely fast
NTLMWindows domain and local accountsVery fast
Raw MD5 and SHA-1Poorly designed web applicationsVery fast
md5cryptOlder Linux systemsModerate
sha512cryptCurrent Linux distributionsSlow
bcryptWeb frameworks and BSD systemsVery slow by design
Representative formats and their relative resistance

The “2john” utilities extract crackable material from files that are not plain hash lists. Examples include zip2john, rar2john, pdf2john, ssh2john for encrypted private keys and keepass2john for password manager databases. This breadth of file support is a major reason testers keep John in their toolkit alongside faster GPU tools.

How John the Ripper compares with Hashcat

John the Ripper and Hashcat solve the same problem with different design priorities. John began as a CPU-oriented tool with automatic format detection and broad format coverage, while Hashcat was built GPU-first for maximum throughput on popular hash types.

AspectJohn the RipperHashcat
Primary hardwareCPU, with OpenCL in jumboGPU
Format selectionAutomatic detectionExplicit numeric mode
Rule syntaxOwn rule languageOwn rule language, partly compatible
File extractionExtensive 2john utilitiesRelies on external extractors
Typical strengthUnusual formats and quick auditsLarge-scale GPU attacks
John the Ripper compared with Hashcat

Experienced testers frequently use both tools together: John to extract and identify hashes and to run single mode, and Hashcat for heavy GPU workloads. The two pot files are not shared, so consolidating results into one report is a manual step.

Responsible use in security testing

Running John the Ripper against hashes requires explicit written authorization, because cracked credentials are among the most sensitive artifacts of any engagement. Within penetration testing and red team work, the rules of engagement should state which hashes may be cracked, where they are stored and how long results are kept.

  • Store hashes and pot files on encrypted, access-controlled systems and delete them at the end of the engagement.
  • Report statistics and patterns such as length distribution and reuse, not individual plaintext passwords.
  • Prefer time-boxed cracking runs so results reflect realistic attacker effort.
  • Coordinate with the blue team when cracking reveals privileged or service accounts.

Common mistakes undermine the value of an audit. The table below lists frequent problems and their fixes.

MistakeConsequenceFix
Wrong format detectedZero cracks despite weak passwordsSet the format explicitly with –format
Wordlist without rulesMisses simple variantsEnable a proven rule set
Incremental mode firstHours wasted on long keyspacesStart with single and wordlist modes
Plaintext in the reportNew exposure of credentialsMask passwords and report metrics
Frequent mistakes and how to correct them

A low crack rate does not prove strong passwords. It may only show that the hashing algorithm is slow or that the time budget was short, so findings should always state the format, hardware and duration of the test.

Put simply

Computers rarely store your actual password. They store a scrambled fingerprint of it. John the Ripper guesses passwords one after another, scrambles each guess the same way and checks whether the fingerprints match. When they match, the password is known.

Security teams use it like a locksmith testing a building’s locks with permission. If the tool opens many accounts within an hour, the passwords or the way they are stored are too weak, and the organization knows exactly what to fix.

In practice

During an authorized internal penetration test at a mid-sized manufacturing company, a tester extracts about 2,400 NTLM hashes from a domain controller backup. Using John the Ripper on a single workstation, single crack mode recovers 90 accounts in minutes, many using the employee’s surname followed by a year.

A wordlist of leaked passwords combined with a standard rule set then cracks a further 610 accounts within four hours, including two service accounts with domain administrator rights. The report shows that 29 percent of passwords fell in one afternoon, that seasonal patterns such as “Winter2026” were common, and that privileged accounts had no stronger rules than ordinary users.

The company responds by introducing a banned-password list, a 15-character minimum for administrators and managed service accounts. A repeat audit six months later cracks under 4 percent of hashes in the same time budget.