Parallella Board : Password Cracking

Ever since reading a good book about password security as an impressionable intern, I have become something of a password security obsessive... I went from exclusively using my first name as my password for everything, to using different, 30+ character, mixed case, insane passwords for each individual website.

While this often tries my good wife's patience, it does give us a lot of peace of mind about the security of our online presence... (1Password also goes a long way to smooth over the marital strain of maintaining over 300 unique passwords.)

Whenever I create a password, a brief image often flits across my mind of a nefarious hacker with an array of graphics cards feverishly computing hashes to crack my newly minted password... (To get a better sense of the time involved in cracking passwords, I recommend the Password Haystacks site.)

I recently acquired a Parallella Board which advertises itself as supercomputing for the masses. As I was poking around the examples I found they had ported a version of John The Ripper (a tool for cracking password hashes) to take advantage of the Parallella's multi-core Epiphany Coprocessor.

So this was an opportunity to see the other side of password security and see first hand, how easy or how hard it is to crack a password, and test the strength of some of my passwords along the way.

(And... It also is a good exercise for my Parallella Board and an opportunity to play with a new toy!)

So let's dive into setting up the Parallella Board, compiling John The Ripper, and running it on a sample Linux passwd file.

Setting Up Hardware

Unlike other boards I have played with in the past (Raspberry Pi, UDOO, Arduino), Parallella has a much more stringent set of required hardware to get up and running! Mostly this is in the interest of saving space on the board and feels well thought through even though you need to buy several extra cables.

The Parallella uses a micro-HDMI port instead of regular HDMI, requiring a special cable to connect it to a display. I found this cable on Amazon to work well.

It also uses a single micro-USB port to provide keyboard and mouse inputs, assuming that you will use a powered hub. This requires both a powered hub (I like this one, which also works well for Bitcoin Mining...) and a micro-USB to regular USB adapter since most hubs do not have a micro-USB connector.

Finally, you will need the correct power supply. It must be 5V output and at least 2 amps (I went for 3 amps).

NOTE: You may need external cooling as well... I bought a high speed fan and, in an act of extraordinary laziness, plugged it into my UDOO Board (which had a convenient fan connector eliminating the need for soldering) and set it on top of my Parallella Board. So far, that has been enough...

Setting Up Software

The process for burning the Parallella OS to a micro SD card is slightly more complex than it is for other boards. The official instructions need to be followed very carefully. Especially the part about copying and renaming the kernal files! (I omitted the kernal files the first time and ended up with a Parallella Board that did nothing when powered up...)

NOTE: You should give attention to what processor you have in your Parallella (Zynq 7010 or Zynq 7020). I did not find it marked on the Parallella Board because of the positioning of the heatsinks, and I had to double check my invoice to find the processor model number.

Once you have properly flashed a micro SD card with the OS you are ready to power up the board! The official quick start guide is very helpful, especially with the diagram indicating where the correct ports are located.

Once the Parallella is powered up you can attach it to a monitor (using HDMI) or access it directly over SSH. If you choose the latter option you can find its DHCP assigned IP address either by logging into your router or using an app that shows devices on your LAN. (I use WiFi Analyzer on my Android Phone. Go to Tools -> LAN Neighbours to see a list of other devices on your network.)

To log in, use user linaro and password linaro.

I usually setup a static IP for my boards. This is easy on the Parallella.

sudo vi /etc/network/interfaces  

Then change:

iface eth0 inet dhcp  

To:

iface eth0 inet static  
address <YOUR IP ADDRESS>  
netmask 255.255.255.0  
gateway <YOUR GATEWAY, typically 192.168.1.1>  

I then rebooted the Parallella Board and it adopted the static IP with no problem!

John The Ripper

In a stroke of extraordinary thoughtfulness, the Parallella team preinstalled git on the board and checked out the example repositories to the linaro user's home directory.

From my SSH terminal I first updated the examples to the latest version.

cd parallella-examples  
git pull  

Then I went into the parallella-examples/john directory.

First you need to build John The Ripper. A make file is provided already, so just execute:

cd src  
make linux-parallella  

and you are done! Once that completes successfully you have a john executable in the parallella-examples/john/run directory.

I am not an expert in John The Ripper and it is a very flexible and complex tool... So just as a simple example though we will just use it with its defaults and target a Linux passwd file.

As a test case I decided to create a couple sample linux users and give them sample passwords.

useradd test_john_1  
passwd test_john_1  
...

The passwd command prompts you to set and confirm a password for the user. I created several users and gave them passwords ranging from bad (password), to still bad (password12345), to (hopefully) impossible (MonkeyMonkeyMonkey^^^RainFail!).

Creating these users populates your systems passwd and shadow files with the hashes for those user's passwords. John The Ripper provides a tool for you to create an input file from the passwd and shadow files. Here is what I did to extract them:

sudo cp /etc/passwd .  
sudo cp /etc/shadow .  
sudo chown linaro:linaro passwd  
sudo chown linaro:linaro shadow  
./unshadow passwd shadow > passwords

This creates a passwords file that can serve as input to John The Ripper.

./john passwords

This lights up the hash cracking engine and starts making your Parallella Board quite warm!

As John The Ripper runs you can hit any key for status. Any hashes that it cracks are stored in a binary file.

To see the results you can execute:

./john --show passwords

Welcome to the dark side! You just ran a password cracker on some password hashes! With great power comes great responsibility (and hopefully an incentive to use really good passwords!)

Questions? Comments? Email me at: [email protected]