Kali Linux Wireless Penetration Testing Essentials
上QQ阅读APP看书,第一时间看更新

Installing Kali Linux

There are three methods to install Kali Linux, on the hard disk (on the single boot or multiboot), on a USB thumb drive to use it as a live system, or on a virtual machine using software such as Oracle VirtualBox and VMware Workstation or Player.

The installation requires at least 10 GB of hard disk space and at least 1,024 MB of RAM is recommended, although Kali Linux can run over only 512 MB of RAM.

Installing Kali Linux on the hard drive is better regarding the performances but it has the drawback of dedicating all the hard disk space to it or partitioning the hard drive and using a partition to install it, while the installation on a virtual machine provides us a lightly slower system but also much more flexibility and we don't have to modify the configuration of the hard disk.

We can either install Kali Linux on a virtual machine with the downloadable ISO or directly use the VMware or VirtualBox prebuilt images. The 32 or 64 bits ISOs can be downloaded from https://www.kali.org/downloads/, and the VMware and VirtualBox images can be downloaded from https://www.offensive-security.com/kali-linux-vmware-arm-image-download/. It is interesting to notice that Kali Linux can also be installed on ARM devices, such as the Raspberry Pi and similar.

The rest of this chapter is concerned with the installation and configuration of Kali Linux on a virtual machine, a process that is very similar to installing it on the hard disk directly.

Installation on a virtual machine

To create a new virtual machine and install Kali Linux on it, we need to use the virtualization software.

In this book, we will use Oracle VirtualBox, which is a free and open source virtualization software available for various platforms, such as Windows, Linux, Mac OS X, and Solaris. To download and get information on how to install it, take a look at the references in the Appendix, References.

Creating a new virtual machine

To create a new virtual machine (VM), follow these steps:

  1. Click on the New button on the toolbar menu and the wizard will start. We assign the VM a name and select the operating system type and version, which, in our case, are Linux and Debian respectively (the architecture, 32 or 64 bit, depends on your machine):

    Creating a new virtual machine

  2. We assign the amount of RAM dedicated to the VM; here the recommended size is 512 MB but for our purposes at least 1,024 MB would be a better choice:

    Creating a new virtual machine

  3. Then, we have to create a new virtual hard disk for our installation:

    Creating a new virtual machine

  4. We choose VDI (VirtualBox Disk Image) as the virtual disk format:

    Creating a new virtual machine

  5. We select the Dynamically allocated option, which only uses the space on the physical drive as the virtual disk file grows, up to the fixed maximum size:

    Creating a new virtual machine

  6. We set up the virtual disk file location and the maximum size; then we click on the Create button and the VM is ready!

    Creating a new virtual machine

Installation steps

At this point, the virtual machine is created and we are ready to install the Kali Linux operating system on it. To do so, we follow the subsequent steps:

  1. We select the newly created Kali Linux VM in the left pane of the Oracle VM VirtualBox Manager, and next, we click on Settings on the toolbar menu and then on Storage. We select the Controller: IDE entry associated with the CD/DVD Drive field, and in the Attributes section, we choose the Kali Linux ISO on the hard drive. This is analogous to inserting a Kali Linux installation DVD in the physical drive when installing it on the hard disk directly, so that the machine can boot from it:

    Installation steps

  2. Now, we start the VM clicking on the Start button on the toolbar menu. The VM boots from the ISO and the installation boot menu is shown in the following screenshot:

    Installation steps

  3. We follow the steps of the installation wizard, selecting in succession the language (default is English), the country, the locale setting, the keyboard layout, the hostname, and the domain name. Then, we need to set up the password of the root account. Root is the default and the most privileged account in the system, which has the full administrative rights:

    Installation steps

  4. We select the time zone and then we need to choose the disk partitioning method. We can choose the guided methods (using three different schemes) or the manual one if we desire to partition the disk. In our case, we are going to select the first method and use the entire virtual disk associated with the VM:

    Installation steps

  5. Then, the installer asks which disk to use for installing the system (in our case, it is unique), and in the following window, whether we want to use a single partition or create separate partitions for different mount points (for example, /home, /usr/local, /opt, and so on):

    Installation steps

  6. The installer creates the root (/) and the swap partitions and asks to confirm it, writing the changes on the virtual disk:

    Installation steps

  7. After all the data is copied to the disk, the installer asks whether we want to use a network mirror to install the software that is not included in the installation ISO or to update the installed software. Then, we need to choose whether or not to install the GRUB boot loader on the Master Boot Record (MBR) of the virtual disk. We are going to install it:

    Installation steps

  8. One step more and the installation is complete. Now we have a brand new Kali Linux system on our VM! We can restart the VM to boot it up, after having removed the installation ISO from the virtual CD/DVD drive:

    Installation steps