JtR 1.7.9 with Jumbo 6 now offers GPU support for computationally intensive (slow-hash) password encryptions like WPA-PSK. This POST will detail compiling JtR with OpenCL support. I have an really old ATI Radeon HD card but it works with OpenCL so here goes. This compile works for Ubuntu LTS 12.04 and 10.04. You should read the doc file README.opencl for notes for more info on how to compile JtR with OpenCL support.
For additional information you can read the JtR documentation and wiki from Openwall.
OpenSSL is needed. This can be installed through your package manager or may already be installed. Remember to install the development package (libssl-dev or libssl-devel). I like the latest and greated so instructions on download and compile are included below.
Download and install the latest OpenSSL
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
$ tar zxf openssl-1.0.1c.tar.gz
$ cd openssl-1.0.1c
$ ./config --openssldir=/usr/local
$ make
$ sudo make install
Identify your Graphics Card
$ sudo lshw -C video
Download the AMD/ATI drivers (http://support.amd.com/us/gpudownload/Pages/index.aspx)
NOTE: you may have to uninstall the old driver or use the –force option.
$ wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-4-x86.x86_64.run
$ sudo sh amd-driver-installer-12-4-x86.x86_64.run
I selected option 1. Install Driver 8.961 on X.Org 6.9 or later
Download the AMD SDK for OpenCL (http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx)
$ wget http://developer.amd.com/Downloads/AMD-APP-SDK-v2.7-lnx32.tgz
$ tar zxf AMD-APP-SDK-v2.7-lnx32.tgz
$ sudo ./Install-AMD-APP.sh
32-bit Operating System Found…
Starting Installation of AMD APP….
SDK package name is :AMD-APP-SDK-v2.7-RC-lnx32.tgz
Current directory path is : /home/edge/source
Untar command executed succesfully, The SDK package available
Untar command executed succesfully, The ICD package available
Copying files to /opt/AMDAPP/ …
SDK files copied successfully at /opt/AMDAPP/
AMD Catalyst OpenCL Runtime is available hence skiping OpenCL CPU Runtime Installation Installation
ln: creating symbolic link `/usr/lib/libOpenCL.so’: File exists
Updating Environment vairables…
32-bit path is :/opt/AMDAPP/lib/x86
Environment vairables updated successfully
/sbin/ldconfig.real: Can’t stat /lib/i486-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can’t stat /lib64: No such file or directory
AMD APP installation Completed
>> Reboot required to reflect the changes
>> Please ignore the ldconfig errors, Expected behaviour
>> Please refer the ‘AMDAPPlog file’ in the same directory
>> Refer the README.txt in the same directory for more info
Now with the prerequisites for compiling JtR with OpenCL support.
$ wget http://www.openwall.com/john/g/john-1.7.9-jumbo-6.tar.gz
$ tar zxf john-1.7.9-jumbo-6.tar.gz
$ cd john-1.7.9-jumbo-6/src
$ make linux-x86-opencl (if you manually obtained the header files)
$ make -I/opt/AMDAPP/include/CL linux-x86-opencl
JtR comes with some Perl scripts. You will need the following packages for the scripts to work.
$ sudo apt-get install libnet-ldap-perl libcrypt-des-perl
For some reason libdigest-sha1-perl doesn't get identified by the sha-test.pl script.
$ wget http://search.cpan.org/CPAN/authors/id/U/UW/UWEH/SHA-1.2.tar.gz
$ tar zxf SHA-1.2.tar.gz
$ cd SHA-1.2
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for SHA
Warning: overwriting endian.h
Do you want to use the original SHA or the new standard SHA-1?
Enter 0 for the original or 1 for the new standard. [1]
$ make
$ sudo make install
Hi, thanks for the excellent tutorial.
Just a note – JTR + OpenCL is 32-bit only, so if you compile it on 64-bit system, you’ll have some problem. Usually with error messages such as :
——————
gcc -c x86.S
x86.S: Assembler messages:
x86.S:145: Error: invalid instruction suffix for `push’
x86.S:180: Error: invalid instruction suffix for `pop’
x86.S:971: Error: 0xefcdab89 out range of signed 32bit displacement
——————
You’ll need to modify the src/Makefile as noted here :
http://www.openwall.com/lists/john-users/2009/12/08/8
Also install the multilib : sudo apt-get install gcc-multilib
Then it’ll compile just fine.
Hope it helps.