Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kali Linux Web Penetration Testing Cookbook

You're reading from   Kali Linux Web Penetration Testing Cookbook Identify, exploit, and prevent web application vulnerabilities with Kali Linux 2018.x

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781788991513
Length 404 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Gilberto Najera-Gutierrez Gilberto Najera-Gutierrez
Author Profile Icon Gilberto Najera-Gutierrez
Gilberto Najera-Gutierrez
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Setting Up Kali Linux and the Testing Lab FREE CHAPTER 2. Reconnaissance 3. Using Proxies, Crawlers, and Spiders 4. Testing Authentication and Session Management 5. Cross-Site Scripting and Client-Side Attacks 6. Exploiting Injection Vulnerabilities 7. Exploiting Platform Vulnerabilities 8. Using Automated Scanners 9. Bypassing Basic Security Controls 10. Mitigation of OWASP Top 10 Vulnerabilities 11. Other Books You May Enjoy

Creating a Kali Linux virtual machine

Kali is a GNU/Linux distribution built by Offensive Security that is focused on security and penetration testing. It comes with a multitude of tools preinstalled, including the most popular open source tools used by security professionals for reverse engineering, penetration testing, and forensic analysis.

We will use Kali Linux throughout this book as our attacking platform and we will create a virtual machine from scratch and install Kali Linux in it in this recipe.

Getting ready

Kali Linux can be obtained from its official download page https://www.kali.org/downloads/. For this recipe, we will use the 64-bit image (the first option on the page).

How to do it...

The process of creating a virtual machine in VirtualBox is pretty straightforward; let's look at this and perform the following steps:

  1. To create a new virtual machine in VirtualBox, we can use the main menu, Machine | New, or click the New button.
  1. New dialog will pop up; here, we choose a name for our virtual machine, the type, and the version of the operating system:
  1. Next, we are asked about the memory size for this virtual machine. Kali Linux requires a minimum of 1 GB; we will set 2 GB for our virtual machine. This value depends on the resources of your system.
  2. We click Next and get to the hard disk setup. Select Create a virtual hard disk now and click Create for VirtualBox to create a new virtual disk file in our host filesystem:
  1. On the next screen, select these options:
    • Dynamically allocated: This means the disk image for this virtual machine will be growing in size (in fact, it will be adding new virtual disk files) when we add or edit files in the virtual system.
    • For Hard disk file type, pick VDI (VirtualBox Disk Image) and click Next.
    • Next, we need to select where the files will be stored in our host filesystem and the maximum size they will have; this is the storage capacity for the virtual operating system. We leave the default location alone and select a 35.36 GB size. This depends on your base machine's resources, but should be at least 20 GB in order to install the requisite tools. Now, click on Create:
  1. Once the virtual machine is created, select it and click Settings, and then go to Storage and select the CD icon under Controller: IDE. In the Attributes panel, click on the CD icon and select Choose Virtual Optical Disk File and browse to the Kali image downloaded from the official page. Then click OK:
  1. We have created a virtual machine, but we still need to install the operating system. Start the virtual machine and it will boot using the Kali image we configured as the virtual CD/DVD. Use the arrows to select Graphical install and hit Enter:
  1. We are starting the installation process. On the next screens, select the language, keyboard distribution, hostname, and domain for the system.
  1. After that, you will be asked for a Root password; root is the administrative, all-powerful user in Unix-based systems and, in Kali, it is the default login account. Set a password, confirm it, and click Continue:
  1. Next, we need to select the time zone, followed by configuration of the hard disk; we will use guided setup using the entire disk:
  1. Select the disk on which you want to install the system (there should only be one).
  2. The next step is to select the partitioning options; we will use All files in one partition.
  1. Next, we need to confirm the setup by selecting Finish partitioning and write changes to disk and clicking Continue. Then select Yes to write the changes and Continue again on the next screen. This will start the installation process:
  1. When the installation is finished, the installer will ask you to configure the package manager. Answer Yes to Use a network mirror and set up your proxy configuration; leave it blank if you don't use a proxy to connect to the internet.
  2. The final step is to configure the GRUB loader: just answer Yes and, on the next screen, select the hard disk from the list. Then, click Continue and the installation will be complete.
  3. Click Continue in the Installation complete window to restart the VM.
  4. When the VM restarts, it will ask for a username; type root and hit Enter. Then enter the password you set for the root user to log in. Now we have Kali Linux installed.

How it works...

In this recipe, we created our first virtual machine in VirtualBox, set the reserved amount of memory our base operating system will share with it, and created a new virtual hard disk file for the VM to use and set the maximum size. We also configured the VM to start with a CD/DVD image and, from there, installed Kali Linux the same way we would install it on a physical computer.

To install Kali Linux, we used the graphical installer and selected guided disk partitioning, this is, when we install an operating system, especially a Unix-based one, we need to define which parts of the system are installed (or mounted) in which partitions of the hard disk; luckily for us, Kali Linux's installation can take care of that and we only need to select the hard disk and confirm the proposed partitioning. We also configured Kali to use the network repositories for the package manager. This will allow us to install and update software from the internet and keep our system up to date.

There's more...

You have been reading a chapter from
Kali Linux Web Penetration Testing Cookbook - Second Edition
Published in: Aug 2018
Publisher: Packt
ISBN-13: 9781788991513
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image