Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Mastering Kali Linux Wireless Pentesting
Mastering Kali Linux Wireless Pentesting
Mastering Kali Linux Wireless Pentesting
Ebook517 pages3 hours

Mastering Kali Linux Wireless Pentesting

Rating: 3 out of 5 stars

3/5

()

Read preview

About this ebook

Test your wireless network’s security and master advanced wireless penetration techniques using Kali Linux

About This Book

- Develop your skills using attacks such as wireless cracking, Man-in-the-Middle, and Denial of Service (DOS), as well as extracting sensitive information from wireless networks
- Perform advanced wireless assessment and penetration tests
- Use Embedded Platforms, Raspberry PI, and Android in wireless penetration testing with Kali Linux

Who This Book Is For

If you are an intermediate-level wireless security consultant in Kali Linux and want to be the go-to person for Kali Linux wireless security in your organisation, then this is the book for you. Basic understanding of the core Kali Linux concepts is expected.

What You Will Learn

- Fingerprint wireless networks with the various tools available in Kali Linux
- Learn various techniques to exploit wireless access points using CSRF
- Crack WPA/WPA2/WPS and crack wireless encryption using Rainbow tables more quickly
- Perform man-in-the-middle attack on wireless clients
- Understand client-side attacks, browser exploits, Java vulnerabilities, and social engineering
- Develop advanced sniffing and PCAP analysis skills to extract sensitive information such as DOC, XLS, and PDF documents from wireless networks
- Use Raspberry PI and OpenWrt to perform advanced wireless attacks
- Perform a DOS test using various techniques and tools

In Detail

Kali Linux is a Debian-based Linux distribution designed for digital forensics and penetration testing. It gives access to a large collection of security-related tools for professional security testing - some of the major ones being Nmap, Aircrack-ng, Wireshark, and Metasploit.
This book will take you on a journey where you will learn to master advanced tools and techniques to conduct wireless penetration testing with Kali Linux.
You will begin by gaining an understanding of setting up and optimizing your penetration testing environment for wireless assessments. Then, the book will take you through a typical assessment from reconnaissance, information gathering, and scanning the network through exploitation and data extraction from your target. You will get to know various ways to compromise the wireless network using browser exploits, vulnerabilities in firmware, web-based attacks, client-side exploits, and many other hacking methods. You will also discover how to crack wireless networks with speed, perform man-in-the-middle and DOS attacks, and use Raspberry Pi and Android to expand your assessment methodology.
By the end of this book, you will have mastered using Kali Linux for wireless security assessments and become a more effective penetration tester and consultant.

Style and approach

This book uses a step-by-step approach using real-world attack scenarios to help you master the wireless penetration testing techniques.
LanguageEnglish
Release dateFeb 25, 2016
ISBN9781785282850
Mastering Kali Linux Wireless Pentesting

Related to Mastering Kali Linux Wireless Pentesting

Related ebooks

Security For You

View More

Related articles

Reviews for Mastering Kali Linux Wireless Pentesting

Rating: 3 out of 5 stars
3/5

2 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Mastering Kali Linux Wireless Pentesting - Ram Jilumudi Raghu

    Table of Contents

    Mastering Kali Linux Wireless Pentesting

    Credits

    About the Authors

    About the Reviewer

    www.PacktPub.com

    eBooks, discount offers, and more

    Why subscribe?

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Downloading the example code

    Downloading the color images of this book

    Errata

    Piracy

    Questions

    1. Wireless Penetration Testing Fundamentals

    Wireless communication

    Wireless standards

    The 2.4 GHz spectrum

    The 5 GHz spectrum

    Choosing the right equipment

    Supported wireless modes

    Wireless adapters

    Ralink RT3070

    Atheros AR9271

    Ralink RT3572

    Antennas

    Omnidirectional antennas

    Patch antennas

    Yagi antennas

    Kali Linux for the wireless pentester

    Downloading Virtual Box

    Installing Virtual Box

    Kali Linux deployment

    Mapping the wireless adapter into Kali

    Summary

    2. Wireless Network Scanning

    Wireless network discovery

    802.11 network terminology

    802.11 configuration modes

    802.11 frames

    Management frame

    Control frames

    Data frames

    The scanning phase

    Passive scanning

    Active scanning

    Tools of the trade

    Airodump-ng

    Adding a location to Airodump-ng with GPS

    Visually displaying relationships with Airgraph-ng

    Discovering Client Probes with Hoover

    WPS discovery with Wash

    Kismet

    Wireshark

    Summary

    3. Exploiting Wireless Devices

    Attacking the firmware

    Authentication bypass

    CVE-2013-7282

    CVE-2013-6026

    CVE-2015-7755

    Cross-Site Request Forgery

    CVE-2014-5437

    CVE-2014-8654

    CVE-2013-2645

    Remote code execution

    CVE-2014-9134

    Command injection

    CVE-2008-1331

    Denial of Service

    OSVDB-102605

    CVE-2009-3836

    Information disclosure

    CVE-2014-6621

    CVE-2014-6622

    CVE-2015-0554

    Attacking the services

    Attacking Telnet

    Attacking SSH

    Attacking SNMP

    CVE-2014-4863: Arris Touchstone DG950A SNMP information disclosure

    CVE-2008-7095: Aruba Mobility Controller SNMP community string dislosure

    Attacking SNMP

    Attacking UPnP

    Discovery

    Description

    Control

    UPnP attacks

    CVE-2011-4500

    CVE-2011-4499

    CVE-2011-4501

    CVE-2012-5960

    Checks on misconfiguration

    Summary

    4. Wireless Cracking

    Overview of different wireless security protocols

    Cracking WPA

    WPA Personal

    Cracking WPA2

    Generating rainbow tables

    Generating rainbow tables using genpmk

    Generating rainbow tables using airolib-ng

    Cracking WPS

    Cracking 802.1x using hostapd

    Summary

    5. Man-in-the-Middle Attacks

    MAC address Spoofing/ARP poisoning

    Rogue DHCP server

    Name resolution spoofing

    DNS spoofing

    Configuring Ettercap for DNS spoofing

    NBNS spoofing

    Summary

    6. Man-in-the-Middle Attacks Using Evil Twin Access Points

    Creating virtual access points with Hostapd

    Creating virtual access points with airbase-ng

    Session hijacking using Tamper Data

    An example of session hijacking

    Performing session hijacking using Tamper Data

    Credential harvesting

    Using Ettercap to spoof DNS

    Hosting your fake web page

    Web-based malware

    Creating malicious payload using msfpayload

    Hosting the malicious payload on SET

    SSL stripping attack

    Setting up SSLstrip

    Browser AutoPwn

    Setting up Metasploit's Browser Autopwn attack

    Summary

    7. Advanced Wireless Sniffing

    Capturing traffic with Wireshark

    Decryption using Wireshark

    Decrypting and sniffing WEP-encrypted traffic

    Decrypting and sniffing WPA-encrypted traffic

    Analyzing wireless packet capture

    Determining network relationships and configuration

    Extracting the most visited sites

    Extracting data from unencrypted protocols

    Extracting HTTP objects

    Merging packet capture files

    Summary

    8. Denial of Service Attacks

    An overview of DoS attacks

    Management and control frames

    Authentication flood attack

    An attack scenario

    Scanning for access points

    MDK3 setup for authentication flood

    The attack summary

    The fake beacon flood attack

    MDK3 fake beacon flood with a random SSID

    MDK3 fake beacon flood with the selected SSID list

    The attack summary

    Metasploit's fake beacon flood attack

    Configuring packet injection support for Metasploit using lorcon

    Creating a monitor mode interface

    The Metasploit deauthentication flood attack

    Identifying the target access points

    Attacking the wireless client and AP using Metasploit

    The attack summary

    The Metasploit CTS/RTS flood attack

    The Metasploit setup for an RTS-CTS attack

    The attack summary

    Summary

    9. Wireless Pentesting from Non-Traditional Platforms

    Using OpenWrt for wireless assessments

    Installing the aircrack-ng suite on OpenWrt

    Using Raspberry Pi for wireless assessments

    Accessing Kali Linux from a remote location

    Using AutoSSH for reverse shell

    Powering and concealing your Raspberry Pi or OpenWrt embedded device

    Running Kali on Android phones and tablets

    Wireless discovery using Android PCAP

    Summary

    Index

    Mastering Kali Linux Wireless Pentesting


    Mastering Kali Linux Wireless Pentesting

    Copyright © 2016 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: February 2016

    Production reference: 1180216

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB, UK.

    ISBN 978-1-78528-556-1

    www.packtpub.com

    Credits

    Authors

    Brian Sak

    Jilumudi Raghu Ram

    Reviewers

    Deepanshu Khanna

    Rajshekhar Murthy

    Commissioning Editor

    Veena Pagare

    Acquisition Editor

    Meeta Rajani

    Content Development Editor

    Amey Varangaonkar

    Technical Editor

    Mohit Hassija

    Copy Editor

    Stuti Srivastava

    Project Coordinator

    Suzanne Coutinho

    Proofreader

    Safis Editing

    Indexer

    Hemangini Bari

    Graphics

    Kirk D'Penha

    Production Coordinator

    Shantanu N. Zagade

    Cover Work

    Shantanu N. Zagade

    About the Authors

    Brian Sak, CCIE #14441 (Security), is a 20-year information security veteran who currently works as a technical solutions architect for Cisco Systems. At Cisco Systems, he is engaged in solution development, and he consults with Cisco partners to help them build and improve their processes and services in the areas of big data analytics and digitization. Prior to joining Cisco Systems, Brian performed security consulting, penetration testing, and security assessment services for large financial institutions, US government agencies, and enterprises in the Fortune 500. In addition to numerous security and industry certifications, he has a bachelor's of science degree in information technology, with an emphasis on information security, and a master's of science degree in information security and assurance. He is also a contributor to The Center for Internet Security and other publications by Packt and Cisco Press.

    I would like to thank my amazing wife, Cindy, and children, Caden and Maya, for all the love and support that enabled me to take the time to make this book a reality. Thank you for allowing me to pursue yet another special project that eats into our already limited family time. I would also like to thank the fine folks at Packt Publishing for taking the chance and allowing your technical reviewer to step up and author the remaining content of this book. I know it was a risk to ask your pit crew, Is there anyone out there who wants to go fast? and for that, I am extremely grateful.

    Jilumudi Raghu Ram is a security analyst with over 5 years of experience in the information security domain, with a strong knowledge of incident response, digital forensics, network security, infrastructure penetration testing, and Secure configuration audits. He has conducted security audits for more than 70 networks, both internal and external, re-audits, secure configuration reviews, and server audits (Linux and Windows) for various organizations. One of his major clients has been the Government of India, where his team was responsible for conducting penetration testing assignments for various government bodies, as well as preparing vulnerability assessment and penetration testing reports, and supporting the clients to fix those vulnerabilities.

    Raghu Ram's areas of expertise include incident response, digital forensics, threat research, penetration testing, vulnerability assessment, dynamic malware analysis, intrusion detection systems, and security operations monitoring.

    Raghu Ram has written various articles related to information security in the Hindu Group magazine Frontline. He also maintains his own website dedicated to Penetration Testing - www.wirelesspentest.com

    I am greatly indebted to my mother, Bhuvaneswari, and brother, Yuva Kishore Reddy, for bringing me up and giving me the freedom to follow my passions. I would also like to thank UshaSree and my uncles Karunananda Reddy, Ganapathi Reddy, and Pratap Kumar Reddy for helping me to continue my studies.

    About the Reviewer

    Deepanshu Khanna is an Appin Certified Information Security Expert (ACISE) with 2 years of experience in designing, implementing, and troubleshooting network, web, and operating system infrastructures and implementing mechanisms for the security of web, network, and OS technologies. His core competencies include wireless security, cryptanalysis, vulnerability evaluation, and firewall configuration, among other skills.

    He has a proven record of evaluating system vulnerabilities in order to recommend security improvements as well as improve efficiency while aligning business processes with network design and infrastructure. He has the ability to solve complex problems involving a wide variety of information systems, work independently on large-scale projects, and thrive under pressure in fast-paced environments while directing multiple projects from the concept to the implementation.

    Deepanshu has conducted various workshops and seminars on antivirus, vulnerability assessment, penetration testing, cyber crime investigation, and forensics at various institutions all across India. He is a frequent guest at various engineering colleges, where he delivers sessions on intrusion detection systems.

    You can reach out to Deepanshu on his Linkedin profile at https://in.linkedin.com/in/deepanshukhanna.

    www.PacktPub.com

    eBooks, discount offers, and more

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.

    At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    https://www2.packtpub.com/books/subscription/packtlib

    Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

    Why subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print, and bookmark content

    On demand and accessible via a web browser

    Preface

    This book demonstrates how to perform a successful wireless assessment utilizing a selection of open source tools. Readers, from beginners to seasoned professionals, will gain an understanding of the tools and techniques used to discover, crack, and exploit wireless networks as well as learn how to extract sensitive information from the wireless traffic and the clients themselves. Wireless networks are nearly always in scope as part of a comprehensive security assessment and require special consideration and a different skill set than other aspects of the assessment. You will learn the language and technologies that differentiate 802.11 networks and be introduced to the specialized applications used to test them. This book is built around gaining hands-on experience with Kali Linux, and each chapter contains many step-by-step examples on the use and mastery of the wireless assessment tools included with this distribution.

    What this book covers

    Chapter 1, Wireless Penetration Testing Fundamentals, introduces you to the hardware, software, and terminology associated with wireless penetration tests. It guides you through deploying Kali and verifying your wireless hardware required to conduct a successful wireless assessment.

    Chapter 2, Wireless Network Scanning, covers the steps that are to be performed in order to discover, identify, and catalog wireless networks and clients that are in the scope of your penetration test.

    Chapter 3, Exploiting Wireless Devices, describes weaknesses that may be present in the wireless equipment itself and tools and techniques you can use to exploit these weaknesses.

    Chapter 4, Wireless Cracking, digs into the interception of wireless key exchanges and authentication between the clients and the infrastructure. It also shows you practical techniques to crack these various security mechanisms and expose the encrypted data transmissions.

    Chapter 5, Man-in-the Middle Attacks, explains and demonstrates ways to extract sensitive information from the clients who are using the wireless infrastructure by enabling you to intercept their traffic and manipulate critical network resources.

    Chapter 6, Man-in-the Middle Attacks Using Evil Twin Access Points, expands on the previous chapter by showing you techniques to set up a parallel wireless infrastructure to emulate the production network. This enables additional attacks against the clients utilizing the wireless network.

    Chapter 7, Advanced Wireless Sniffing, covers the use of traffic captures and decryption as a means to extract sensitive information from the data that is traversing the wireless network. Tools and techniques used to collect and analyze the data are provided.

    Chapter 8, Denial of Service Attacks, discusses the use of targeted or broad disruptions in the performance or availability of the wireless network as an element of a wireless assessment.

    Chapter 9, Wireless Pen-Testing from Non-Traditional Platforms, expands upon the previous chapters and introduces additional hardware and software platforms that can be used during a wireless assessment, including Raspberry Pi and Android devices.

    What you need for this book

    This book covers the use of Kali Linux to conduct wireless penetration tests. The theory and explanations of the wireless technologies and applications are covered in each of the chapters; however, if you'd like to follow along with the provided examples, you will need some equipment. Chapter 1, Wireless Penetration Testing Fundamentals covers the hardware and software requirements for a wireless penetration test and should be sufficient to provide a list of prerequisites for the chapters that follow. In general, you will need a laptop running the Kali Linux distribution and a supported wireless adapter to follow along with the activities and tests described in this book.

    Who this book is for

    This book is intended for security professionals who actively conduct security assessments or penetration tests for their clients and would like to learn more about the security considerations for wireless network environments. This book will also be useful for those looking to get into the information security profession as it walks the reader step by step through many scenarios that are common when assessing wireless security.

    Conventions

    In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

    Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: The iw command is used to show or manipulate wireless devices and their configurations.

    A block of code is set as follows:

    CSRF Payload

    http://10.0.0.1/remote_management.php; method=POST>

      hidden name=http_port value=8080 />

      hidden name=http value=enabled />

      hidden name=single value=any />

      submit value=Submit request />

     

    Any command-line input or output is written as follows:

    #apt-get update #apt-get upgrade

    New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: We will now import the new image into VirtualBox. Navigate to File | Import Appliance… from the VirtualBox application.

    Note

    Warnings or important notes appear in a box like this.

    Tip

    Tips and tricks appear like this.

    Reader feedback

    Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

    To send us general feedback, simply e-mail <feedback@packtpub.com>, and mention the book's title in the subject of your message.

    If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

    Customer support

    Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

    Downloading the example code

    You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

    You can download the code files by following these steps:

    Log in or register to our website using your e-mail address and password.

    Hover the mouse pointer on the SUPPORT tab at the top.

    Click on Code Downloads & Errata.

    Enter the name of the book in the Search box.

    Select the book for which you're looking to download the code files.

    Choose from the drop-down menu where you purchased this book from.

    Click on Code Download.

    Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

    WinRAR / 7-Zip for Windows

    Zipeg / iZip / UnRarX for Mac

    7-Zip / PeaZip for Linux

    Downloading the color images of this book

    We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/MasteringKaliLinuxWirelessPentesting_ColorImages.pdf.

    Errata

    Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

    To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

    Piracy

    Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

    Please contact us at <copyright@packtpub.com> with a link to the suspected pirated material.

    We appreciate your help in protecting our authors and our ability to bring you valuable content.

    Questions

    If you have a problem with any aspect of this book, you can contact us at <questions@packtpub.com>, and we will do our best to address the problem.

    Chapter 1. Wireless Penetration Testing Fundamentals

    Before you begin to scan, inject, crack, sniff, spoof, and DoS (Denial of Service) wireless networks, it helps to have an understanding of the fundamentals of conducting a wireless assessment. You should have an understating of

    Enjoying the preview?
    Page 1 of 1