If you forget the password to your access point, Wi-Fi Protected Setup, better known simply as WPS, lets you connect to the network using an 8-digit number printed on the bottom of the router. This is somewhat more convenient than just resetting the router with the button on the back, but also a massive security hole because of the way many routers deal with implementing this feature.
A WPS PIN on the bottom of a router can be seen here.
WPS PINs have been attacked by two successive generations of attacks, starting with the most basic brute-forcing methods targeting the way some routers split the PIN into two separate halves before checking them. Years later, another attack emerged that remains effective against many routers and greatly reduces the amount of time needed to attack a target.
The Reaver brute-force attack was a radical new weapon for Wi-Fi hacking when it was presented in 2011. One of the first practical attacks against WPA- and WPA2-encrypted networks, it totally ignored the type of encryption a network used, exploiting poor design choices in the WPS protocol.
Reaver allowed a hacker to sit within range of a network and brute-force the WPS PIN, spilling all the credentials for the router. Worse, the 8-digit-long PIN could be guessed in two separate halves, allowing for the attack to take significantly shorter than working against the full length of the PIN.
While it did require a hacker to be within range of the target Wi-Fi network, it was able to penetrate even WPA and WPA2 networks with strong passwords using an online attack. This is opposed to an offline attack, such as WPA handshake brute-forcing, which does not require you to be connected to the network to succeed. While this was a limitation, the benefit is that there is typically no sign of this kind of attack to the average user.
The Reaver attack proved extremely popular, and since 2011, many routers now have protections to detect and shut down a Reaver-type attack. In particular, these attacks have been greatly slowed by rate-limiting, which forces a hacker to wait several seconds before each PIN attack. Many routers will now “lock” the WPS setting in response to too many failed PIN attempts. This has led the Reaver attack to be considered deprecated against most modern routers.
While routers updated some settings to prevent routers from being attacked via brute-force, serious flaws still existed in the way many routers implement encryption. In programming, it’s difficult to create truly random numbers, which is required to produce strong encryption. To do this, we use a function that starts with a number called a “seed,” which, after being passed into the function, produces a pseudo-random number.
If you use a long or varying “seed” number, you can get the same result as a number that’s actually random, but if you use an easily guessed “seed,” or even worse … the same one repeatedly, you create weak encryption that is easy to break. This is exactly what router manufacturers did, giving rise to Pixie-Dust, the second generation of WPS PIN attacks.
Since many routers with WPS enabled use known functions to produce random numbers with seed values like “0” or the time stamp of the beginning of the WPS transaction, the WPS key exchange has fatal flaws in the way it encrypts messages. This allows the WPS PIN to be cracked in a matter of seconds.
Our tool of choice for demonstrating a WPS Pixie-Dust attack will be a wireless attack framework called Airgeddon. Integrating many wireless attack tools into a suite well suited for beginners, Airgeddon will allow you to select and configure your wireless card, find and load targeting data from nearby networks, and attack targeted networks — all from the same tool.
A WPS Pixie-Dust attack in progress.
There are some trade-offs to using Airgeddon, as the way it passes data between reconnaissance and attack modules requires you to be able to open multiple terminal windows in a GUI desktop environment. If you are using SSH to access your Kali device, you may need to target vulnerable networks using the wash command included in the Reaver tool and pass the data manually to the Bully tool instead.
Since different wireless network cards work better or worse with Reaver or Bully, Airgeddon lets you pass target data between the two scripts and find the sweet spot for your wireless card, the attack module you are using, and the target you are attacking.
To use the Bully module of Airgeddon, you’ll need to be running Kali Linux or another supported distro. Make sure your Kali Linux is fully updated before you begin, as you’ll need several packages installed for this tool to work.
You’ll also need a wireless network adapter capable of packet injection and wireless monitor mode. We recommend the Panda PAU09, or you can check out our guide linked below to see other popular wireless network adapters.
Finally, make sure you have permission from the owner of the network you’re testing this tool on before you start. This tool can work very quickly, and if the network is monitored, you will leave evidence in the logs.
Step 1Download Airgeddon
First, you’ll need to install Airgeddon by cloning the git repository. Open a terminal window, and type the following to clone the repo, change directory to the new folder, and run “airgeddon.sh” as a bash script.
git clone github.com/v1s1t0r1sh3r3/airgeddon.git
sudo bash ./airgeddon.sh
If it works, you should see an alien loading screen. Don’t get too spooked, the script will start soon.