Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />INTRODUCTION
<br /><br />It is widely known that WEP encryption is highly vulnerable. Over time, this security improved, becoming WPA and later WPA2; the latter is much more secure than the first two mentioned.<br /><br />As we move further along the timeline, routers and the ways of connecting to them have evolved to such an extent that WPS appeared. WPS, although not an encryption method itself, is a more practical and convenient connection mechanism that spares us from having to remember passwords that we (perhaps) might forget.<br /><br />Although a large majority of users have WPA or WPA2 on their routers, many have WPS enabled. <br />WPS provides 4 different credential exchange methods, but only 2 are certified, namely:<br /><br />-PBC (Push Button Connect). This method consists of pressing the button on both the wireless device and the router. The link will remain active until the connection is established or for 2 minutes. This button can be physical or virtual.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />-PIN. In this case, the user must enter the PIN located on the bottom of the router into the PC, and the connection is then made.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />As we mentioned before, these are easier ways to connect a device to a router and -in most cases- it is done by exchanging an 8-digit numeric PIN, where the device sends this PIN to the router and, if it is correct, the router lets it through.<br /><br />This PIN is written on the bottom of the router, but there are several ways to find it out. The objective of this workshop is -precisely- to show how we can obtain it. We will also see that it is much easier to obtain this PIN than to break the WPA/WPA2 Handshake. <br /><br />One point that is worth highlighting is that WPS is only available on networks with WPA/WPA2; and that it is not a security encryption but an installation/configuration convenience for users.<br /><br /><br /> <br />
LAB PREPARATION
<br /><br />For the purposes of this workshop, we have prepared a router with WPA2 and WPS enabled.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br /><br /><br />
LOOKING FOR A TARGET...
<br /><br />It is worth recalling that this workshop can be followed from any Linux distro. In our case, we will use Ubuntu.<br />To scan networks -looking for one with WPS- we will open a console and type the following:<br /><br />sudo iw wlan0 scan | egrep 'WPS|BSS|SSID' -w<br /><br />Let's -briefly- explain the command:<br /><br />sudo: Root permission (only needed if we are on Ubuntu; if using Kali, it is not necessary).<br />iw: A tool included in Linux for network scanning.<br />wlan0: Network interface. If you do not know the name of your interface, you must install Aircrack as follows: sudo apt-get install aircrack-ng if you are on Kali, this is not necessary. Once installed, type airmon-ng in the console, which will give you the name of your interface.<br />scan: An iw parameter for scanning.<br />egrep 'WPS|BSS|SSID' -w : Used so that it only shows the information that is valuable to us; otherwise it would show a lot of unnecessary data. <br /><br />This way we will obtain the network name, the MAC of the router or access point, and whether or not it has WPS enabled.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />As we can see, 2 networks appear; both with WPS enabled. We will focus on the second one, Underc0de Labs.<br /><br />The data we need to remember is the MAC, in this case 00:0a:52:23:a6:f8<br /><br /><br /><br />
INSTALLING REAVER
<br /><br />Reaver is a tool that carries out brute-force attacks against the PIN of networks protected with WPA and with WPS enabled. This PIN has 8 digits and the eighth digit is a checksum.<br /><br />This tool brute-forces the first half of the PIN and then the second half, meaning that all possible values of the WPS PIN number can be exhausted in 11,000 attempts.<br /><br />The speed of the attack is limited by the speed at which the AP can process WPS requests. Some fast APs may test 1 PIN per second, while others may test 1 every 10 seconds.<br /><br />To install it, we open a console and follow these steps:<br /><br />wget http://reaver-wps.googlecode.com/files/reaver-1.4.tar.gzcd reaver-1.4/src<br />./configure<br />make<br />make installLos enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br /><br /><br />
OBTAINING THE PIN
<br /><br />Once our PC is prepared with the tool, we will proceed to attack. To do so, we will put our network interface into monitor mode.<br /><br />airmon-ng start wlan0sudo reaver -i mon0 –b 00:0A:52:23:A6:F8 –vvLos enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />Now, it is a matter of time and patience for Reaver to do its job of testing PINs. As we mentioned before, the speed depends on the router or AP we are attacking.<br /><br />Once it finishes, we will see a detail like in the following screenshot:<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />As we can see, we have the PIN: 23365049, which coincidentally is the same as the one printed on the bottom of the router:<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />The only thing left now is to connect to the network.<br /><br /><br /><br />
CONNECTING TO THE NETWORK
<br /><br />Once we have obtained the PIN, we download the JumpStart program, which is used to connect to a network using the WPS PIN we have captured.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />We leave the first option as shown in the image and click next:<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />We check the last option that allows entering a PIN to access the AP and enter the captured PIN.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />It will begin testing the PIN on nearby networks and, finally, it will connect.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br /><br /><br />
OBTAINING THE WPA/WPA2 KEY
<br /><br />Once connected, right-click on the name of the network we accessed and select properties:<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />Now we go to the security tab and check the option to show characters:<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión
<br /><br />In conclusion: As you can see, we have obtained the WPA2 key without needing to use dictionaries or brute force to break the handshake, through a simple but no less useful process. <br /><br /><br /><br />