GO KALI FREE

John the Ripper

Password Attacks

Intermediatelow risk

John the Ripper is a free and open-source password security auditing and password recovery tool. It can crack various password hash types offline and is highly customizable with different attack modes and mangling rules.

Installation

sudo apt install john

Basic Syntax

john [options] <password-file>

Quick Facts

Full Name
John the Ripper
License
GPL v2+
Author
Openwall (Alexander Peslyak)
Written In
C
Platforms
Linux, Windows, macOS, Unix
Category
Password Cracking (Offline)
Hash Formats
Hundreds (auto-detected)
Attack Modes
Wordlist, Incremental, Single, External, Mask

Tool Overview

John the Ripper (JtR) is a free, open-source password security auditing and password recovery tool. First released in 1996, it has become one of the most versatile and widely-used password crackers in the world.

John excels at automatic hash type detection, making it accessible to beginners. It supports hundreds of hash formats including MD5, SHA, NTLM, bcrypt, DES, and can directly crack passwords from encrypted ZIP, RAR, PDF, and Office documents.

The tool operates entirely offline, making it safe for authorized password auditing without triggering account lockouts. It uses CPU-based cracking with multi-process support for parallelization across multiple cores.

Common Commands

john hashes.txtAuto-detect crack - Launch a quick start cracking session letting John automatically detect the hash type
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txtDictionary attack - Use a specific wordlist to test common passwords against the target hashes
john --show hashes.txtShow cracked - Display the cracked passwords alongside their associated usernames from the session
john --format=raw-md5 hashes.txtSpecify format - Manually set the hash type when the format is already known
john --incremental hashes.txtBrute force - Try all possible character combinations in an exhaustive search
john --incremental=digits hashes.txtDigits only brute force - Restrict character mutations to numeric patterns for PIN cracking
unshadow /etc/passwd /etc/shadow > combined.txtCombine Linux authentication files - Merge system user and shadow files into a format John can read
john --rules --wordlist=wordlist.txt hashes.txtRules mode - Apply wordlist mangling rules to mutate dictionary words into common variations
john --fork=4 --wordlist=wordlist.txt hashes.txtMulti-process execution - Distribute the workload across 4 CPU cores to speed up the cracking process
john --session=mycrack hashes.txtNamed session - Save the current cracking progress under a specified name for long operations
john --restore=mycrackRestore session - Resume an interrupted or paused cracking session from its last saved state
john --format=nt hashes.txtNTLM hashes - Target Windows SAM database or Active Directory password hashes
john --format=raw-sha256 hashes.txtSHA256 hashes - Target standard standalone SHA-256 cryptographic check values
john --format=bcrypt hashes.txtbcrypt hashes - Force parsing rules for modern, high-cost adaptive hashing algorithms
john --format=zip encrypted.zipZIP password - Attempt to crack password-protected ZIP archive extractions directly

Step-by-Step Guide

  1. 1Ensure you have gathered the cryptographic hashes legally
  2. 2Determine the exact algorithm used if it isn't automatically recognized
  3. 3Initiate the attack using a robust dictionary file
  4. 4Be prepared to wait, as complex algorithms take considerable time
  5. 5Press any key during execution to view live status updates
  6. 6Retrieve the decoded text by appending the --show flag
  7. 7Check the internal potfile for a complete history of recovered strings

Warnings

Use Cases

Linux Password Auditing

Crack /etc/shadow passwords using unshadow to combine passwd and shadow files.

Windows SAM Cracking

Recover passwords from extracted Windows SAM database hashes.

Encrypted Archives

Crack passwords from ZIP, RAR, and 7z archives using format-specific modes.

Document Passwords

Recover passwords from encrypted PDF and Office documents.

CTF Challenges

Solve cryptography and password cracking challenges in competitions.

Key Features

People Also Ask

How do I use John the Ripper on Kali Linux?

John is pre-installed on Kali Linux. Run 'john hashes.txt' to auto-detect the hash format, or specify with '--format=md5 hashes.txt'. Use '--wordlist=/usr/share/wordlists/rockyou.txt' for dictionary attacks. The community edition (jumbo) supports 200+ hash formats.

How do I crack Linux /etc/shadow passwords with John?

First combine passwd and shadow files: 'unshadow /etc/passwd /etc/shadow > hashes.txt'. Then crack with: 'john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt'. This only works on systems you own or have authorization to audit. The unshadow tool is included with John.

John vs Hashcat — which should I use?

John the Ripper is better for CPU-based cracking and obscure hash formats. Hashcat excels with GPU acceleration for common hashes (MD5, SHA-1, NTLM). John supports 200+ formats natively; Hashcat has better performance for supported formats. Many professionals use both.

How do I show cracked passwords in John?

Run 'john --show hashes.txt' to display all cracked passwords. Use '--format=raw-md5' to specify the hash type. The output shows each hash alongside its plaintext. Combine with '--incremental' to show only newly cracked hashes since last session.

Can John crack password-protected PDFs and ZIP files?

Yes. Use 'pdf2john protected.pdf > hash.txt' then 'john hash.txt' for PDFs. For ZIP files: 'zip2john protected.zip > hash.txt' then crack. John also supports RAR, 7z, Office documents, and KeePass databases via specialized extraction tools.

What is the John the Ripper wordlist location on Kali?

The default wordlist directory is '/usr/share/wordlists/'. The most commonly used file is 'rockyou.txt' — if it doesn't exist, decompress it: 'sudo gunzip /usr/share/wordlists/rockyou.txt.gz'. You can also use custom wordlists with the --wordlist flag.

Related Tools

Hashcat

Password Attacks

GPU-accelerated password cracker for maximum speed on large hash sets.

THC Hydra

Password Attacks

Online brute-force tool for testing cracked passwords against live services.

CeWL

Password Attacks

Custom wordlist generator for creating targeted dictionaries for John.

Crunch

Password Attacks

Wordlist generator based on character sets, patterns, and length ranges.

Medusa

Password Attacks

Online brute-force tool for testing cracked passwords against live services.

Tags

#password-attacks#offline-cracking#brute-force#hash-cracker#dictionary-attack

Output Explanation

The software outputs the recovered cleartext next to the corresponding user identifier. Status prompts indicate the current speed and an estimated completion timeframe.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.