Kali Linux Intrusion and Exploitation Cookbook
上QQ阅读APP看书,第一时间看更新

Installing Kali Linux on a virtual machine

Installing Kali 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 Kali 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 Kali Linux Latest ISO Image, which can be downloaded from https://www.kali.org/downloads/ .

How to do it...

Perform the following steps for this recipe:

  1. Open VMware on your macOS and press command + N, once the same is done we will see something like the following screenshot:
  2. Select Install from disc or image and click on Continue:
  3. Drag and drop the Kali Linux 2.0 ISO, which you have just downloaded, as shown in the following screenshot:
  4. Select Debian 5 64bit and click on Continue, as shown in the following screenshot:
  5. Click on Customize Setting and select the desired location to save your virtual machine:
  6. After saving, VMware opens Debian settings. Open Processors & Memory and increase 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:
  7. Close the window and click on Start and then click inside the window. The cursor control will go to Guest VM. Scroll down and select Graphical install as shown in the following screenshot:
  8. Select your preferred language and click on Continue (we chose English):
  9. Select your country (we chose United States):
  10. Select your keyboard configuration (we selected American English):
  11. Next, we need to configure the basic network services. Enter your preferred hostname (we named it Intrusion-Exploitation):
  12. Next, enter the domain name of your choice (we entered kali.example.com):
  13. The most important step is to enter your root 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):
  14. In the next screen, you select your time zone (we chose Eastern):
  15. Next, you will be shown four options to choose 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:
  16. On the screen, you will be prompted that the entire disk space will be formatted, click on Continue:
  17. Next, you will be shown three options. Since we are only going to use it for penetration testing and not as a server or main desktop operating system, it is safe to select All files in one partition:
  18. You will be shown a summary of changes to be made on your disk. Select Finish Partitioning and write changes to the disk and click on Continue:
  19. Select Yes and click on Continue:
  20. Next, you will be asked to configure your package manager using a network mirror. It allows you to update your Kali tools collection as and when they are available, and, in our case, we selected Yes:
  21. Next, you can enter if you have any proxy server in your network. If not, you can simply skip and click on Continue:
  22. Finally, you will be asked to install GRUB Bootloader to/Dev/SDA- Master Boot Record; select Yes and click on Continue:
  23. Finally, you will be asked to manually enter the device or /dev/sda; select /dev/sda and click on Continue:
  24. 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 Kali Linux ISO and started 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.