Script to automate using multiple wordlist against caputured WIFI handshakes using hashcat
There are a few prequisites that you will need. Those are:
- Capture handshakes
- Install Python
- Install Hashcat
** DISCLAIMER ** Remember to only capture handshakes from networks that you have permission to capture them from.
You can use hardware devices such as the Wifi Pineapple by Hak5, a pwnagotchi, flipper zero and other such devices. Another option is to run softare like aircrack, to capture handshakes using a computer.
If you have a pcap file, it will need to be converted to a supported file for Hashcat. Hashcat has a Converter tool that can assist in converting pcaps to a 22000 file format. This is not always successful, but it it is worth trying.
Python.org has a Wiki page that is best on how to install Python itself.
Download the 7zip that contains everything you need from Hashcat's website. Once the files are downloaded, extract them. In the directory that the files were extracted to thee will be a hashcat.exe file. ** NOTE: This directory is needed for the config.py file.***
Install Hashcat with your local repo manager. For Debian users, such as Kali, Ubuntu, etc use the following:
sudo apt install hashcat
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then install Hashcat
brew install hashcat
Now that the prequisites are out of the way. You will need to modify the config.py file. This file contains information about your setup such as where the 22200 files are locate, where hashcat is stored, and a few other options.
The config.py file has six variables. Three of the variables will need to be changed, the other three can be left at their default unless there is a need to change them.
This variable is for the directory, or file location that the 22000 files are stored at.
This is the path to where the wordlist are stored.
This is for Windows users only. It will tell the script where the hashcat.exe is stored.
If your hashcat tune file is not located in the same directory as hashcat, then hashcat will display an error. This should be changed only if that error is encountered.
This is the location where custom rules are applied, for example adding additional characters at the end of each wordlist entry. Using this will increase the amount of time it takes hashcat to crack a hash since it has more entries to test.
If you want to display all the cracked passwords, set this value to true. It will run hashcat --show -m
This is the mode that hashcat will use to try to crack the file. This should be 22000 or 22001.
Once the config file has been updated. Open a terminal/command prompt and change directories until you are in the PyCat directory. Once there run the following:
python main.py
** Note: You may need to use python3 instead of python depending on your environment variables**
If displayresults is set to True, the output will be similar to the following.
