Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
http://static.arstechnica.net/2012/0...4a38-intro.jpg
The MAC address and WiFi Protected Setup PIN for the router attacked in our Reaver test.
WiFi hacking has long been a favorite pastime of hackers, penetration testers, and people too cheap to pay for their own Internet connection. And there are plenty of targets out there for would-be hackers and war drivers to go after—just launch a WiFi scanner app in any residential neighborhood or office complex, and you're bound to find an access point that's either wide open or protected by weak encryption. Fortunately (or unfortunately, if you're the one looking for free WiFi), those more blatant security holes are going away through attrition as people upgrade to newer routers or network administrators hunt down vulnerabilities and stomp them out. But as one door closes, another opens.
Last week, security researchers revealed a vulnerability in WiFi Protected Setup, an optional device configuration protocol for wireless access points. WPS lets users enter a personal identification number that is hard-coded into the access point in order to quickly connect a computer or other wireless device to the network. The structure of the WPS PIN number and a flaw in the protocol's response to invalid requests make attacking WPS relatively simple compared to cracking a WiFi Protected Access (WPA or WPA2) password. On December 28, Craig Heffner of Tactical Network Solutions released an open-source version of an attack tool, named Reaver, that exploits the vulnerability.
To find out just how big the hole was, I downloaded and compiled Reaver for a bit of New Years geek fun. As it turns out, it's a pretty big one—even with WPS allegedly turned off on a target router, I was able to get it to cough up the SSID and password. The only way to block the attack was to turn on Media Access Control (MAC) address filtering to block unwanted hardware.
My target was a Cisco Linksys WRT54G2 Wireless-G Broadband Router, an older but fairly common residential WiFi router. The PIN for the router is printed on the bottom, along with its MAC address; in WPS mode, a computer can use that PIN to retrieve the network configuration information without the user having to worry about remembering a long password or otherwise mess with the router's administrative interface. Normally, to get the PIN, you'd need to have physical access to the router.
For my attack platform, I used an aging Toshiba Satellite A135 running Ubuntu 11.10. In order to compile Reaver, I also had to install libpcap, the network traffic capture library, through Ubuntu's Software Center. With libcap configured, Reaver compiled without a hitch, and it was time to start beating on the door.
The first step in mounting an attack on a WiFi router is to identify the target's MAC address. While I was able to read it right off the router, the address was also easy to grab using a WiFi scanning application. (The scanner also revealed that most of my neighbors' WiFi networks were also potentially vulnerable to Reaver, or that they were still running older routers using only WEP security—and some had no security in place at all.) With the MAC of my target recorded, I prepared to unleash Reaver.
Before launching a brute-force PIN hacking effort with Reaver, the attack platform's wireless adapter needs to be put into "monitor" mode. In Linux, that's done from the command line using ifconfig (an interface configuration tool) and iwconfig (which controls the configuration of wireless interfaces); both need to be run as the root user. After making sure I was disconnected from any other WiFi network, I went into an Ubuntu terminal window and entered:
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up
With the wireless adapter now ready to perform packet capture, I launched Reaver. The open-source version of Reaver is a command-line tool; Tactical Network Solutions also sells a commercial version that includes a Web-based client and software support. While I used version 1.2 of Reaver, a 1.4 version was released on January 23, and it can speed up attacks. It does so by reducing the size of the "secret number" used to create the shared encryption key used to pass requests—this cuts the crypto workload on the access point and reduces the time needed between attempts.
Reaver only requires two inputs to launch an attack: the interface to use to launch them, and the MAC address of the target. Because it accesses the wireless adapter directly, it needs to be run as root:
sudo reaver -i wlan0 -b 00:01:02:03:04:05
I went with this default approach, but there are a number of other parameters that can be used to tweak the attack for different routers, such as setting the tool to pause when the access point stops responding, and adding a response back to the access point to clear out failed attempts (this is not required by most routers). The results:
http://static.arstechnica.net/2012/0...4a3f-intro.jpg
The attack took about six hours to properly guess the PIN and return the SSID and password for the target network. During that time, the router locked up once under load, as I was putting normal levels of network traffic through it from other devices. Some routers will also lock out WPS requests for five minutes or so when they detect multiple failed PIN submissions—mine stopped responding occasionally, generating a string of warnings, but Reaver picked back up where it left off once the Linksys started responding again.
Having demonstrated the insecurity of WPS, I went into the Linksys' administrative interface and turned WPS off. Then, I relaunched Reaver, figuring that surely setting the router to manual configuration would block the attacks at the door. But apparently Reaver didn't get the memo, and the Linksys' WPS interface still responded to its queries—once again coughing up the password and SSID.
The tool also managed to repeatedly cause the router to stop responding to other computers on the network, essentially creating a denial of service attack—a great thing to remember for the next time my neighbors have a loud, all-night Call of Duty session.
In a phone conversation, Craig Heffner said that the inability to shut this vulnerability down is widespread. He and others have found it to occur with every Linksys and Cisco Valet wireless access point they've tested. "On all of the Linksys routers, you cannot manually disable WPS," he said. While the Web interface has a radio button that allegedly turns off WPS configuration, "it's still on and still vulnerable."
MAC filtering doesn't help either— that's "easily circumvented," he said. All an attacker has to do is use a network monitoring tool to detect the MAC address of a system that has an existing connection to the router, and set that as the address of their attack platform.
Six to eight hours seems like a lot of time to spend trying to hack into someone's residential WiFi. But considering how many small and medium-sized businesses use access points like the Linksys—and the kinds of data that could be exposed by gaining access to the computers on even the average home network—there's plenty of potential damage to be done by those who run the tool, or something similar of their own devising. And the attack could be carried out unattended, using a device left near the target network and controlled remotely.
The bottom line is that, while WPS was designed for simple security, there is no such thing as simple security. The only way to be absolutely sure that someone can't gain access to your wireless network with the WPS hack is to make sure you use a router that doesn't support the protocol.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
FYI I just bought one of these so i'll report my findings:
http://www.tacnetsol.com/products
http://vimeo.com/34667806
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Does this still to have one of a few specific cards to work or is pretty much working on any ?
Ted
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Might have a mess about with this later 6-8 hours is amazing. You'll need a card capable of injection most atheros chips are good you'll find a complete list on the backtrack site
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Quote:
Originally Posted by
Raptor
Wow!
If that works as good as it claims to be, then it's one cool bit of kit even for $600!
DJ OD
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Inflator is a Reaver Command generator.
Demo:
http://www.ibeini.com/inflator/inflator1.0.swf
Not sure if the download link is allowed but it looks like there is a custom Backtrack package which contains inflator.
EDIT: Actually looks like Inflator has to be added to Backtrack.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
interesting, been awhile since I last looked at backtrack
solution is to disable wps, but look likes some routers cannot do this, may need firmware update
anyway what were they thinking when they invented WPS. Not surprised its been attacked.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Quote:
Originally Posted by
evilsatan
Inflator is a Reaver Command generator.
Demo:
http://www.ibeini.com/inflator/inflator1.0.swf
Not sure if the download link is allowed but it looks like there is a custom Backtrack package which contains inflator.
EDIT: Actually looks like Inflator has to be added to Backtrack.
I've downloaded Backtrack 5 but there isn't an option for inflator under the WLAN Eploitation Tools menu?..
is there another version out there?..
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Quote:
Originally Posted by
mc.dodd
I've downloaded Backtrack 5 but there isn't an option for inflator under the WLAN Eploitation Tools menu?..
is there another version out there?..
You need to add inflator to backtrack, I'm not sure how to do this. Search for inflator to get the package, I saw it on ibeini blog. I have put backtrack 5 on my multi boot USB so not sure if any additions will be saved.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
To add Inflator to backtrack do the following:
1. Download http://www.ibeini.com/inflator/infla...nome-bit32.zip (Homepage: http://blog.ibeini.com/archives/597.html)
2. Extract the zip to be left with inflator1.0-backtrack5r1-gnome-bit32.deb
3. Place inflator1.0-backtrack5r1-gnome-bit32.deb in the root folder within Backtrack
4. Open a terminal window and type: dpkg -i inflator1.0-backtrack5r1-gnome-bit32.deb
To add Reaver do the following......
Do all of the following in a terminal window:
# wget http://reaver-wps.googlecode.com/fil...ver-1.4.tar.gz (requires active net connection)
Extract the download using:
# tar zxvf reaver-1.4.tar.gz
Browse to Reaver dir
# cd reaver-1.4/src
Configure Command
# ./configure
Make Command
# make
Make Install Command
# make install
Now you are good to go......
To save your session hit ctrl+c (don't do this during a timeout if you get 10 bad connections, it'll result in a segmentation fault), to resume your session simply attack the same bssid.
For those using a live distro you will have to do the above on each boot.
Reaver saves it's sessions in: # /usr/local/etc/reaver/<<bssid>>.wpc, copy this file somewhere safe then place it back after each boot.
It's still pretty buggy, it works, some trial and error required for different routers, does have a habit of just freezing and doing nothing, happens to me roughly every 1-2hrs so you need to keep your eye on it.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
do I need the Reaver install?.. I'm trying to make a bootable Live USB to try this on..
which folder do I drop Inflator into on the USB, casper or isolinux or just to the root of the USB?
many thanks for help in advance
mcd
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Yeah you need both, Inflator is just a front-end GUI for Reaver.
What I did was download the two, kept them in a folder on the c:\ of the host machine. When I booted into Backtrack live it would mount the c:\ and I'd copy the files from there into the root folder of Backtrack. (All this was done in the graphical interface, booted with the startx command).
Once I'd copied them there I'd use terminal to do the unpack and install.
Became too much of a ball ache to keep doing so I just installed BackTrack 5 on my laptop using the installer, I dual boot with Win7 and my backtrack installs and config stay permanent.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Have dug the old RT73 USB dongle out for this, looking forward to giving it a go later thanks guys :)
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Quote:
Originally Posted by
iNSPECTA
Yeah you need both, Inflator is just a front-end GUI for Reaver.
What I did was download the two, kept them in a folder on the c:\ of the host machine. When I booted into Backtrack live it would mount the c:\ and I'd copy the files from there into the root folder of Backtrack. (All this was done in the graphical interface, booted with the startx command).
Once I'd copied them there I'd use terminal to do the unpack and install.
Became too much of a ball ache to keep doing so I just installed BackTrack 5 on my laptop using the installer, I dual boot with Win7 and my backtrack installs and config stay permanent.
okay, I'll try that but which folder do I drop the inflator & Reaver files to please?
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
When you start backtrack up there is a folder called 'root', stick the .deb and .tar files there then run the terminal commands.
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
if trying to run on ubuntu or other distros
chmod 777 the inflator.desktop file then run
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
thanks, got it running but the AP cannot be found, oh well, it did come up once with WPS protected setup but that seems to have gone..back to the drawing board for now..
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
mc.dodd - could be the wash program
only available on 1.4 i think
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Quote:
Originally Posted by
Undertaker
mc.dodd - could be the wash program
only available on 1.4 i think
I have installed version 1.4 pal.. I just think the WPS option may have been disabled?.. it was showing up at one point..
Re: Hands-on: hacking WiFi (WPA/WPA2) Protected Setup with Reaver
Very interesting.
Have just run a live BT5R1 with reaver 1.4 and it presented me with my 39 character wpa2 password:omg: