Kali Linux Cookbook - Willie L. Pritchett - E-Book

Kali Linux Cookbook E-Book

Willie L. Pritchett

0,0
61,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In this age, where online information is at its most vulnerable, knowing how to execute the same attacks that hackers use to break into your system or network helps you plug the loopholes before it's too late and can save you countless hours and money. Kali Linux is a Linux distribution designed for penetration testing and security auditing. It is the successor to BackTrack, the world's most popular penetration testing distribution.

Discover a variety of popular tools of penetration testing, such as information gathering, vulnerability identification, exploitation, privilege escalation, and covering your tracks.

Packed with practical recipes, this useful guide begins by covering the installation of Kali Linux and setting up a virtual environment to perform your tests. You will then learn how to eavesdrop and intercept traffic on wireless networks, bypass intrusion detection systems, and attack web applications, as well as checking for open ports, performing data forensics, and much more. The book follows the logical approach of a penetration test from start to finish with many screenshots and illustrations that help to explain each tool in detail. The Kali Linux Cookbook will serve as an excellent source of information for the security professional and novice alike!

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 187

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Kali Linux Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Up and Running with Kali Linux
Introduction
Installing to a hard disk drive
Getting ready
How to do it...
Installing to a USB drive with persistent memory
Getting ready
How to do it...
Installing in VirtualBox
Getting ready
How to do it...
Installing VMware Tools
Getting ready
How to do it...
How it works...
Fixing the splash screen
How to do it...
Starting network services
Getting ready
How to do it...
Setting up the wireless network
How to do it...
How it works...
2. Customizing Kali Linux
Introduction
Preparing kernel headers
Getting ready
How to do it...
Installing Broadcom drivers
Getting ready
How to do it...
Installing and configuring ATI video card drivers
Getting ready
How to do it...
Installing and configuring nVidia video card drivers
Getting ready
How to do it...
Applying updates and configuring extra security tools
How to do it...
Setting up ProxyChains
How to do it...
Directory encryption
How to do it...
How it works...
3. Advanced Testing Lab
Introduction
Getting comfortable with VirtualBox
Getting ready
How to do it...
How it works...
There's more...
Downloading Windows Targets
Getting ready
How to do it...
Downloading Linux Targets
Getting ready
How to do it...
Attacking WordPress and other applications
Getting ready
How to do it...
There's more...
4. Information Gathering
Introduction
Service enumeration
How to do it...
Determining network range
How to do it...
How it works...
Identifying active machines
How to do it...
Finding open ports
Getting ready
How to do it...
How it works…
There's more...
Operating system fingerprinting
Getting ready
How to do it...
Service fingerprinting
How to do it...
Threat assessment with Maltego
Getting ready
How to do it...
How it works...
There's more...
Mapping the network
How to do it...
How it works...
There's more...
5. Vulnerability Assessment
Introduction
Installing, configuring, and starting Nessus
Getting ready
How to do it...
How it works...
There's more...
Nessus – finding local vulnerabilities
Getting ready
How to do it...
Nessus – finding network vulnerabilities
Getting ready
How to do it...
Nessus – finding Linux-specific vulnerabilities
Getting ready
How to do it...
Nessus – finding Windows-specific vulnerabilities
Getting ready
How to do it...
Installing, configuring, and starting OpenVAS
Getting ready
How to do it...
How it works...
There's more...
Setting up an SSH script to start OpenVAS
Using the OpenVAS Desktop
OpenVAS – finding local vulnerabilities
How to do it...
How it works...
There's more...
OpenVAS – finding network vulnerabilities
Getting ready
How to do it...
How it works...
There's more...
OpenVAS – finding Linux-specific vulnerabilities
Getting ready
How to do it...
How it works...
There's more...
OpenVAS – finding Windows-specific vulnerabilities
Getting ready
How to do it...
How it works...
There's more...
6. Exploiting Vulnerabilities
Introduction
Installing and configuring Metasploitable
Getting ready
How to do it...
How it works...
Mastering Armitage, the graphical management tool for Metasploit
Getting ready
How to do it...
See also
Mastering the Metasploit Console (MSFCONSOLE)
Getting ready
How to do it...
There's more...
Mastering the Metasploit CLI (MSFCLI)
Getting ready
How to do it...
How it works...
See also
Mastering Meterpreter
Getting ready
How to do it...
How it works...
There's more...
Metasploitable MySQL
Getting ready
How to do it...
How it works...
There's more...
Metasploitable PostgreSQL
Getting ready
How to do it...
How it works...
There's more...
Metasploitable Tomcat
Getting ready
How to do it...
How it works...
Metasploitable PDF
Getting ready
How to do it...
How it works...
Implementing browser_autopwn
Getting ready
How to do it...
How it works...
7. Escalating Privileges
Introduction
Using impersonation tokens
Getting ready
How to do it...
How it works...
Local privilege escalation attack
Getting ready
How to do it...
How it works...
Mastering the Social Engineering Toolkit (SET)
How to do it...
How it works...
There's more...
Delivering your payload to the victim
Collecting the victim's data
Getting ready
How to do it...
How it works...
There's more...
Cleaning up the tracks
Getting ready
How to do it...
How it works...
Creating a persistent backdoor
Getting ready
How to do it...
How it works...
Man In The Middle (MITM) attack
Getting ready
How to do it...
How it works...
8. Password Attacks
Introduction
Online password attacks
Getting ready
How to do it...
How it works...
Cracking HTTP passwords
Getting ready
How to do it...
Gaining router access
Getting ready
How to do it...
How it works...
There's more...
Types of modules
Password profiling
Getting ready
How to do it...
How it works...
There's more...
Cracking a Windows password using John the Ripper
Getting ready
How to do it...
Using dictionary attacks
Getting ready
How to do it...
How it works...
Using rainbow tables
How to do it...
How it works...
Using nVidia Compute Unified Device Architecture (CUDA)
Getting ready
How to do it...
Using ATI Stream
Getting ready
How to do it...
Physical access attacks
How to do it...
How it works...
9. Wireless Attacks
Introduction
Wireless network WEP cracking
Getting ready
How to do it...
How it works...
Wireless network WPA/WPA2 cracking
Getting ready
How to do it...
How it works...
Automating wireless network cracking
Getting ready
How to do it...
How it works...
Accessing clients using a fake AP
Getting ready
How to do it...
How it works...
URL traffic manipulation
How to do it...
How it works...
Port redirection
How to do it...
How it works...
Sniffing network traffic
Getting ready
How to do it...
How it works...
Index

Kali Linux Cookbook

Kali Linux Cookbook

Copyright © 2013 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: October 2013

Production Reference: 1081013

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78328-959-2

www.packtpub.com

Cover Image by Prashant Timappa Shetty (<[email protected]>)

Credits

Authors

Willie L. Pritchett

David De Smet

Reviewers

Daniel W. Dieterle

Silvio Cesar Roxo Giavaroto

Adriano Gregório

Javier Pérez Quezada

Ahmad Muammar WK

Acquisition Editor

Usha Iyer

Lead Technical Editor

Balaji Naidu

Technical Editors

Proshonjit Mitra

Sonali S. Vernekar

Project Coordinator

Wendell Palmer

Proofreaders

Maria Gould

Paul Hindle

Indexer

Priya Subramani

Production Coordinator

Melwyn D'sa

Cover Work

Melwyn D'sa

About the Authors

Willie L. Pritchett has a Master's in Business Administration. He is a seasoned developer and security enthusiast who has over 20 years of experience in the IT field. He is currently the Chief Executive at Mega Input Data Services, Inc., a full service database management firm specializing in secure, data-driven, application development, and staffing services. He has worked with state and local government agencies as well as helping many small businesses reach their goals through technology. Willie has several industry certifications and currently trains students on various topics including ethical hacking and penetration testing.

I would like to thank my wife Shavon for being by my side and supporting me as I undertook this endeavor. To my children, Sierra and Josiah, for helping me to understand the meaning of quality time. To my parents, Willie and Sarah, I thank you for providing a work ethic and core set of values that guide me through the roughest days. A special thanks to all of my colleagues, associates, and business partners who gave me a chance when I first started in the IT field; through you a vision of business ownership wasn't destroyed, but allowed to flourish. Finally, I would like to thank all of the reviewers and technical consultants who provided exceptional insight and feedback throughout the course of writing this book.

David De Smet has worked in the software industry since 2007 and is the founder and CEO of iSoftDev Co., where he is responsible for many varying tasks, including but not limited to consultant, customer requirements specification analysis, software design, software implementation, software testing, software maintenance, database development, and web design. He is so passionate about what he does that he spends inordinate amounts of time in the software development area. He also has a keen interest in the hacking and network security field and provides network security assessments to several companies.

I would like to extend my thanks to Usha Iyer for giving me the opportunity to get involved in this book, as well as my project coordinator Sai Gamare and the whole team behind the book. I thank my family and especially my girlfriend Paola Janahaní for the support, encouragement, and most importantly the patience while I was working on the book in the middle of the night.

About the Reviewers

Daniel W. Dieterle has over 20 years of IT experience and has provided various levels of IT support to numerous companies from small businesses to large corporations. He enjoys computer security topics, and is an internationally published security author. Daniel regularly covers some of the latest computer security news and topics on his blog Cyberarms.wordpress.com. Daniel can be reached via e-mail at <[email protected]> or @cyberarms on Twitter.

Silvio Cesar Roxo Giavaroto is a professor of Computer Network Security at the University Anhanguera São Paulo in Brazil. He has an MBA in Information Security, and is also a CEH (Certified Ethical Hacker). Silvio is also a maintainer of www.backtrackbrasil.com.br.

Adriano Gregório is fond of operating systems, whether for computers, mobile phones, laptops, and many more. He has been a Unix administrator since 1999, and is always working on various projects involving long networking and databases, and is currently focused on projects of physical security, and logical networks. He is being certified by MCSA and MCT Microsoft.

Javier Pérez Quezada is an I + D Director at Dreamlab Technologies. He is the founder and organizer of the 8.8 Computer Security Conference (www.8dot8.org). His specialties include: web security, penetration testing, ethical hacking, vulnerability assessment, wireless security, security audit source code, secure programming, security consulting, e-banking security, data protection consultancy, consulting ISO / IEC 27001, ITIL, OSSTMM version 3.0, BackTrack 4 and 5, and Kali Linux. He has certifications in: CSSA, CCSK, CEH, OPST, and OPSA. Javier is also an instructor at ISECOM OSSTMM for Latin America (www.isecom.org).

Ahmad Muammar WK is an independent IT security consultant and penetration tester. He has been involved in information security for more than 10 years. He is a founder of ECHO (http://echo.or.id/), one of the oldest Indonesian computer security communities, and also a founder of IDSECCONF (http://idsecconf.org) the biggest annual security conference in Indonesia. Ahmad is well known in the Indonesian computer security community. He also writes articles, security advisories, and publishes research on his blog, http://y3dips.echo.or.id.

www.PacktPub.com

Support files, eBooks, discount offers, and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

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

http://PacktLib.PacktPub.com

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

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

Kali Linux is a Linux-based penetration testing arsenal that aids security professionals in performing assessments in a purely native environment dedicated to hacking. Kali Linux is a distribution based on the Debian GNU/Linux distribution aimed at digital forensics and penetration testing use. It is a successor to the popular BackTrack distribution.

Kali Linux Cookbook provides you with practical recipes featuring many popular tools that cover the basics of a penetration test: information gathering, vulnerability identification, exploitation, privilege escalation, and covering your tracks.

The book begins by covering the installation of Kali Linux and setting up a virtual environment to perform your tests. We then explore recipes involving the basic principles of a penetration test such as information gathering, vulnerability identification, and exploitation. You will learn about privilege escalation, radio network analysis, voice over IP, password cracking, and Kali Linux forensics.

Kali Linux Cookbook will serve as an excellent source of information for the security professional and novice alike. The book offers detailed descriptions and example recipes that allow you to quickly get up to speed on both Kali Linux and its usage in the penetration testing field.

We hope you enjoy reading the book!

What this book covers

Chapter 1, Up and Running with Kali Linux, shows you how to set up Kali Linux in your testing environment and configure Kali Linux to work within your network.

Chapter 2, Customizing Kali Linux, walks you through installing and configuring drivers for some of the popular video and wireless cards.

Chapter 3, Advanced Testing Lab, covers tools that can be used to set up more advanced simulations and test cases.

Chapter 4, Information Gathering, covers tools that can be used during the information gathering phase including Maltego and Nmap.

Chapter 5, Vulnerability Assessment, walks you through the usage of the Nessus and OpenVAS vulnerability scanners.

Chapter 6, Exploiting Vulnerabilities, covers the use of Metasploit through attacks on commonly used services.

Chapter 7, Escalating Privileges, explains the usage of tools such as Ettercap, SET, and Meterpreter.

Chapter 8, Password Attacks, walks you through the use of tools to crack password hashes and user accounts.

Chapter 9, Wireless Attacks, walks you through how to use various tools to exploit the wireless network.

What you need for this book

The recipes presented in this book assume that you have a computer system with enough RAM, hard drive space, and processing power to run a virtualized testing environment. Many of the tools explained will require the use of multiple virtual machines running simultaneously. The virtualization tools presented in Chapter 1, Up and Running with Kali Linux, will run on most operating systems.

Who this book is for

This book is for anyone who desires to come up to speed in using some of the more popular tools inside of the Kali Linux distribution or for use as a reference for seasoned penetration testers. The items discussed in this book are intended to be utilized for ethical purposes only. Attacking or gathering information on a computer network without the owner's consent could lead to prosecution and/or conviction of a crime.

We will not take responsibility for misuse of the information contained within this book. For this reason, we strongly suggest, and provide instructions for, setting up your own testing environment to execute the examples contained within this book.

Conventions

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

Code words in text are shown as follows: "Another command we can use to examine a Windows host is snmpwalk."

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

nmap -sP 216.27.130.162Starting Nmap 5.61TEST4 ( http://nmap.org ) at 2012-04-27 23:30 CDTNmap scan report for test-target.net (216.27.130.162)Host is up (0.00058s latency).Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking on the Next button moves you to the next screen".

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 may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via 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 on 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.

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 would 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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright 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 <[email protected]> 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

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Up and Running with Kali Linux

In this chapter, we will cover:

Installing to a hard disk driveInstalling to a USB drive with persistent memoryInstalling in VirtualBoxInstalling VMware ToolsFixing the splash screenStarting network servicesSetting up the wireless network

Introduction

Kali Linux, or simply Kali, is the newest Linux distribution from Offensive Security. It is the successor to the BackTrack Linux distribution. Unlike most Linux distributions, Kali Linux is used for the purposes of penetration testing. Penetration testing is a way of evaluating the security of a computer system or network by simulating an attack. Throughout this book, we will further explore some of the many tools that Kali Linux has made available.

This chapter covers the installation and setup of Kali Linux in different scenarios, from inserting the Kali Linux DVD to configuring the network.

For all the recipes in this and the following chapters, we will use Kali Linux using GNOME 64-bit as the Window Manager (WM) flavor and architecture (http://www.Kali.org/downloads/). The use of KDE as the WM is not covered in this book; however, you should be able to follow the recipes without much trouble.

Installing to a hard disk drive

The installation to a disk drive is one of the most basic operations. The achievement of this task will let us run Kali Linux without the DVD.

Note

Performing the steps covered in this recipe will erase your hard drive, making Kali Linux the primary operating system on your computer.

Getting ready

Before explaining the procedure, the following requirements need to be met:

A minimum of 8 GB of free disk space for the Kali Linux install (although, we recommend at least 25 GB to hold additional programs and wordlists generated with this book)A minimum of 512MB of RAMYou can download Kali Linux at http://www.kali.org/downloads/

Let's begin with the installation.

How to do it...

Begin by inserting the Kali Linux Live DVD in the optical drive of your computer. You will ultimately come to the Kali Linux Live DVD Boot menu. Choose Graphical install.Choose your language. In this case, we chose English.Choose your location. In this case, we chose United States.Choose your keyboard configuration. In this case, we chose American English.The next section to complete is the network services section. Enter a hostname. In this case, we entered Kali.Next, we have to enter a domain name. In this case, we enter kali.secureworks.com.You will now be presented with the opportunity to choose the password for the root user by entering a password twice.Choose your timezone. In this case, we chose Eastern.We are now able to select our disk partition scheme. You will be presented with four options. Choose Guided - use entire disk, as this allows for easy partitioning.At