Kali Linux Wireless Penetration Testing Cookbook
Total Page:16
File Type:pdf, Size:1020Kb
Kali Linux Wireless Penetration Testing Cookbook Identify and assess vulnerabilities present in your wireless network, Wi-Fi, and Bluetooth enabled devices to improve your wireless security Sean-Philip Oriyano BIRMINGHAM - MUMBAI Kali Linux Wireless Penetration Testing Cookbook Copyright © 2017 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 author, 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: December 2017 Production reference: 1121217 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78355-408-9 www.packtpub.com Credits Author Copy Editor Sean-Philip Oriyano Safis Editing Reviewer Project Coordinator Ahmad Muammar WK Virginia Dias Commissioning Editor Proofreader Kartikey Pandey Safis Editing Acquisition Editor Indexer Rahul Nair Pratik Shirodkar Content Development Editor Graphics Sharon Raj Tania Dutta Technical Editor Production Coordinator Prashant Chaudhari Arvindkumar Gupta Disclaimer The information within this book is intended to be used only in an ethical manner. Do not use any information from the book if you do not have written permission from the owner of the equipment. If you perform illegal actions, you are likely to be arrested and prosecuted to the full extent of the law. Packt Publishing does not take any responsibility if you misuse any of the information contained within the book. The information herein must only be used while testing environments with proper written authorizations from appropriate persons responsible. About the Author Sean-Philip Oriyano is a longtime security professional. Over the past 25 years, he has divided his time between performing security research, consulting, and delivering training in the fields of both general IT and cyber security. In addition, he is a best-selling author with many years of experience in both digital and print media. Sean has published several books over the past decade and has expanded his reach further by appearing on TV and radio shows. Additionally, Sean is a Chief Warrant Officer and Unit Commander specializing in cyber security training, development, and strategy. As a CWO, he is recognized as a SME in his field and is frequently called upon to provide expertise, training, and mentoring wherever needed. Acknowledgments Zillions, that's the number of people I feel I should be acknowledging at this point. I don’t have that much space, so if I leave you out, I humbly apologize. Erica, thanks for your assistance in helping me in testing and evaluating different wireless technologies. Lot's of you at Packt, especially Sharon and Rahul. This book would not have been possible without either of you helping me to keep on task. Don’t think I can forget you, Jason and Ms. Aran. Again, for anyone I left out I apologize; however, thanks for all your assistance. About the Reviewer Ahmad Muammar WK is an IT security consultant and penetration tester. He holds Offensive Security Certified Professional (OSCP), Offensive Security Certified Expert (OSCE), and eLearnSecurity Mobile Application Penetration Tester (eMAPT) certifications. He is the founder of ECHO, one of the oldest Indonesian IT security communities, and is also a founder of IDSECCONF, the biggest annual security conference in Indonesia. He is also a reviewer of Kali Linux Cookbook, Willie L. Pritchett and David De Smet, Packt Publishing; Kali Linux Network Scanning Cookbook, Justin Hutchens, Packt Publishing; and Kali Linux Network Scanning Cookbook Second Edition, Michael Hixon, Justin Hutchens Packt Publishing. www.PacktPub.com For support files and downloads related to your book, please visit www.Packt Pub.com. 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 [email protected] for more details. At www.PacktPub.c om, 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://www.packtpub.com/mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. 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 Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1783554088. If you'd like to join our team of regular reviewers, you can email us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products! Lot’s of things go through my mind when I come to doing a dedication for a book, so here is my attempt to put some of those things on paper. I would first like to dedicate this book to my Mom and Dad for their support and encouragement over the years. If it wasn’t for them, my career and whatever success I have had in life would not have been possible. Next I would like to dedicate this to those who I serve with in the Reserves. Your service, dedication, brains, creativity, and camaraderie inspire me. The "Cyberwarriors" are the " Tip-of-the-spear" Know that all of you are important to me and I appreciate all of you more than you realize. Duty, Service, Honor Table of Contents Preface What this book covers What you need for this book Who this book is for Sections Getting ready How to do it… How it works… There's more… See also Conventions Reader feedback Customer support Errata Piracy Questions 1. Kali Linux and Wireless Networking Introduction Getting started with Kali Installing Kali Linux Getting ready How to do it... Virtualized versus physical Pre-installation checklist Choosing an installation option Hard drive selection Network cards and wireless Installing Kali Linux on a PC Getting ready How to do it... Installing Kali in a virtual environment Getting ready How to do it... Updating Kali Linux How to do it... Preparing for wireless pentesting How to do it... There's more... Bluetooth adapters 2. Attacking Access Controls Introduction Types of access control attacks Working with war driving Getting ready How to do it... Mapping access points and increasing accuracy Getting ready How to do it... Creating a rogue access point Getting ready How to do it... Evading MAC filtering with MAC spoofing Getting ready How to do it... Identifying promiscuous clients Getting ready How to do it... 3. Attacking Integrity Controls Introduction Types of attack Sniffing on a wireless network How does sniffing work? Getting ready How to do it... Working with monitor mode and packet injection Getting ready How to do it... Performing a data replay Getting ready How to do it... Cracking WEP Getting ready How to do it... Phase one – configuring monitor mode Phase two – packet injection Phase three – capturing IVs Phase four – performing a fake authentication Phase five – ARP replay mode Phase six – obtaining the WEP key 4. Attacking Confidentiality Introduction Types of attack Creating an evil twin Getting ready How to do it... Step one – monitor mode airmon-ng Step two – airdump-ng Step three – create a new AP with the same SSID and MAC address Step four – forcing a reconnect Step five – power up Man-in-the-middle with wireless Getting ready How to do it... Cracking WEP Getting ready Step one – monitor mode airmon-ng Step two – airdump-ng Step three – airdump-ng and traffic capture Step four – replay that traffic Step five – crack that traffic 5. Attacking Availability Introduction Types of attack Executing a deauthentication flood Getting ready How to do it... Detecting beacon frames Getting ready How to do it... Spoofing beacon frames Getting ready How to do it... Creating a beacon flood Getting ready ARP cache poisoning Getting ready 6. Authentication Attacks Attacks against authentication Types of attack WEP attacks Getting ready How to do it... WPA and WPA2 attacks Getting ready How to do it... Attacking WPS Getting ready How to do it... 7. Bluetooth Attacks Introduction A brief history of Bluetooth A look at the technology Bluetooth in operation Bluetooth protocol stack Vulnerabilities in Bluetooth Selecting the Bluetooth hardware Types of attack Bluesmacking Getting ready How to do it... Bluejacking Getting ready How to do it... Bluesnarfing Getting ready How to do it... Preface More and more organizations are moving toward wireless networks, and Wi-Fi is a popular choice. The security of wireless networks is more important than ever before due to the widespread usage of Wi-Fi networks.