wpa cracking - pyrit

Started by alessio, December 06, 2011, 12:10:52 AM

Previous topic - Next topic

alessio

Pyrit

Pyrit is a software for wpa cracking.
It has a lots of unique features:

- gpu and cpu computing
- precomputed hash with/out database
- live capture and cracking
- analysis and cleaning of useless captured packet
- direct use of dictionary and cap file compress in gzip format
- distributed wpa cracking

Requirement

For gpu computing you have to install amd driver and amd app sdk or nvidia drivers and toolkit:
How_to_install_Nvidia_CUDA_drivers_and_toolkit
amd-driver-and-amd-app-sdk-installation

Installation


sudo apt-get install python-dev libssl-dev libpcap-dev zlib1g-dev
svn checkout http://pyrit.googlecode.com/svn/trunk/ $HOME/pyrit_svn
cd $HOME/pyrit_svn/pyrit
python setup.py build
sudo python setup.py install --record pyrit_file.txt


To use nvidia-CUDA you have also install other module like this

cd $HOME/pyrit_svn/cpyrit_cuda
python setup.py build
sudo python setup.py install --record cuda_file.txt


To use AMD-OPENCL you have also install other module like this

cd $HOME/pyrit_svn/cpyrit_opencl
sed -i 's/ATISTREAMSDKROOT/AMDAPPSDKROOT/g' setup.py
python setup.py build
sudo python setup.py install --record opencl_file.txt


To use AMD-CAL++ you have also install other module like this and library CAL++.
CAL++ is simple library to allow writing AMD CAL kernels directly in C++, supported until AMD APP SDK 2.5.
This module give more performance in general, but I suggest to test it

sudo apt-get -y install cmake libboost-date-time-dev
svn co https://calpp.svn.sourceforge.net/svnroot/calpp/trunk $HOME/calpp
cd $HOME/calpp
sed -i.bak 's/ATISTREAMSDKROOT/AMDAPPSDKROOT/g' CMakeLists.txt
cmake .
make
sudo make install
cd $HOME/pyrit_svn/cpyrit_calpp
sed -i.bak -e 's/ATISTREAMSDKROOT/AMDAPPSDKROOT/g' -e "s/'include'/'include\/CAL'/" -e 's/0.4.0-dev/0.4.1-dev/' setup.py
python setup.py build
sudo bash -c "export AMDAPPSDKROOT=/opt/AMDAPP && python setup.py install --record calpp_file.txt"


reboot.


Uninstall

cat $HOME/pyrit_svn/pyrit/pyrit_file.txt | sudo xargs rm -rf
cat $HOME/pyrit_svn/cpyrit_cuda/cuda_file.txt | sudo xargs rm -rf
cat $HOME/pyrit_svn/cpyrit_opencl/opencl_file.txt | sudo xargs rm -rf
cat $HOME/pyrit_svn/cpyrit_calpp/calpp_file.txt |sudo xargs rm -rf
rm -rf $HOME/pyrit_svn


To use pyrit with Postgresql

sudo apt-get install python-sqlalchemy python-psycopg2 postgresql
sudo su postgres
createuser -D -P -R -S backbox
createdb -O backbox pyrit
exit
sed -i 's/file:\/\//postgres:\/\/backbox:[password]@localhost\/pyrit/' ~/.pyrit/config


Usage

Pyrit 0.4.1-dev (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Usage: pyrit [options] command

Recognized options:
 -b               : Filters AccessPoint by BSSID
 -e               : Filters AccessPoint by ESSID
 -h               : Print help for a certain command
 -i               : Filename for input ('-' is stdin)
 -o               : Filename for output ('-' is stdout)
 -r               : Packet capture source in pcap-format
 -u               : URL of the storage-system to use
 --all-handshakes : Use all handshakes instead of the best one

Recognized commands:
 analyze                 : Analyze a packet-capture file
 attack_batch            : Attack a handshake with PMKs/passwords from the db
 attack_cowpatty         : Attack a handshake with PMKs from a cowpatty-file
 attack_db               : Attack a handshake with PMKs from the db
 attack_passthrough      : Attack a handshake with passwords from a file
 batch                   : Batchprocess the database
 benchmark               : Determine performance of available cores
 benchmark_long          : Longer and more accurate version of benchmark (~10 minutes)
 check_db                : Check the database for errors
 create_essid            : Create a new ESSID
 delete_essid            : Delete a ESSID from the database
 eval                    : Count the available passwords and matching results
 export_cowpatty         : Export results to a new cowpatty file
 export_hashdb           : Export results to an airolib database
 export_passwords        : Export passwords to a file
 help                    : Print general help
 import_passwords        : Import passwords from a file-like source
 import_unique_passwords : Import unique passwords from a file-like source
 list_cores              : List available cores
 list_essids             : List all ESSIDs but don't count matching results
 passthrough             : Compute PMKs and write results to a file
 relay                   : Relay a storage-url via RPC
 selftest                : Test hardware to ensure it computes correct results
 serve                   : Serve local hardware to other Pyrit clients
 strip                   : Strip packet-capture files to the relevant packets
 stripLive               : Capture relevant packets from a live capture-source
 verify                  : Verify 10% of the results by recomputation