Skip to content

John the Ripper

60 commands

A versatile password cracker (use the “jumbo” build) with automatic hash detection and *2john helpers for files, archives and keys.

  • password cracking
  • hashes
  • CPU

Install John the Ripper

sudo apt install john

Basic Usage2

john hashes.txt

Runs John in default mode with automatic format detection and Single crack mode.

john --show hashes.txt

Displays passwords that have already been cracked and stored in the pot file.

Installation & Test1

john --test

Benchmarks the system performance for all supported algorithms to verify installation.

Format Identification1

john --list=formats

Lists all hash formats supported by the installed version of John the Ripper.

Specific Format1

john --format=NAME hashes.txt

Forces John to use a specific hash format avoiding auto-detection errors.

Link

Dictionary Attack2

john --wordlist=FILE hashes.txt

Performs a standard dictionary attack using the provided wordlist file.

Link
john --wordlist=FILE --format=NAME hashes.txt

Combines a wordlist attack with a specific format specification for efficiency.

Link

Standard Input1

cat words.txt | john --stdin hashes.txt

Reads candidate passwords from standard input instead of a file.

Link

Rule Based Attack2

john --wordlist=FILE --rules hashes.txt

Applies the default set of rules from john.conf to mutate words in the wordlist.

Link
john --rules:Jumbo --wordlist=FILE hashes.txt

Uses the extensive Jumbo rule set for deeper mutation and variation coverage.

Link

Single Crack Mode1

john --single hashes.txt

Uses login names and GECOS information to guess passwords based on user data.

Link

Incremental Mode3

john --incremental hashes.txt

Starts a powerful brute-force mode trying all possible character combinations.

Link
john --incremental:Alpha hashes.txt

Restricts incremental brute-force to alphabetic characters only.

Link
john --incremental:Digits hashes.txt

Restricts incremental brute-force to numeric digits only.

Link

Mask Attack2

john --mask=MASK hashes.txt

Attacks using a specific pattern where ?a represents all printable characters.

Link
john --mask=?u?l?l?l?d?d hashes.txt

Targets patterns like Upper-Lower-Lower-Lower-Digit-Digit (e.g., Pass12).

Link

Hybrid Attack1

john --wordlist=FILE --mask=MASK hashes.txt

Appends a mask to each word in the wordlist (e.g., password12).

Link

User Targeting2

john --users=LIST hashes.txt

Restricts the attack to only the specified usernames within the hash file.

Link
john --users=!LIST hashes.txt

Excludes specific usernames from the attack scope.

Link

Shell Filtering1

john --shells=LIST hashes.txt

Targets accounts that use specific valid login shells.

Link

Session Management2

john --session=NAME hashes.txt

Assigns a specific name to the cracking session for easier management.

Link
john --restore=NAME

Resumes a previously interrupted cracking session from the exact stopping point.

Link

Status Monitoring1

john --status=NAME

Prints the current status and progress of a running or paused session.

Link

Pot File Management1

john --pot=FILE hashes.txt

Uses a custom pot file path instead of the default ~/.john/john.pot.

Link

Loopback Attack1

john --loopback hashes.txt

Uses previously cracked passwords in the pot file as a dictionary for new hashes.

Link

Configuration1

john --config=FILE hashes.txt

Loads settings and rules from a custom configuration file.

Link

Performance Tuning2

john --fork=N hashes.txt

Splits the workload across N CPU cores processes for parallel cracking.

Link
john --max-run-time=N hashes.txt

Gracefully stops the attack after N seconds (useful for time-boxed audits).

Link

Advanced Rules1

john --rules:Wordlist --wordlist=FILE hashes.txt

Uses the complex 'Wordlist' rule section defined in john.conf.

Link

External Mode2

john --external=MODE hashes.txt

Uses an external C-like function defined in the config (e.g., keyboard walk).

Link
john --external=Repeats hashes.txt

Generates candidates with repeating patterns defined in external config functions.

Link

Markov Mode1

john --markov=MODE hashes.txt

Uses Markov chains to generate candidates based on statistical character frequency.

Link

Custom Charset1

john --make-charset=FILE

Generates a custom charset file based on current pot file statistics.

Link

Custom Charset Usage1

john --incremental=MODE --min-length=N --max-length=N hashes.txt

Forces incremental mode to focus strictly on a specific password length range.

Link

Candidate Generation2

john --stdout --wordlist=FILE --rules

Outputs generated password candidates to stdout without cracking (for piping).

Link
john --stdout --incremental

Outputs brute-force candidates to stdout to pipe into other tools like Hashcat.

Link

Output Formatting1

john --show --format=NAME --users=LIST hashes.txt

Shows cracked credentials filtered by format and specific username.

Link

Hash Type Validation1

john --test --format=NAME

Benchmarks a specific algorithm to check speed and stability on the host.

Link

Prince Integration1

john --prince=FILE hashes.txt

Uses the PRINCE algorithm (PRobability INfinite Chained Elements) for candidate generation.

Link

Memory Tuning1

john --save-memory=LEVEL hashes.txt

Adjusts memory usage logic (1-3) for memory-constrained environments.

Link

Regex Mode1

john --regex=PATTERN hashes.txt

Generates candidates based on a specific regular expression pattern.

Link

Salt Management1

john --salts=N hashes.txt

Processes only if the number of salts meets the specified threshold.

Link

Cost Management1

john --costs=MIN:MAX hashes.txt

Filters hashes based on cost factors (e.g., bcrypt rounds) to skip slow hashes.

Link

Blue Team Audit1

john --show --left hashes.txt

Displays only the uncracked hashes remaining in the file.

Link

Red Team Analysis2

john --list=rules

Lists all rule sections defined in the configuration for auditing attack logic.

Link
john --list=opencl-devices

Enumerates available OpenCL devices (GPUs) for hardware acceleration.

Link

Automation2

john --progress-every=N hashes.txt

Emits status lines every N seconds for automated log parsing.

Link
john --no-log hashes.txt

Disables logging to the .log file to reduce I/O or artifacts.

Link

Mask Hybrid1

john --mask=?d?d?w?d?d --wordlist=FILE hashes.txt

Injects the dictionary word into the middle of the mask pattern.

Link

Advanced Dictionary1

john --wordlist=FILE --mem-file-size=N hashes.txt

Controls buffer size for loading wordlists to optimize large file handling.

Link

Incident Response1

john --show --format=NAME hashes.txt > report.txt

Exports cracked NTLM hashes to a file for lateral movement analysis.

Link

Rule Debugging1

john --rules --wordlist=FILE --stdout | head

Previews the first 20 outputs of a rule set to verify mutation logic.

Link

Dynamic Compilation1

john --list=build-options

Checks how the binary was compiled (e.g., SIMD, OpenMP) for optimization.

Link

Custom Mask Config1

john --mask=MASK --min-length=N hashes.txt

Overrrides config defaults to force an exact mask length.

Link

Environment Safety1

john --restore-timer=N hashes.txt

Sets the interval for writing the restore file to prevent data loss on crash.

Link

Format Filtering1

john --list=formats --format=dynamic

Lists only generic dynamic formats (useful for custom hash construction).

Link

Hardware Acceleration1

john --format=NAME --dev=N hashes.txt

Targets a specific OpenCL device ID for cracking.

Link

Dupe Suppression1

john --wordlist=FILE --dupe-suppression hashes.txt

Suppresses duplicate candidates generated from an unsorted wordlist.

Link

Pot Sync1

john --pot=new.pot --loopback=old.pot hashes.txt

Feeds cracks from a master pot file into a specific session pot file.

Link

Safe Termination1

q

Safely aborts the current session and saves the restore point state.

Link