Skip to content

Instantly share code, notes, and snippets.

@IvanIFChen
Last active July 22, 2020 01:47
Show Gist options
  • Save IvanIFChen/28859e09d4378261a84feef23b1dcb67 to your computer and use it in GitHub Desktop.
Save IvanIFChen/28859e09d4378261a84feef23b1dcb67 to your computer and use it in GitHub Desktop.

Setting up John the Ripper on GCP with OpenCL Guide

Creating the VM instance on GCP

Navigate to https://console.cloud.google.com and create a new instance with these following configurations:

disclaimer: I am only using this for a class assignment therefore only cracking some simple hashes, I am maxing out on everything even if I don't need them.

  • Max CPU cores
  • Max RAM
  • At least 1 GPU
  • Boot disk: "Intel® optimized Deep Learning Image: Base m19 (with Intel® MKL and CUDA 10.0)" This will have CUDA pre-configured.

Installing John the Ripper with OpenCL

clone https://https://github.com/magnumripper/JohnTheRipper , then make sure the GPU is "attached" (or available)

lsmod | grep nv

We should see the nvidia module here, to install opencl:

sudo apt install ocl-icd-opencl-dev

Now lets try if configurations of JtR is correct:

cd src
./configure

If there's an error: configure: error: JtR requires OpenSSL headers being installed, do

sudo apt install libssl-dev

Now we should be able to configure correctly:

./configure

Make sure:

OpenCL support ................................ yes

Now lets compile it with: (this is also mentioned in the very bottom of the ./configure log)

make -s clean && make -sj4

If everything is correct (if not then idk what to do, google?), cd to JohnTheRipper/run and do

./john --list=opencl-devices

to show the current configured GPU. And now if we run ./john --test it should show the result of using the configured GPU.

Happy hacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment