Book Image

Kali Linux Intrusion and Exploitation Cookbook

By : Dhruv Shah, Ishan Girdhar
Book Image

Kali Linux Intrusion and Exploitation Cookbook

By: Dhruv Shah, Ishan Girdhar

Overview of this book

With the increasing threats of breaches and attacks on critical infrastructure, system administrators and architects can use Kali Linux 2.0 to ensure their infrastructure is secure by finding out known vulnerabilities and safeguarding their infrastructure against unknown vulnerabilities. This practical cookbook-style guide contains chapters carefully structured in three phases – information gathering, vulnerability assessment, and penetration testing for the web, and wired and wireless networks. It's an ideal reference guide if you’re looking for a solution to a specific problem or learning how to use a tool. We provide hands-on examples of powerful tools/scripts designed for exploitation. In the final section, we cover various tools you can use during testing, and we help you create in-depth reports to impress management. We provide system engineers with steps to reproduce issues and fix them.
Table of Contents (18 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Installing Kali Linux on a virtual machine


Installing Linux on a hard disk is the first step. The process of installing Kali Linux on a physical hard disk or on Virtual Hard Disk is absolutely similar. So, feel free to use the same steps to install Linux on your physical machine. Needless to say that by using this method only Kali Linux 2.0 will be installed on your hard disk as the primary operating system.

Getting ready

Before installing Kali Linux, you will require Linux Latest ISO Image, which can be downloaded from https://www.kali.org/downloads/ .

How to do it...

Perform the steps for recipe:

  1. Open VMware on your macOS and press command + N , once the same is done we will see something like the following screenshot:

  1. Select Install from or image and on Continue:

  1. Drag and the Kali Linux 2.0 ISO, which have just downloaded, as shown in the following screenshot:

  1. Select Debian 5 64bit and on Continue, as shown in the screenshot:

  1. Click on Setting and select the location to save your virtual machine:

  1. After saving, opens Debian settings. Open Processors & Memory and the RAM size to 4 GB (or based on the memory available in your laptop). Remember that Metasploit requires minimum 2GB of RAM to run as a prerequisite:

  1. Close the and click on Start and then inside the window. The cursor control will go to Guest VM. Scroll down and select Graphical install as shown in the following screenshot:

  1. Select your language and on Continue (we chose English):

  1. Select country (we United States):

  1. Select keyboard (we selected American English):

  1. Next, we to configure the network services. Enter your preferred hostname (we named it Intrusion-Exploitation):

  1. Next, enter domain of your choice (we entered kali.example.com):

  1. The most step is to enter your password, and make sure you have a strong password, and that you don't forget it (use a combination of A-Z, a-z, 0-9, and special characters):

  1. In next screen, you select your zone (we chose Eastern):

  1. Next, you will be four options to from; if you have a preferred way of partitioning disk, you can select Manual. However, for easy partitioning, we will be using Guided - Use Entire Disk:

  1. On the screen, you will be prompted that the entire disk space will be formatted, click on Continue:

  1. Next, you will be shown options. Since we are only going to use it for penetration and not as a server or main desktop operating system, it is safe to select All files in one partition:

  1. You will be a summary of to be made on your disk. Select Finish Partitioning and write changes to the disk and click on Continue:

  1. Select Yes click Continue:

  1. Next, you will be asked to configure your manager using a network mirror. It allows you to update your Kali tools collection as and when are available, and, in our case, we selected Yes:

  1. Next, you can enter if you any proxy server in network. If not, you can simply skip and click on Continue:

  1. Finally, you be asked to GRUB Bootloader to/Dev/SDA- Master Boot Record; select Yes and click on Continue:

  1. Finally, you will be asked to enter the device or /dev/sda; select /dev/sda and on Continue:

  1. If you see the preceding screen, it means that you have made it till the end and Kali installation is complete. Congratulations! Click on Continue and your system will be rebooted to bring you fresh installed Kali Linux.

How it works...

In this recipe, we inserted the Linux ISO and the graphical install. During the graphical install, we started configuring with our preferred language, keyboard language, country, and timezone. From step 5 onwards, we entered the hostname for our Kali Linux and in step 6, we entered the domain name for our Kali Linux.

From steps 9 to 13, we configured the hard disk partition to use the entire disk for installation and created one partition for all folders since we will only be using it for penetration testing. Once the installation is finished, step 14 onwards we configured Kali to use network mirrors for faster updates, configured any network proxy (if required) and finally installed GRUB bootloader.