Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Kali Linux: Wireless Penetration Testing Beginner's Guide, Second Edition
Kali Linux: Wireless Penetration Testing Beginner's Guide, Second Edition

Kali Linux: Wireless Penetration Testing Beginner's Guide, Second Edition: Master wireless testing techniques to survey and attack wireless networks with Kali Linux

By Cameron Buchanan
$39.99 $27.98
Book Mar 2015 214 pages 1st Edition
eBook
$39.99 $27.98
Print
$48.99
Subscription
$15.99 Monthly
eBook
$39.99 $27.98
Print
$48.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Mar 30, 2015
Length 214 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783280414
Category :

Estimated delivery fee Deliver to Chile

Premium 3 - 6 business days

$40.95
(Includes tracking information)

Standard 10 - 13 business days

$19.95
Table of content icon View table of contents Preview book icon Preview Book

Kali Linux: Wireless Penetration Testing Beginner's Guide, Second Edition

Chapter 1. Wireless Lab Setup

 

"If I had eight hours to chop down a tree, I'd spend six hours sharpening my axe."

 
 --Abraham Lincoln, 16th US President

Behind every successful execution is hours or days of preparation, and wireless penetration testing is no exception. In this chapter, we will create a wireless lab that we will use for our experiments in this book. Consider this lab as your preparation arena before you dive into real-world penetration testing!

Wireless penetration testing is a practical subject, and it is important to first set up a lab where we can try out all the different experiments in this book in a safe and controlled environment. It is important that you set up this lab first before moving on in this book.

In this chapter, we will take a look at the following:

  • Hardware and software requirements

  • Installing Kali

  • Setting up an access point and configuring it

  • Installing the wireless card

  • Testing connectivity between the laptop and the access point

So let the games begin!

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 sniffing, 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.

  • An Internet connection: This will come in handy for performing research, downloading software, and for some of our experiments.

Software requirements


We will need the following software to set up the wireless lab:

  • Kali: This software can be downloaded from the official 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.

Note

It is important to note that, even though we are using a Windows-based OS for our tests, the techniques learnt can be applied to any Wi-Fi-capable devices such as smart phones and tablets, among others.

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.

Time for action – installing Kali


Kali is relatively simple to install. We will run Kali by booting it as a Live DVD and then install it on the hard drive.

Perform the following instructions step by step:

Burn the Kali ISO (we are using the Kali 32-bit ISO) you downloaded onto a bootable DVD.

  1. Boot the laptop with this DVD and select the option Install from the Boot menu:

  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!

What just happened?

We have successfully installed Kali on the laptop! We will use this laptop as the penetration tester's laptop for all other experiments in this book.

Have a go hero – installing Kali on VirtualBox

We can also install Kali within virtualization software such as VirtualBox. If you don't want to dedicate a full laptop to Kali, this is the best option. Kali's installation process in VirtualBox is exactly the same. The only difference is the pre-setup, which you will have to create in VirtualBox. Have a go at it! You can download VirtualBox from http://www.virtualbox.org.

One of the other ways in which we can install and use Kali is via USB drives. This is particularly useful if you do not want to install on the hard drive but still want to store persistent data on your Kali instance, such as scripts and new tools. We encourage you to try this out as well!

Setting up the access point


Now we will set up the access point. As mentioned earlier, we will be using the TP-LINK TL-WR841N Wireless Router for all the experiments in this book. However, feel free to use any other access point. The basic principles of operation and usage remain the same.

Time for action – configuring the access point


Let's begin! We will set the access point up to use Open Authentication with an SSID of Wireless Lab.

Follow these instructions step by step:

  1. Power on the access point and use an Ethernet cable to connect your laptop to one of the access point's Ethernet ports.

  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:

  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:

What just happened?

We have successfully setup our access point with an SSID Wireless Lab. It is broadcasting its presence and this is being picked up by our Windows laptop and others within the Radio Frequency (RF) range of the access point.

It is important to note that we configured our access point in Open mode, which is the least secure. It is advisable not to connect this access point to the Internet for the time being, as anyone within the RF range will be able to use it to access the Internet.

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.

Setting up the wireless card


Setting up our wireless adapter is much easier than the access point. The advantage is that Kali supports this card out-of-the-box and ships with all requisite device drivers to enable packet injection and packet sniffing.

Time for action – configuring your wireless card


We will be using the wireless adapter with the penetration tester's laptop.

Please follow these instructions step-by-step to set up your card:

  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:

  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.

What just happened?

Kali ships with all the required drivers for the Alfa and Edimax adapters out of the box. As soon as the machine booted, the adapter was recognized and was assigned the network interface wlan0. Now our wireless adapter is up and functional!

Connecting to the access point


Now we will take a look at how to connect to the access point using the wireless adapter. Our access point has an SSID Wireless Lab and does not use any authentication.

Time for action – configuring your wireless card


Here we go! Follow these steps to connect your wireless card to the access point:

  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:

    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 different 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:

    On the access point, we can verify connectivity by looking at the connection logs. As you can see in the following log, the MAC address of the wireless card 4C:0F:6E:70:BD:CB has been logged making DHCP requests from the router:

What just happened?

We just connected to our access point successfully from Kali using our wireless adapter as the wireless device. We also learnt how to verify that a connection has been established at both the wireless client and the access point side.

Have a go hero – establishing a connection in a WEP configuration

Here is a challenging exercise for you—set up the access point in a WEP configuration. For each of these, try establishing a connection with the access point using the wireless adapter. Hint: check the manual for the iwconfig command by typing man iwconfig to see how to configure the card to connect to WEP.

Pop quiz – understanding the basics

Q1. After issuing the command ifconfig wlan0, how do you verify the wireless card is up and functional?

Q2. Can we run all our experiments using the Kali live CD alone? Can we not install the CD to the hard drive?

Q3. What does the command arp –a show?

Q4. Which tool should we use in Kali to connect to WPA/WPA2 networks?

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

  • Configuring your access point over the web interface

  • Understanding and using several commands to configure and use your wireless card

  • 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.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

What you will learn

Create a wireless lab for your experiments Sniff out wireless packets and hidden networks Capture and crack WPA2 keys Discover hidden SSIDs Explore the ins and outs of wireless technologies Sniff probe requests and track users through SSID history Attack radius authentication systems Sniff wireless traffic and collect interesting data Decrypt encrypted traffic with stolen keys

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Mar 30, 2015
Length 214 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781783280414
Category :

Estimated delivery fee Deliver to Chile

Premium 3 - 6 business days

$40.95
(Includes tracking information)

Standard 10 - 13 business days

$19.95

Table of Contents

19 Chapters
Kali Linux Wireless Penetration Testing Beginner's Guide Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Authors Chevron down icon Chevron up icon
About the Reviewer Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Disclaimer Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. Wireless Lab Setup Chevron down icon Chevron up icon
2. WLAN and its Inherent Insecurities Chevron down icon Chevron up icon
3. Bypassing WLAN Authentication Chevron down icon Chevron up icon
4. WLAN Encryption Flaws Chevron down icon Chevron up icon
5. Attacks on the WLAN Infrastructure Chevron down icon Chevron up icon
6. Attacking the Client Chevron down icon Chevron up icon
7. Advanced WLAN Attacks Chevron down icon Chevron up icon
8. Attacking WPA-Enterprise and RADIUS Chevron down icon Chevron up icon
9. WLAN Penetration Testing Methodology Chevron down icon Chevron up icon
10. WPS and Probes Chevron down icon Chevron up icon
Pop Quiz Answers Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.