Skip to content

Instantly share code, notes, and snippets.

@doraeric
Last active August 31, 2019 13:45
Show Gist options
  • Save doraeric/6fa17a35e21f675e110512756a0d6bc8 to your computer and use it in GitHub Desktop.
Save doraeric/6fa17a35e21f675e110512756a0d6bc8 to your computer and use it in GitHub Desktop.

John the Ripper 1.8.0-jumbo-1

Installation

Compile with cuda support, tested with nvidia/cuda:9.0-devel and nvidia/cuda:10.0-devel

docker run --gpus all --rm -i -t -v $(pwd)/JohnTheRipper-1.8.0-jumbo-1:/JohnTheRipper-1.8.0-jumbo-1 nvidia/cuda:9.0-devel bash

apt-get update
dist=$(. /etc/os-release;echo $ID$VERSION_ID)
if [ "$dist" = "ubuntu18.04" ]; then apt-get install -y sudo gcc-4.8 g++-4.8 libssl1.0-dev zlib1g-dev nvidia-opencl-dev
else apt-get install -y sudo gcc-4.8 g++-4.8 libssl-dev zlib1g-dev nvidia-opencl-dev
fi
ln -sf gcc-4.8 /usr/bin/gcc; ln -sf g++-4.8 /usr/bin/g++

cd JohnTheRipper-1.8.0-jumbo-1/src
echo $PATH
sudo -u '#1000' -g '#1000' -s
# PATH=...
./configure
make clean && make -sj4
# if sudo failed, run chown
# chown -R 1000:1000 ..

john commands

../run/unshadow /etc/passwd /etc/shadow > mypasswd
../run/john --devices=0 mypasswd
../run/john --devices=0 --format=sha512crypt-cuda mypasswd

Official Document

https://openwall.info/wiki/john/GPU

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