How to install Pyrit in Kali Linux?

How to install Pyrit in Kali Linux - blackMORE Ops
This guide (How to install Pyrit in Kali Linux) is part of a series that guides readers on How to install FGLRX, AMD APP SDK, CAL++ and Pyrit in Kali Linux. The idea is to install correct drivers in Kali Linux for your GPU and use CPU+GPU combination with Pyrit to make raw data crunching faster. An example would be to utilize this combined processing power to crunch though WPA/WPA2 capture file to find Wifi password.
Readers, please follow this series in the following order:
  1. Install AMD ATI Driver (fglrx) in Kali Linux 1.x
  2. How to install AMD APP SDK in Kali Linux?
  3. How to install CAL++ in Kali Linux?
  4. How to install Pyrit in Kali Linux?

Credits:

A big thanks goes to hexed6 from Kali Forums for his original post.
Thanks to  for his CAL++ project in Sourceforge.
Thanks to Pyrit project

Check FGLRX Installation

First check if fglrx module is installed:
lsmod | grep fglrx
You should get a response similar to:
fglrx 2635205 82
button 12945 1 fglrx

Why Pyrit?

Pyrit allows to create massive databases, pre-computing part of the IEEE 802.11 WPA/WPA2-PSK authentication phase in a space-time-tradeoff. Exploiting the computational power of Many-Core- and other platforms through ATI-Stream, Nvidia CUDA, OpenCL and VIA Padlock, it is currently by far the most powerful attack against one of the world’s most used security-protocols.

Install Pyrit in Kali

Install prerequisites

apt-get install libpcap-dev

Remove existing installation of pyrit

apt-get remove --purge pyrit
If you are not using a clean install of Kali (not recommended), you may need to issue the following command:
rm -r /usr/local/lib/python2.7/dist-packages/cpyrit/

Download pyrit

svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn

Install Pyrit

cd pyrit_svn/pyrit/
./setup.py build install

Install CAL++ plugin

cd ../cpyrit_calpp/

Edit setup.py

Edit setup.py file and modify/replace the followings:
find VERSION = '0.4.0-dev' and replace with VERSION = '0.4.1-dev'
find CALPP_INC_DIRS.append(os.path.join(CALPP_INC_DIR, 'include')) and replace with
CALPP_INC_DIRS.append(os.path.join(CALPP_INC_DIR, 'include/CAL'))

Save and quit, then issue the following command:

./setup.py build install

There will be several warnings, but hopefully no errors and everything will be installed.

Test cpyrit

List available core

pyrit list_cores
...

Output

The following cores seem available...

#1: 'CAL++ Device #1 'AMD GPU DEVICE''
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'

Benchmark Pyrit

pyrit benchmark
...

Output

Computed 7548.89 PMKs/s total.
#1: 'CAL++ Device #1 'AMD GPU DEVICE'': 5599.3 PMKs/s (RTT 1.4)
#2: 'CPU-Core (SSE2)': 685.6 PMKs/s (RTT 3.0)
#3: 'CPU-Core (SSE2)': 688.5 PMKs/s (RTT 3.0)
#4: 'CPU-Core (SSE2)': 691.9 PMKs/s (RTT 3.0)