John the Ripper openMP 07-10-2014, 10:34 AM
#1
Hello everybody
Today i am going to explain how to properly configure John the ripper with openMulti-Processing (openMP)
A brief introduction first. As most of you probably already know, John the Ripper is one of the most popular password cracking tools.
It's default configuration is already optimized and it's the fastest way to crack password when no info or schemas about passwords is given.
Starting from version 1.7.9, John the ripper support openMulti-Processing. This option, will let you run JTR with the desired amout of cores (threads), increasing significantly the cracking speed.
In order to configure John the Ripper with this option we have to properly configure it.
STEP 1
Download and unpack John the Ripper:
Code:
> $ wget http://www.openwall.com/john/j/john-1.8.0.tar.gz
> tar -xvzf john-1.8.0.tar.gzSTEP 2
Enable openMulti-Processing (openMP)
Code:
> cd john-1.8.0/src
john-1.8.0/src > vi MakefileNow find and uncomment these two lines:
Code:
#OMPFLAGS = -fopenmp
#OMPFLAGS = -fopenmp -msse2Save and exit
STEP 3
Compiling John the Ripper:
Code:
john-1.8.0/src > makeif the above command requires additional arguments just do the following:
make linux-x86-64[/code]
The comand above works for linux-x86-64 bits, otherwise just type make and hit tab two times to see a complete list for different systems
Now John is compiled and should be properly working
STEP 4
Test John the ripper with openMP
Code:
john-1.8.0/src > cd .. && cd runHere's with 1 single thread (which is the default without openMP):
Code:
john-1.8.0/run > OMP_NUM_THREADS=1 ./john file_to_crack![[Image: onet.png]](http://s26.postimg.org/6lxjcg2gp/onet.png)
Now with full speed:
Code:
john-1.8.0/run > OMP_NUM_THREADS=8 ./john file_to_crack![[Image: eightt.png]](http://s26.postimg.org/95t66jq0p/eightt.png)
As you can see using 8 threads the speed is 159018 c/s and cacked 3 passwords in 25 seconds, almost 10 times better than the single thread (default mode) which has a speed of 17009 c/s.
General Notes
- Running JTR with full processor speed will make you PC go very slow as all the resources are being used for password cracking, so use it carefully
- In order to find how many threads your processor has, type the following (without quotes) in terminal: "cat /proc/cpuinfo"
- This is not a tutorial about how to use JTR
- IMPORTANT: This feature is available from version 1.7.9, so previous versions won't work
Fastest way to crack passwords
We have seen how to configure JTR using Multi-Processing however it's not the fastest way to crack passwords. For those interested, the best way is to rely on GPU (graphical process unit) which has been proven to be way faster:
![[Image: pyrit.png]](http://s26.postimg.org/u1fghsm7t/pyrit.png)
If we sum the cores we get 600*8 = 4800 PKM/s vs 7546 PKM/s of the GPU. To be noticed that GeForce GTX650 is now considered a normal and quite affordable video card.
Thanks for reading,
lady_godiva
lady_godiva
Everything is relative


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: T4OUWZ1.png]](http://i.imgur.com/T4OUWZ1.png)

