Gaining Access
Gaining Access
encrypted networks
● Everything we have learned so far we can do it without
having to connect to the target network.
● We can get more accurate info and launch more effective
attacks if we can connect to the target network.
● If its an open network then we can just connect to it without
a password and proceed to section 3.
● Problem is if the target network uses a key , ie: if it uses
some sort of encryption.
Gaining Access to
encrypted networks
3. Inject the forged packet into the traffic to generate new IV's.
> aireplay-ng -2 -r [out from last step] [interface]
Ex: aireplay-ng -2 -r chop-out mon0
Packet injection
3. Fragmentation Attack
The goal of this method is to obtain 1500 bytes of the PRGA (pseudo random
generation algorithm) , this can be used to forge a new packet which can be
injected into the traffic to generate new IV's.
1. Obtain PRGA.
> aireplay-ng --fragment -b [target MAC] -h [you MAC] [interface]
ex: aireplay-ng --fragment -b E0:69:95:B8:BF:77 -h 00:c0:ca:6c:ca:12 mon0
3. Inject the forged packet into the traffic to generate new IV's.
> aireplay-ng -2 -r [out from last step] [interface]
Ex: aireplay-ng -2 -r chop-out mon0
WPA Cracking
● WPA was designed to address the issues in WEP and provide
better encryption.
● The main issue in WEP is the short IV which means that they
can be repeated, therefore by collecting a large number of IVs
aircrack-ng can determine the key stream and the WEP key.
● In WPA each packet is encrypted with a unique temporary key,
this means the number of data packets that we collect is
irrelevant.
● WPA and WPA2 are similar , the only difference is that WPA2
uses an algorithm called CCMP.
WPA/WPA2 Cracking
WPS Feature
● WPS is a feature that allows users to connect to WPS enabled
networks easily, using a WPS button or only by clicking on WPS
functionality.
● Authentication is done using an 8 digit long pin, this means that
there is a relatively small number of pin combination and using
brute force we can guess the pin in less than 10 hours.
● A tool called reaver can then recover the WPA/WPA key from
the pin.
● Note: This flaw is in the WPS feature and not in WPA/WPA2 ,
however it allows us to crack any WPA/WPA2 AP without using
a wordlist and without any clients.
Cracking WPS enabled APs
We shall use a tool called wash to scan for WPS enabled APs
> wash -i [interface]
Ex: wash -i mon0
Then we are going to use a tool called reaver to brute force the WPS ping and
calculate the WPA key
Conclusion:
To crack a WPA/WPA2 AP with WPS disabled we need two
things:
1. Capture the handshake.
2. A wordlist
Cracking WPA/WPA2
Conclusion:
To crack a WPA/WPA2 AP with WPS disabled we need two
things:
1. Capture the handshake.
2. A wordlist
Cracking WPA/WPA2
Capturing the handshake
Handshake packets are sent every time a client associates with the
target AP. So to capture it we are going to :
1. Start airodump-ng on the target AP:
We can speed up the cracking process using a tool celled hashcat which
uses the GPU instead of the CPU for the cracking process.
First off download oclhashcat and hashcat GUI fome the following URL:
http://hashcat.net/oclhashcat/
http://hashcat.net/hashcat-gui/
To use it we need to change the handshake file format to hccap, we can
do this using the following website
https://hashcat.net/cap2hccap