0% found this document useful (0 votes)
26 views56 pages

Wi-Fi Hacking Techniques and Tools

The document discusses wireless networks, their setup, and the vulnerabilities associated with them, particularly focusing on wireless hacking techniques. It outlines the requirements for hacking, various tools like Aircrack-ng, and methods for cracking WEP and WPA/WPA2 networks. Additionally, it covers the importance of ethical hacking and the use of tools to bypass security measures such as MAC filtering and WPS pins.

Uploaded by

barneyisalive
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views56 pages

Wi-Fi Hacking Techniques and Tools

The document discusses wireless networks, their setup, and the vulnerabilities associated with them, particularly focusing on wireless hacking techniques. It outlines the requirements for hacking, various tools like Aircrack-ng, and methods for cracking WEP and WPA/WPA2 networks. Additionally, it covers the importance of ethical hacking and the use of tools to bypass security measures such as MAC filtering and WPS pins.

Uploaded by

barneyisalive
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT -5

Wire less hacking


wireless network
 A wireless network is a set of two or more devices connected
with each other via radio waves within a limited space range.

 Wireless networks are widely used and it is quite easy to set


them [Link] use IEEE 802.11 standards.

 A wireless router is the most important device in a


wireless network that connects the users with the Internet.

 In a wireless network, we have Access Points which are


extensions of wireless ranges that behave as logical switches.
 As wireless networks communicate through radio waves, a
hacker can easily sniff the network from a nearby location.

 Most attackers use network sniffing to find the (service set


identifier) SSID and hack a wireless network.

Wire less hacking Requirements
 Wireless access point
 Wireless adapter supporting packet injection

 The access point is required because we don’t want to attack the


neighbor’s access point, because it would be unethical, and as a
penetration tester or an ethical hacker, you should make sure that you
follow ethics.
 The second and the most important requirement is a wireless adapter
that supports packet injection and is also able to sniff in the monitor
mode.
 Eg :Alfa AWUS036H wireless adapter , it not only supports packet
injection, but also BackTrack has preinstalled drivers of it, so we don’t
have to do the tedious job of downloading and installing them
 Once you have an Alfa network adapter that supports packet
injection and has all drivers installed, you can connect the
adapter to your computer, and since we are running
BackTrack from our virtual machine, we need to attach the
network adapter to our BackTrack machine.
 This can be done by going into Vm → Removable Devices
→ Realtek RTL8187_Wireless and clicking the
“Connect(Disconnect from HOST)” option
 Next, we will execute “iwconfig” command to confirm that
our BackTrack machine has been able to detect our network
adapter.
 Our BackTrack machine has managed to detect our wireless
network adapter.
 We could use WICD network manager from Application →
Internet → Wicd Network Manager to check available
wireless networks
 Once we have connected to the appropriate access point and
executed “iwconfig”, we will see that the wlan0 interface
contains information regarding ESSID, MAC address, etc
Wifi hacking tools
1 Aircrack-ng.
Aircrack is one of the most popular tools for WEP/WPA/WPA2
cracking. ...
2 Reaver
3 Pixiewps
4 Wifite
5 Wireshark
6 oclHashcat
7 Fern Wifi Cracker
8 Wash.
[Link]
[Link]
. Aircrack-ng

 Aircrack is one of the most popular tools for WEP/WPA/WPA2


cracking.

 The Aircrack-ng suite contains tools to capture packets and handshakes,


de-authenticate connected clients and generate traffic and tools to
perform brute force and dictionary attacks.

 Aicrack-ng is an all-in-one suite containing the following tools


– Aircrack-ng for wireless password cracking
– Aireplay-ng to generate traffic and client de-authentication
– Airodump-ng for packet capturing
– Airbase-ng to configure fake access points.

The most common ones are airodump-ng, aireply-ng, and airmon-ng.


Iwconfig command
 On Linux operating systems, the iwconfig command configures
a wireless network interface.
 It is used to set the parameters of the network interface that are
particular to the wireless operation like SSID, frequency etc.
 Parameters examples :
 ssid Set the ESSID (or Network Name - in some products, it
may also be called Domain ID)
 nwid Set the Network ID.
 nickSet the nickname, or the station name.
 Mode Set the operating mode of the device, which depends
on the network topology
Turning on the Monitor Mode
 to sniff on wireless networks, we need to make sure that our
network card is in the monitor mode.
 wireless cards are converted in sniffing modes, they are
called monitor mode.

 We can use the following command to change the network


card to the monitor mode:

 $airmon-ng start wlan0


Uncovering Hidden SSIDs
 It’s common practice for network administrators to disable
broadcasting SSID.
 Normally, the SSIDs are sent in the form of beacon frames,
but this does not happen when a network administrator
disables an SSID.
 When ever client reassociates with the access point, it will
send the SSID parameter in plain text, which will reveal the
real SSID
 Now, we have two methods to do this:
 the first one is that we keep analyzing beacon frames and
wait for the client to disconnect and reconnect to the access
point;
 the second option is that we send disassociation packets by
using a deauthentication attack, which will force everyone on
the network to disconnect and then reconnect to the access
point revealing to us the SSID.
Steps for wifi hacking
 The attacker first configures his/her own network interface card.
That is the network interface card is set to monitor mode and can
perform packet injection.
 Then the properly configured network interface card is used to
perform a de-authentication attack.
 The de-authenticated client then reconnects to the access point.
 This allows us to capture the four-way handshake.
 We then perform a brute-force attack or a dictionary attack on the
captured handshake.
 Once the attack is completed we have the decrypted password.
Monitoring Beacon Frames on
Wireshark
 Now that we have the monitor mode enabled, we will sniff
on the mon0 network interfaces, which will bring us beacon
frames containing the SSID that is being broadcasted.
 If the SSID is not broadcasted, it won’t show up.
 Whenever the client authenticates against the access point
with the hidden SSID, it will send an SSID parameter;
therefore, we can easily figure out what the real SSID is
Monitoring with Airodump-ng
 The easy way around is to use airodump-ng to start
monitoring the traffic; as soon as the client authenticates, the
SSID will be revealed.

 # airodump-ng mon0
Cracking a WEP Wireless Network with
Aircrack-ng
 WEP (Wired Equivalent Privacy) was one of the first
authentication and encryption used for wire less networks.
 we will use aircrack-ng to demonstrate how easy it is to
crack a WEP key.
 Placing Your Wireless Adapter in Monitor Mode
 Step 1—First thing , we need to make sure that our network
card is placed into monitor mode, we have already learnt that
we can use the “airmon-ng start wlan0” command to
accomplish this task.
 Determining the Target with Airodump-ng
 Step 2—Next, we will use airodump-ng to discover our
neighbor networks with WEP encryption enabled.
 We can see our target with an essid (same as ssid) of “Linksys”
and with BSSID of 98:FC:11:C9:14:22 and it’s on the
channel 6. We should make a note of the essid, bssid, and
channel because we will need them in future
We can see our target with an
essid (same as ssid) of “Linksys”
and with BSSID of
98:FC:11:C9:14:22 and it’s on
the channel 6
 Attacking the Target
 Step 3—In order to crack the WEP key, we would need to capture
of the contents of the data file and write it to a file.

 Structure
 airodump-ng mon0 --bssid –c (channel) –w (file name to save)

 Command:
 airodump-ng mon0 --bssid 98:fc:11:c9:14:22 --channel 6 --write
RHAWEP
 Speeding Up the Cracking Process
 Step 4—In order to decrypt the wep key, we would need
data packets, but waiting to collect them would be time
consuming. To speed up this process, we can use a fake
authentication attack which will associate our MAC address
with the access point.
 Structure
 aireplay-ng - 1 3 –a (bssid of the target) (interface)
 Command:
 aireplay-ng -1 3 –a 98:fc:11:c9:14:22 mon0
 Injecting ARP Packets
 Step 5—
 The success rate of our attack depends upon the number of
initialization vectors we gather.
 A fake authentication attack does not generate ARP packets,
therefore, we would need to use the attack number 3—“ARP
Request Replay”—which is the most effective way of generating
initialization vectors.
 Structure
 aireplay-ng 3 –b (bssid of target) –h (Mac address of mon0)
(interface)
 Command:
 aireplay-ng -3 –b 98:fc:11:c9:14:22 –h 00:c0:ca:50:f8:32
mon0
 Cracking the WEP
 Step 6—Finally, it’s the time to decrypt the contents of the
RHAWEP-0.1-cap file.
 We will use aircrack-ng to do this.

 Command:
 aircrack-ng RHAWEP-0.1-cap
Key found
Cracking a WPA/WPA2 Wireless
Network Using Aircrack-ng
 WPA(Wi-Fi Protected Access. ) A security protocol developed by
the Wi-Fi Alliance in 2003 for use in securing wireless networks;
designed to replace the WEP protocol.
 The WPA/WPA2 key that we would use to authenticate on a
wireless network is used to generate another unique key
 Required parameters .
 SSID of the network authenticator
 Nounce (ANounce),
 authenticator MAC address (access point MAC),
 suppliant MAC address (WiFi client MAC).
 four-way handshake, which takes place between a client and an
access point,
Cracking a WPA/WPA2 Wireless
Network Using Aircrack-ng
 Step 1—First of all, ensure that your network card is inside
the monitoring mode.
 Step 2—Next, we would listen on the mon0 interfaces for
other access points having encryption set to either wpa or
wpa2.
 We would use the “airmon-ng mon0” command to do it.
 We will take a note of its BSSID and the channel that it’s on,
this information would be useful in the upcoming steps.
BSSID: F4:3E:61:92:68:D7
 Channel: 6
 Capturing Packets
 Step 3—Next, we need to save the data associated with our
access point to a specific file. The inputs we need to specify
are the channel, the bssid, and the file name to write.
 Command:
 airodump-ng –c 1 –w rhawap --bssid F4:3E:61:92:68:D7
mon0
 –w—File to write
 –c—Channel
 Capturing the Four-Way Handshake
 Step 4—In order to successfully crack WAP, we would need
to capture the four-way handshake. As mentioned, to achieve
this we could use a deauthentication attack to force clients to
disconnect and reconnect with the access point.
 Structure :
 aireplay-ng --deauth 10 –a ≤Target AP≥ –c ≤Mac address
of Mon0≥mon0
 Command: aireplay-ng --deauth 10 –a F4:3E:61:92:68:D7 –
c 94:39:E5:EA:85:31 mon0
 Cracking WPA/WAP2

 COMMAND:
 aircrack-ng –w Wordlist ‘capture_file’.cap

 Command:
 aircrack-ng [Link] –
w/pentest/passwords/wordlists/[Link]
Bypassing MAC Filters on Wireless
Network
 it’s also a common practice for network administrators to
apply MAC filtering on the access point so that only white-
listed hosts with MAC addresses would be able to connect to
the access point.
 MAC filtering is also a part of low-level security along with
hiding the SSID;
 an attacker can spoof a legitimate MAC address to connect to
the access point. Here is how this attack would be carried
out:
 1. The attacker would scan the access point for the hosts that
are already connected to the access point.
 2. Next, the attacker would note down the MAC address of
the legitimate client that is connected to the access point and
spoof the MAC address to get into the white list and would
be able to connect and use the access point
 Step 1—The first command we would use is “airodump-ng”
to scan for all the neighbor networks.
 Step 2—The next step would be to find a client that is
already associated with the access point. We will use
airodump to find it for us.
 Command: airodump-ng –c 1 –a –bssid F4:3E:61:9C:77:3B
mon0

 Since the access point is on channel 1, we would type –c 1;


the “–a” parameter would display clients that are currently
associated with the access point
 Step 3—The final step would be to spoof our MAC address
and change it to one of the client’s. We can use a neat
program in BackTrack called macchanger.

 we would use the following command to spoof our current


MAC address.
 macchanger –m B0:D0:9C:5C:EF:86 wlan0
Using Reaver to Crack WPS-Enabled
Wireless Networks
 Reaver is the penetration tester’s ultimate choice, this tool
can help you crack WPA/WPA2 keys within a matter of
hours.
 Reaver does not directly perform a brute force attack against
the WPA/ WPA2 keys, but it performs a brute force attack
against the WPS pins.
 The WPS pins are eight digits in length, and as most routers
use default pins, they can easily be compromised.
 Step 1—Make sure that your wireless card is in the monitor
mode.
 Step 2—Next, we would use airodump-ng to select our
target we want to attack.
In this case we target the access point with ESSID PTCL-BB, and BSSID F4:3E:61:F5:FC:49. We will
copy the BSSID, since this will be the only input required for reaver to work.
 Step 3—Now, we will use reaver to attack our access point. The
command would be as follows:

 reaver –i mon0 –b F4:3E:61:F5:FC:49 –vv

 T he –I parameter was used to specify the interface, which is


mon0, followed by the –b parameter used to define the bssid
 and –vv for the verbosity. The verbosity is set to twice, which
means that it will display each pin’s number as it’s tried against the
access point
Wi-Fi security protocols
 Wi-Fi security protocols use encryption technology to secure
networks and protect the data of their clients.
 Wireless networks are often less secure than wired
ones, so wireless security protocols are crucial for keeping
you safe online.
 The most common Wi-Fi security protocols today are WEP,
WPA, and WPA2.

 Wired Equivalent Privacy (WEP)


 Wi-Fi Protected Access (WPA)
 Wi-Fi Protected Access 2 (WPA 2)
 WEP (Wired Equivalent Privacy) is the oldest and most
common Wi-Fi security protocol.
 It was the privacy component established in the IEEE
802.11, a set of technical standards that aimed to provide a
wireless local area network (WLAN) with a comparable level
of security to a wired local area network (LAN).
 WPA (Wi-Fi Protected Access) is a wireless security protocol
released in 2003 to address the growing vulnerabilities of its
predecessor, WEP.
 The WPA Wi-Fi protocol is more secure than WEP, because it
uses a 256-bit key for encryption, which is a major upgrade
from the 64-bit and 128-bit keys used by the WEP system.
 WPA also uses the Temporal Key Integrity Protocol (TKIP),
which dynamically generates a new key for each packet, or
unit of data. TKIP is much more secure than the fixed-key
system used by WEP.
 WPA2 (Wi-Fi Protected Access 2) is the second generation
of the Wi-Fi Protected Access wireless security protocol.
Like its predecessor, WPA2 was designed to secure and
protect Wi-Fi networks.
 WPA2 ensures that data sent or received over your wireless
network is encrypted, and only people with your network
password have access to it.
 A benefit of the WPA2 system was that it introduced the
Advanced Encryption System (AES) to replace the more
vulnerable TKIP system used in the original WPA protocol.
WEP vs WPA vs WPA2:

WEP WPA WPA2


year introduced 1999 2003 2004

Encryption protocol Fixed-key TKIP CCMP

Session key size 64-bit/128-bit 256-bit 256-bit


RC4 stream
Cipher type TKIP (RC4-based) AES
cipher

Cyclic Redundancy Message


Data integrity CCMP
Check Integrity Check

Open
Authentication PSK + PMK(pair-
system/Shared PSK(pre shared key)
method wise shared key)
key

Common questions

Powered by AI

The Aircrack-ng suite includes a variety of tools, each serving different functions for wireless security testing. Airodump-ng is used primarily for capturing packets and monitoring network traffic, helping identify and capture data necessary for further analysis or attacks, such as capturing the four-way handshake in WPA/WPA2 networks . Aireplay-ng is responsible for generating traffic and performing attacks such as deauthentication attacks, which are used to force clients to disconnect and reconnect, revealing hidden SSIDs or capturing handshakes . These tools are integral to the overall process of wireless network penetration testing and exploitation by facilitating data capture and manipulation .

WEP, WPA, and WPA2 differ significantly in encryption and key management. WEP uses a 64-bit or 128-bit fixed-key system, which makes it vulnerable to attacks. It employs the RC4 stream cipher and a simple Cyclic Redundancy Check for data integrity . WPA improves security by using a 256-bit key and the Temporal Key Integrity Protocol (TKIP), which dynamically generates a new key for each packet, providing better security than the fixed-key system of WEP . Additionally, WPA2, introduced in 2004, offers even stronger security by incorporating the Advanced Encryption System (AES) instead of TKIP, providing a more robust encryption model. It also uses the Counter Mode with Cipher Block Chaining Message Authentication Code Protocol (CCMP) for data integrity .

Monitor mode is necessary for wireless network sniffing because it allows a network interface card to capture all radio traffic in the vicinity, not just traffic addressed to it or broadcast. This mode is crucial for monitoring traffic, capturing packets, and analyzing wireless communication for security assessments . To enable monitor mode, you can use the command 'airmon-ng start wlan0' on Linux systems, which configures the network card accordingly . This setup is fundamental for effective packet analysis and wireless security auditing .

MAC filtering can be bypassed by spoofing the MAC address of an authorized device. This involves scanning the network to identify the MAC addresses of devices currently allowed by the access point's filter. Tools like 'airodump-ng' can display associated clients and their MAC addresses . The attacker then changes their device's MAC address to one of the legitimate addresses using a tool like 'macchanger' . Since MAC filtering relies on MAC addresses for access control, spoofing allows unauthorized access by impersonating a legitimate device. This method demonstrates that MAC filtering, while providing some level of access control, can be easily circumvented without strong encryption and authentication protocols .

Outdated wireless security protocols like WEP suffer from several vulnerabilities that severely compromise network security. WEP uses a fixed-key system with relatively short keys (64-bit or 128-bit), making it susceptible to attack methods like key recovery via statistical analysis due to weak initialization vector handling . Hackers can exploit these vulnerabilities by capturing enough data packets to recover the WEP key quickly. Furthermore, WEP lacks strong data integrity measures, relying on simple Cyclic Redundancy Check (CRC) which can be bypassed . This inadequacy in encryption and key management allows attackers to decrypt intercepted communications easily, leading to potential unauthorized access and data theft. Transitioning to more robust protocols like WPA or WPA2 significantly enhances security by introducing dynamic key management and stronger encryption standards .

When conducting wireless network security assessments, penetration testers must follow strict ethical guidelines to ensure their activities remain legal and responsible. They must obtain explicit permission from network owners or administrators before commencing any testing to avoid illegal intrusion or data capture. The scope of the testing should be well-defined, indicating which network segments are included and the types of tests allowed . Ethical hackers should avoid affecting other nearby networks inadvertently, requiring tools and setups (e.g., dedicated access points) that prevent such spillover . They must also commit to reporting their findings honestly and thoroughly to assist in improving network security without exploiting discovered vulnerabilities for personal gain. These considerations ensure that penetration testing contributes positively to securing wireless networks without breaching privacy or trust .

In ethical wireless hacking, a network adapter that supports packet injection is crucial as it allows the user to interact with the network beyond standard listening. It can inject packets to simulate client or server behavior, which helps in executing attacks such as deauthentication attacks or generating traffic, which are essential for capturing necessary data, like the four-way handshake in WPA/WPA2 networks . This capability is vital for penetration testers to test the security of wireless networks ethically and effectively .

Cracking a WEP-encrypted wireless network using Aircrack-ng involves several steps: First, place the wireless adapter in monitor mode using 'airmon-ng start wlan0'. Next, use 'airodump-ng' to identify networks with WEP encryption and select a target, noting the ESSID, BSSID, and channel . Capture packets from the target using 'airodump-ng' with specific parameters to filter for the target network . Speed up the process by performing a fake authentication attack ('aireplay-ng -1 3') and ARP request replay attack ('aireplay-ng 3') to generate traffic and gather initialization vectors . Finally, use 'aircrack-ng' with the captured data file to crack the WEP key . This sequence leverages Aircrack-ng tools to exploit the vulnerabilities inherent in WEP encryption.

Reaver differs from traditional brute-force techniques by targeting WPS (Wi-Fi Protected Setup) rather than directly attacking WPA/WPA2 keys. It performs a brute-force attack on the WPS PIN, which is an eight-digit number often left at default settings by many routers. By guessing this PIN, Reaver can access the WPA/WPA2 passphrase without directly cracking it . This approach exploits the relatively weak security of the WPS system and is typically faster than brute-forcing the longer WPA/WPA2 keys directly, which can be computationally intensive and time-consuming. This makes Reaver a potent tool for breaking into WPS-enabled networks quickly .

Uncovering hidden SSIDs using deauthentication attacks involves forcing all clients on a network to disconnect and then reconnect. Normally, SSIDs are hidden by not being broadcast in beacon frames. During the reconnection process, clients send the SSID in plaintext as part of the association request, thus revealing it. By sending deauthentication packets to currently connected clients, an attacker can compel them to disconnect and reconnect, capturing the SSID when they reassociate . This method highlights a vulnerability in networks relying solely on hiding SSIDs for security. It's an effective technique for uncovering a hidden SSID during a penetration test or security audit .

You might also like