JTR cluster

From BackTrack Linux
Jump to: navigation, search

Building a John the Ripper Cluster in Backtrack5 R2 & R3

  • In this tutorial we are going to build a cluster that will aid us in cracking hashes using John the Ripper.
  • The first thing we want to do is install libssl-dev and mpich2 after which we configure it. (Note: secretword must be the same on each machine.)
root@bt:~# apt-get install mpich2 libssl-dev
root@bt:~# touch /etc/mpd.conf
root@bt:~# chmod 600 /etc/mpd.conf 
root@bt:~# echo "secretword=bt" >> /etc/mpd.conf
root@bt:~# touch mpd.hosts
root@bt:~# echo "" >> mpd.hosts 
root@bt:~# chmod 600 mpd.hosts
root@bt:~# mpdboot
root@bt:~# mpdtrace 
root@bt:~# mpdallexit 
  • Now we install the the MPI version of John the Ripper.
root@bt:~/Desktop# wget http://www.bindshell.net/tools/johntheripper/john-
root@bt:~/Desktop# tar xvfz john- 
root@bt:~/Desktop/john- make clean linux-x86-sse2
root@bt:~# mv -f john- /pentest/passwords/john-mpi
  • After installing the MPI version of John the Ripper we configure our /etc/hosts file.
root@bt:~# nano /etc/hosts                                                         localhost    server    node1

# The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts

NOTE: Do the exact same thing on the client.

  • Once we have the server and the client setup it's time to enable our SSH server and transfer the configuration files from the server to the client.
root@bt:~# ssh root@ mkdir -p /root/.ssh
root@bt:~# cat /root/.ssh/id_rsa.pub | ssh root@ 'cat>>.ssh/authorized_keys'
root@bt:~# scp /root/mpd.hosts root@
root@bt:~# scp /etc/mpd.conf root@
root@bt:~# scp /etc/hosts root@
  • If we start the cluster we should see our server and client.
root@bt:~# mpdboot -v --file=/root/mpd.hosts -n 2
running mpdallexit on bt
LAUNCHED mpd on bt  via  
RUNNING: mpd on bt
LAUNCHED mpd on  via  bt2
RUNNING: mpd on

root@bt:~# mpdtrace bt bt2
  • Now let's test our cluster.
root@bt:~# echo "admin:21232f297a57a5a743894a0e4a801fc3" > /root/test
root@bt:~# scp /root/test root@
root@bt:~# mpiexec -host -np 2 /pentest/passwords/john-mpi/run/john --format:raw-MD5  /root/test
Loaded 1 password hash (Raw MD5 [raw-md5])
admin            (admin)
admin            (admin)
thread: 1 guesses: 1  time: 0:00:00:00 100% (1)  c/s: 160  trying: admin - admins
thread: 0 guesses: 1  time: 0:00:00:00 100% (1)  c/s: 133  trying: admin - admins