Kali Linux Wireless Penetration Testing Beginner's Guide - Sample Chapter
Kali Linux Wireless Penetration Testing Beginner's Guide - Sample Chapter
ee
Sa
m
pl
useful tasks
$ 44.99 US
29.99 UK
P U B L I S H I N G
Vivek Ramachandran
Cameron Buchanan
Beginner's Guide
Beginner's Guide
P U B L I S H I N G
Vivek Ramachandran
Cameron Buchanan
Chapter 2, WLAN and its Inherent Insecurities: This chapter focuses on inherent design
flaws in wireless networks, that make insecure out-of-the-box. We will begin with a
quick recap of the 802.11 WLAN protocols using a network analyzer called Wireshark.
This will give us a practical understanding about how these protocols work. Most
importantly, we will see how client and access point communication works at the packer
level by analyzing Management, Control and Data frames. We will then learn about
packet injection and packer sniffing in wireless networks, and look at some tools which
enable us to do the same.
Chapter 3, Bypassing WLAN Authentication: Now we get into how to break WLAN
authentication mechanism! We will go step by step and explore how to subvert Open and
Shared Key authentications. In the course of this, you will learn how to analyse wireless
packets and figure out the authentication mechanism of the network. We will also look at
how to break into networks with Hidden SSID and MAC Filtering enabled. These are two
common mechanisms employed by network administrators to make wireless networks
more stealthy and difficult to penetrate; however, these are extremely simple to bypass.
Chapter 4, WLAN Encryption Flaws: One of the most vulnerable parts of the WLAN
protocol is the Encryption schemas WEP, WPA and WPA2. Over the past decade
hackers have found multiple flaws in these schemas and have written publically available
software to break them and decrypt the data. Also, even though WPA/WPA2 is secure by
design, misconfiguring those opens up security vulnerabilities, that can be easily
exploited. In this chapter, we will understand the insecurities in each of these encryption
schemas and do practical demos on how to break them.
Chapter 5, Attacks on the WLAN Infrastructure: We will now shift our focus to WLAN
Infrastructure vulnerabilities. We will look at vulnerabilities created due to both
configuration and design problem. We will do practical demos of attacks such as access
point MAC spoofing, bit flipping and replay attacks, rogue access points, fuzzing and
denial of services. This chapter will give the reader a solid understanding of how to do a
penetration test of the WLAN infrastructure.
Chapter 6, Attacking the Client: This chapter might open your eyes if you always
believed that wireless client security was something you did not have to worry about!
Most people exclude the client from their list when they think about WLAN security.
This chapter will prove beyond doubt why the client is just as important as the access
point when penetration testing a WLAN network. We will look at how to compromise the
security using client side attacks such as Miss-Association, Caff e Latte, disassociation,
ad-hoc connections, fuzzing, honeypots and a host of others.
Chapter 7, Advanced WLAN Attacks: Now that we have already covered most of the
basic attacks on both the infrastructure and the client, we will look at more advanced
attacks in this chapter. These attacks typically involve using multiple basic attacks in
conjunction to break security in more challenging scenarios. Some of the attacks which
we will learn include wireless device fingerprinting, man-in-the-middle over wireless,
evading wireless intrusion detection and prevention systems, rogue access points
operating using custom protocol and a couple of others. This chapter presents the
absolute bleeding edge in wireless attacks out in the real world.
Chapter 8, Attacking WPA-Enterprise and RADIUS: This chapter graduates the user to
the next level by introducing him to advanced attacks on WPA-Enterprise and the
RADIUS server setup. These attacks will come in handy when the reader has to
penetration test large enterprise networks which rely on WPA-Enterprise and RADIUS
authentication to provide them with security. This is probably as advanced as Wi-Fi
attacks can get in the real world.
Chapter 9, WLAN Penetrating Testing Methodology: This is where all the learning from
the previous chapters comes together, and we will look at how to do a wireless
penetration test in a systematic and methodical way. We will learn about the various
phases of penetration testingPlanning, Discovery, Attack and Reporting, and apply it to
wireless penetration testing. We will also understand how to propose recommendations
and best practices after a wireless penetration test.
Chapter 10, WPS and Probes: This chapter covers the two new attacks in the industry
that have developed since the initial publication of this bookWPS brute-force and
probe sniffing for monitoring.
Installing Kali
[1]
Hardware requirements
We will need the following hardware to set up the wireless lab:
Two laptops with internal Wi-Fi cards: We will use one of the laptops as the
victim in our lab and the other as the penetration tester's laptop. Though almost
any laptop would fit this profile, laptops with at least 3 GB RAM are desirable. This is
because we may be running a lot of memory-intensive software in our experiments.
One wireless adapter (optional): Depending on the wireless card of your laptop,
we may need a USB Wi-Fi card that can support packet injection and packet sning,
which is supported by Kali. The best choice seems to be the Alfa AWUS036H card
from Alfa Networks, as Kali supports this out-of-the-box. This is available on
www.amazon.com for a retail price of 18 at the time of writing. An alternative
option is the Edimax EW-7711UAN, which is smaller and, marginally, cheaper.
One access point: Any access point that supports WEP/WPA/WPA2 encryption
standards would fit the bill. I will be using a TP-LINK TL-WR841N Wireless router
for the purpose of illustration in this book. You can purchase it from Amazon.com
for a retail price of around 20 at the time of writing.
Software requirements
We will need the following software to set up the wireless lab:
Kali: This software can be downloaded from the ocial website located at
http://www.kali.org. The software is open source, and you should be
able to download it directly from the website.
Windows XP/Vista/7: You will need any one of Windows XP, Windows Vista,
or Windows 7 installed on one of the laptops. This laptop will be used as the
victim machine for the rest of the book.
[2]
Chapter 1
Installing Kali
Let's now quickly take a look at how to get up-and-running with Kali.
Kali will be installed on the laptop that will serve as the penetration tester's machine
for the rest of the book.
1.
Boot the laptop with this DVD and select the option Install from the Boot menu:
[3]
2.
If booting was successful, then you should see an awesome retro screen as follows:
3.
This installer is similar to the GUI-based installers of most Linux systems and
should be simple to follow. Select the appropriate options in every screen and
start the installation process. Once the installation is done, restart the machine
as prompted and remove the DVD.
4.
Once the machine restarts, a login screen will be displayed. Type in the login as
root and the password as whatever you set it to during the installation process.
You should now be logged into your installed version of Kali. Congratulations!
I will change the desktop theme and some settings for this book. Feel free to
use your own themes and color settings!
[4]
Chapter 1
1.
Power on the access point and use an Ethernet cable to connect your laptop to
one of the access point's Ethernet ports.
[5]
2.
Enter the IP address of the access point configuration terminal in your browser. For
the TP-Link, it is by default 192.168.1.1. You should consult your access point's
setup guide to find its IP address. If you do not have the manuals for the access
point, you can also find the IP address by running the route n command. The
gateway IP address is typically the access point's IP. Once you are connected, you
should see a configuration portal that looks like this:
3.
Explore the various settings in the portal after logging in and find the settings
related to configuring a new SSID.
4.
Change the SSID to Wireless Lab. Depending on the access point, you may
have to reboot it for the settings to change:
[6]
Chapter 1
5.
Similarly, find the settings related to Wireless Security and change the setting to
Disable Security. Disable Security indicates that it is using Open Authentication mode.
6.
Save the changes to the access point and reboot it if required. Now your access
point should be up-and-running with an SSID Wireless Lab.
An easy way to verify this is to use the Wireless Configuration utility on Windows and
observe the available networks using the Windows laptop. You should find Wireless Lab
as one of the networks in the listing:
[7]
Have a go hero configuring the access point to use WEP and WPA
Play around with the configuration options of your access point. Try to get it up-and-running
using encryption schemes such as WEP and WPA/WPA2. We will use these modes in later
chapters to illustrate attacks against them.
1.
Plug in the card to one of the Kali laptop's USB ports and boot it.
Once you log in, open a console terminal and type in iwconfig. Your screen
should look as follows:
As you can see, wlan0 is the wireless interface created for the wireless adapter.
Type in ifconfig wlan0 to bring the interface up. Then, type in ifconfig
wlan0 to see the current state of the interface:
[8]
Chapter 1
2.
The MAC address 00:c0:ca:3e:bd:93 should match the MAC address written
under your Alfa card. I am using the Edimax that gives me the preceding MAC
address 80:1f:02:8f:34:d5. This is a quick check to ensure that you have
enabled the correct interface.
1.
Let's first see what wireless networks our adapter is currently detecting. Issue
the command iwlist wlan0 scanning and you will find a list of networks in
your vicinity:
[9]
Keep scrolling down and you should find the Wireless Lab network in this list.
In my setup, it is detected as Cell 05; it may be dierent in yours. The ESSID
field contains the network name.
2.
As multiple access points can have the same SSID, verify that the MAC address
mentioned in the preceding Address field matches your access point's MAC.
A fast and easy way to get the MAC address is underneath the access point or
using web-based GUI settings.
3.
Now, issue the iwconfig wlan0 essid "Wireless Lab" command and then
iwconfig wlan0 to check the status. If you have successfully connected to the
access point, you should see the MAC address of the access point in the Access
Point: field in the output of iwconfig.
4.
We know that the access point has a management interface IP address 192.168.0.1
from its manual. Alternately, this is the same as the default router IP address when we
run the route n command. Let's set our IP address in the same subnet by issuing
the ifconfig wlan0 192.168.0.2 netmask 255.255.255.0 up command.
Verify the command succeeded by typing ifconfig wlan0 and checking the output.
5.
Now let's ping the access point by issuing the ping 192.168.0.1 command. If the
network connection has been set up properly, then you should see the responses from
the access point. You can additionally issue an arp a command to verify that the
response is coming from the access point. You should see that the MAC address of the
IP 192.168.0.1 is the access point's MAC address we noted earlier. It is important
to note that some of the more recent access points might have responses to Internet
Control Message Protocol (ICMP) echo request packets disabled. This is typically
done to make the access point secure out-of-the-box with only minimal configuration
settings available. In such a case, you can try to launch a browser and access the
web interface to verify that the connection is up-and-running:
[ 10 ]
Chapter 1
[ 11 ]
Summary
This chapter provided you with detailed instructions on how to set up your own wireless
lab. Also, in the process, you learned the basic steps for:
Installing Kali on your hard drive and exploring other options such as Virtual
Machines and USBs
Verifying the connection state between the wireless client and the
access point
It is important that you gain confidence in configuring the system. If you aren't confident,
it is advisable that you repeat the preceding examples a couple of times. In later chapters,
we will design more complicated scenarios.
In the next chapter, we will learn about inherent design-based insecurities in WLANs
design. We will use the network analyzer tool, Wireshark, to understand these concepts
in a practical way.
[ 12 ]
Get more information Kali Linux Wireless Penetration Testing Beginner's Guide
www.PacktPub.com
Stay Connected: