Book Image

Kali Linux Web Penetration Testing Cookbook

By : Gilberto Najera-Gutierrez
Book Image

Kali Linux Web Penetration Testing Cookbook

By: Gilberto Najera-Gutierrez

Overview of this book

Web applications are a huge point of attack for malicious hackers and a critical area for security professionals and penetration testers to lock down and secure. Kali Linux is a Linux-based penetration testing platform and operating system that provides a huge array of testing tools, many of which can be used specifically to execute web penetration testing. This book will teach you, in the form step-by-step recipes, how to detect a wide array of vulnerabilities, exploit them to analyze their consequences, and ultimately buffer attackable surfaces so applications are more secure, for you and your users. Starting from the setup of a testing laboratory, this book will give you the skills you need to cover every stage of a penetration test: from gathering information about the system and the application to identifying vulnerabilities through manual testing and the use of vulnerability scanners to both basic and advanced exploitation techniques that may lead to a full system compromise. Finally, we will put this into the context of OWASP and the top 10 web application vulnerabilities you are most likely to encounter, equipping you with the ability to combat them effectively. By the end of the book, you will have the required skills to identify, exploit, and prevent web application vulnerabilities.
Table of Contents (17 chapters)
Kali Linux Web Penetration Testing Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Updating and upgrading Kali Linux


Before we start testing web applications' security, we need to be sure that we have all the necessary up-to-date tools. This recipe covers the basic task of keeping Kali Linux and its tools at their most recent versions.

Getting ready

We start from having Kali Linux installed as the main operating system on a computer with Internet access; the version that we will be using through this book is 2.0. You can download the live CD and installer from https://www.kali.org/downloads/.

How to do it...

Once you have a working instance of Kali Linux up and running, perform the following steps:

  1. Log in as a root on Kali Linux; the default password is "toor", without the quotes. You can also use su to switch the user or sudo to execute single commands if using a regular user is preferred instead of root.

  2. Open a terminal.

  3. Run the apt-get update command. This will download the updated list of packages (applications and tools) that are available to install.

    apt-get update
    
  4. Once the update is finished, run the following command to update non-system packages to their last stable version:

    apt-get upgrade
    
  5. When asked to continue, press Y and then press Enter.

  6. Next, let's upgrade our system. Type the following command and press Enter:

    apt-get dist-upgrade
    
  7. Now, we have our Kali Linux up-to-date and ready to continue.

How it works...

In this recipe, we have covered a basic procedure for package update in Debian-based systems (such as Kali Linux). The first call to apt-get with the update parameter downloaded the most recent list of packages available for our specific system in the configured repositories. After it downloads and installs all the packages that have the most recent versions in the repository, the dist-upgrade parameter downloads and installs system packages (such as kernel and kernel modules) not installed with upgrade.

Tip

In this book, we assume that Kali Linux is installed as the main operating system on the computer; there is also the option of installing it in a virtual machine. In such a case, skip the recipe called Installing VirtualBox and configure the network options of your Kali VM as stated in Configuring virtual machines for correct communication.

There's more...

There are tools, such as the Metasploit Framework, that have their own update commands; these can be executed after following this recipe. The command is as follows:

msfupdate