John the Ripper Jumbo: A Complete Guide to...

Installation and GPU-accelerated cracking guide for John the Ripper Jumbo, including prerequisites, OpenCL setup, examples, and optimization tips.

Installation Steps

Step 1: Verify Prerequisites

Before starting the installation, confirm your system has the following tools installed:

  • C compiler (GCC), Make, and Git
  • NVIDIA GPU users: Install CUDA Toolkit (via the OpenCL driver layer) and the nvidia-opencl-dev package
  • AMD GPU users: Install the corresponding ROCm / OpenCL drivers and the ocl-icd-opencl-dev package
# Ubuntu/Debian: Install basic build tools and OpenCL development libraries
sudo apt-get install build-essential git libssl-dev zlib1g-dev ocl-icd-opencl-dev

# NVIDIA GPU additional package
sudo apt-get install nvidia-opencl-dev

Step 2: Clone the Source Repository

git clone https://github.com/openwall/john-the-ripper.git

Step 3: Enter the Source Directory

cd john-the-ripper/src

Step 4: Configure and Compile

Run ./configure to let the system automatically detect the environment and hardware capabilities. JtR Jumbo supports both NVIDIA and AMD GPUs through OpenCL — enabling OpenCL covers CUDA GPUs as well:

# Standard configuration (auto-detect OpenCL)
./configure

# Or explicitly enable OpenCL support
./configure --enable-opencl

After configuration, compile using the following command (-j4 uses 4 CPU cores to speed up compilation):

make -s clean && make -sj4

Step 5: Verify Installation & GPU Detection

After compilation, the john executable will appear in the john-the-ripper/run directory. Switch to that directory first:

cd ../run

Use these two commands to verify the installation:

# List detected OpenCL devices (verify GPU is correctly recognized)
./john --list=opencl-devices

# Run a performance benchmark to test cracking speeds for various formats
./john --test

If --list=opencl-devices successfully displays your GPU name and specifications, the GPU-accelerated environment is ready.


GPU-Accelerated Password Cracking

Leveraging the GPU's parallel computing power can dramatically reduce the time needed for password cracking. Key considerations and examples:

⚠️ Critical: Must Use the OpenCL Format Suffix

This is the most common mistake when using JtR GPU acceleration: GPU-accelerated format names must explicitly include the -opencl suffix. If you don't specify a format with -opencl, JtR will always use the CPU implementation and the GPU will remain completely idle.

# ❌ Wrong: Using CPU format (GPU will not be used)
./john --format=raw-md5 --wordlist=rockyou.txt hashes.txt

# ✅ Correct: Using OpenCL format (GPU acceleration active)
./john --format=raw-md5-opencl --wordlist=rockyou.txt hashes.txt

List all formats that support OpenCL acceleration:

./john --list=formats | grep opencl

Practical Example: Single GPU Dictionary Attack

./john --format=raw-md5-opencl --wordlist=rockyou.txt --rules -dev=0 hashes.txt

Parameter explanations:

ParameterDescription
--format=raw-md5-openclSpecifies the OpenCL-accelerated hash format (must include -opencl suffix)
--wordlist=rockyou.txtUses dictionary attack mode with rockyou.txt as the wordlist source
--rulesApplies common password mutation rules to dictionary words (case substitution, number appending, etc.)
-dev=0Specifies use of GPU device #0 (note: single dash, no "gpu" string after equals sign)

Multi-GPU Parallel Acceleration

If the system has multiple GPUs, specify both the device numbers and the --fork parameter:

# Use GPU 0 and GPU 1, fork one process each (2 parallel processes total)
./john --format=sha512crypt-opencl --wordlist=rockyou.txt -dev=0,1 --fork=2 hashes.txt

Query available GPU device numbers:

./john --list=opencl-devices

Performance Optimization Tips

  • Understand GPU acceleration benefits vary by hash type: GPU parallel computing provides extremely high absolute speeds for fast hashes (MD5, SHA-1, NTLM) (billions of attempts per second), but CPU speeds are also considerable for these. The relative benefit is most significant for slow hashes (bcrypt, scrypt, PBKDF2, sha512crypt) — these algorithms have high computational requirements, and the GPU's massive core count delivers much higher speedup multipliers. In practice, these are the scenarios where GPU deployment is most worthwhile during security audits.
  • Keep GPU drivers updated: Maintain NVIDIA/AMD drivers and CUDA/ROCm at the latest versions to ensure optimal OpenCL compatibility and performance.
  • Trade-offs with wordlists + rules: Larger wordlists combined with --rules take longer, but GPU acceleration scales proportionally — still very worthwhile overall for large dictionary attacks.
  • Use session pause and resume: For long cracking tasks, create a session with --session=name and resume with --restore=name after interruption to avoid restarting from scratch.
  • Multi-GPU with --fork: With multiple GPUs, always specify both -dev=0,1,... and the corresponding --fork=N; otherwise only a single GPU will be used.

More cybersecurity news