Wireless Hacking :
Wifi stands for wireless fidelity.
Wifi is a family of wireless network protocols based on IEEE 802.11.
802.11(family standard).
Wifi uses multiple parts of IEEE 802 protocol family.
what band does Wifi uses?
most commonly used wifi bands are 2.4 ghz and 5 ghz bands and these bands are divided into multiple sub channels.
<<channel: only one transmitter can transmit over a channel at a time>>
The latest wifi generation is wifi 7(2024) and radio frequency for this is 2.4/5/6.
Now when you buy a router you see on the box that it is written on the box WEP/WPA/WPA2/WPA3?
what are these? have you ever thought about it?
These are nothing but the security protocols. These protocols have undergone multiple upgrades
WEP(wired equivalent privacy)/WPA(Wifi protected access)/WPA2 —
It is most widely used security wifi protocol(WEP).As computing power increased it became easier and easier to
exploit the flaws.the key used by wep is 64 bit and 128 bit. Then comes the next WPA which uses key with size of 256 bits
wpa configuration was WPA-PSK(Pre shared key).Some of the changes such as message integrity checks were used with the new configurations.
Despite what a significant improvement WPA was over WEP, the ghost of WEP haunted WPA.
WPA, like its predecessor WEP, was also vulnerable after sometime of its use.It was vulnerable to the intrusion.
then comes the WPA2.The most significant change that was done for wpa2 was use of aes algorithm and introduction of CCMP.
When we click on our home network on our laptops or computers or mobiles what happens?
Wifi keeps emitting nonce packet and it keeps on bradcasting and when we click on the wifi(home network) it replies to the nonce packet.
it asks us for the password adn when we type the password it goes for authentication
What is four way handshake?
Four way handshake is the message exchange between an access point and the client device.
The device exchanges four messages that generates the encryption keys.
Keywords that you should know before you study four way handshake?
ANonce — -A random number that is generated by the access point.
SNonce — -A random number that is generated by the client device.
MAC(AA) — mac address of the access point.
MAC(SA) — mac address of the client device.
PMK — -Paiwise Master Key — — An encryption generated from master session key.
Mic — Message Integrity Check
What happens in four way handshake?
first message is sent from the access point to the client containing ANonce packet.
with eapol(extensible authentication protocol)frame.
second message is sent from the client to the access point with SNonce packet.
third message is sent again from the access point what's important in this the transportation of gtk(group temporal key)
Message 4 is sent by the client which and contains a MIC.
It is the final frame from the 4-Way Handshake.
This final message notifies the access point of whether the temporal keys were installed successfully or not.
Now, have you ever wondered of hacking any wifi?
For this we need wifi adaptor(hardware device that we will be using to hack wifi)
Note: We need wifi adaptor with monitor mode one.
What is Monitor mode?
Monitor mode — — — it enables the network card to listen to the every packet in the air so that we can easily capture the four way handshake.
What are the Wi-Fi network properties:
ESSID — The network name
BSSID — MAC address of the access point
Beacons — Number of announcements packets sent by the access point
CH — Channel number
ENC — Encryption algorithm in use
CIPHER — The detected cipher
AUTH — The authentication protocol
We will be using air-crack suite to hack the wifi.
Let’s fire up our machine and plugin our wifi adaptor and then type iwconfig:
To get the card into monitor mode we will run the airmon-ng program of the aircrack-ng suite.
Get Parth Pulyani’s stories in your inbox
Join Medium for free to get updates from this writer.
a.In the terminal type: airmon-ng check kill (This will kill any processes that might interfere with the desired functionality)
b. Now type airmon-ng start wlan0.
Now run iwconfig again to verify that our interface’s name has changed and that it is indeed in Monitor mode.
Now after having the mode set to the monitor we have to check for the access points what are available to us:
For this we will use , type airodump-ng wlan0:
I have chosen one ap which we will hack:
Once we have located our target AP we will take note of the MAC address (bssid) and the channel it is broadcasting on.
We will now run airodump-ng again, but this time with the specific parameters we have obtained.
In the terminal type:
airodump-ng — bssid (MAC_ADDRESS) — channel (CHANNEL_#) wlan0
Once we have selected a client we wish to disassociate, we will run our deauth attack using aireplay-ng and for this we have to open other terminal:
In the terminal type:
aireplay-ng — deauth (#_DEAUTHS) -a (AP_MAC) -c (CLIENT_MAC) wlan
or we can also use the command that is given below for the deauth attack:
Till we dont capture the handshake file (.cap extension) keep running this and after we captured the file press (control+c).
when we captured the file it gets save in the directory where we are you can do ls and locate and see the file our file was FTTH0–02.cap.
The last step is to run aircrack-ng from the aircrack suite:
Boom!! We Got the password for the ap named FTTH.
— — — — — — — — — — — — — — — -Keep Hacking — — — — — — — — — — — — ——










