How to install pyrit in Kali Linux

What is 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 and OpenCL, it is currently by far the most powerful attack against one of the world’s most used security-protocols.

Make sure you have the AMD SDK as well as AMD ATI proprietary (links below) first:

 

1. Install prerequisites

# apt-get install libpcap-dev

2. Remove existing installation of pyrit

# apt-get remove --purge pyrit

3. Download pyrit

# svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
# svn checkout https://github.com/JPaulMora/Pyrit pyrit_svn

git clone https://github.com/JPaulMora/Pyrit.git

This will download the latest version, at the time of writing this article it is 0.4.1 (revision 308)

4. Install Pyrit

# cd pyrit_svn/trunk/
# cd Pyrit
# ./setup.py build install

If it goes all well, you should see a similar output

Successful Pyrit install

5. Verify pyrit installation

# pyrit

This image below indicates that pyrit can run successfully

Pyrit successful run

6. Install OpenCL

~/pyrit_svn/pyrit# wget http://pyrit.googlecode.com/files/cpyrit-opencl-0.4.0.tar.gz
~/pyrit_svn/pyrit# tar xvf cpyrit-opencl-0.4.0.tar.gz
~/pyrit_svn/pyrit# cd cpyrit-opencl-0.4.0

Edit setup.py and do the following

  • Change VERSION = ‘0.4.0’ to VERSION = ‘0.4.1-dev’
  • Add the SDK include path between the [] in OPENCL_INC_DIRS = [] for example OPENCL_INC_DIRS = [“/opt/AMDAPPSDK-2.9-1/include]
  • Add the SDK library path between the [] in OPENCL_LIB_DIRS = [] for example OPENCL_INC_DIRS = [“/opt/AMDAPPSDK-2.9-1/lib/x86_64]

Save and quit:

7. Build and install OpenCL

./setup.py build install

Found this post useful?

Subscribe to our RSS feed, follow us on Twitter or help us grow by sharing our content using the buttons below

This entry was posted in Uncategorized. Bookmark the permalink.

7 Responses to How to install pyrit in Kali Linux

  1. Chris says:

    The download link for pyrit doesn’t work

    # svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
    svn: E160013: Unable to connect to a repository at URL ‘http://pyit.googlecode.com/svn/trunk/ pyrit_svn’
    svn: E160013: ‘/svn/trunk/ pyrit_svn’ path not found

    • The link has been updated. I apologize for not updating it after google archived it’s code. I have also update the instructions and tested it out, please let me know if you are still facing any issues

  2. George says:

    root@kali:~/pyrit_svn/trunk# ./setup.py build install
    running build
    running build_py
    running build_ext
    building ‘cpyrit._cpyrit_cpu’ extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=”0.5.1″ -maes -mpclmul
    cpyrit/_cpyrit_cpu.c:35:26: fatal error: openssl/hmac.h: No such file or directory
    #include
    ^
    compilation terminated.
    Failed to build; Compiling without AES-NI
    building ‘cpyrit._cpyrit_cpu’ extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION=”0.5.1″
    cpyrit/_cpyrit_cpu.c:35:26: fatal error: openssl/hmac.h: No such file or directory
    #include
    ^
    compilation terminated.
    error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

    dont know whats wrong….can someone help me?????

    • It seems you skipped the first step to install prerequisites.

      The error says you don’t have ssl header files. So just install them.

      sudo apt-get install libssl-dev

  3. Linda Lanne says:

    Does anyone know why we can update/upgrade 100s of programs that came as a part of Kali…. just by using apt-get ?

    But for pyrit it’s a very long, complex, confusing process, instead.

    Is Pyrit some kind of “special” program?

  4. Mona says:

    Again, link not working 404 error.

    # svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
    svn: E160013: Unable to connect to a repository at URL ‘http://pyit.googlecode.com/svn/trunk/ pyrit_svn’
    svn: E160013: ‘/svn/trunk/ pyrit_svn’ path not found

  5. OKCarl says:

    I have Kali running on a 300 GB external hard drive with a 200 GB persistence partition. I can get pyrit to work my dictionary file (out on the persistence partition) with command attack_passthrough. I get out of space error messages when I pre-compute my dictionary file and use the commands attack_db or attack_batch.
    Advice? Suggestions?

Leave a Reply to Timour Rashed Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.