"

12 Create a Kali Linux VM

Dante Rocca

Kali Linux is the distribution of choice for attacking a network thanks to the many attack tools it comes bundled with.  This lab provides instructions for making a Kali Linux VM.

Learning Objectives

  • Successfully download, install, and run Kali Linux in a GNS3 environment

Prerequisites

Deliverables

  • None – this is a preparatory lab that supports other labs in this book

Resources

Contributors and Testers

  • Mathew J. Heath Van Horn, PhD, ERAU-Prescott

Phase I – Download and Installation

We will download and install the Kali Linux virtual machine (VM). We will use the .iso image instead of the prebuilt VM. Generally, the pre-made VM works fine; however, a few testers experienced issues. When we used the .iso the configuration and compatibility problems resolved themselves.

  1. Start by downloading the recommended image file here

    IMPORTANT: Ensure you download the Installer Image, not the Virtual Machine image.

  2. Select the 64-bit installer image and click the download method you prefer
  3. Once the image file has been downloaded, open VirtualBox
  4. Click on the new button
    Picture of Commands
    Figure 1 – Create a new VM
    1. Give the new VM a name
    2. Select the folder you want to save the VM
    3. Select the ISO image you downloaded earlier
    4. Select next
      Picture of Commands
      Figure 2 – Create a new Kali VM
  5. Leave the defaults for the hardware
    Picture of Commands
    Figure 3 – Set resources for Kali VM
  6. Use the defaults for the virtual disk space*

    NOTE: If you are using this Kali VM for the attack labs, you will want to expand the disk size to at least 50.00GB

    Picture of Commands
    Figure 4 – Set disk space for Kali VM
  7. Verify the settings and click on finish
    Picture of Commands
    Figure 5 – Verify settings for new Kali VM
  8. Start the Kali VM
  9. Hit enter over the graphical install
    Picture of Commands
    Figure 6 – Start Kali VM
  10. Select your language and hit continue
    Picture of Commands
    Figure 7 – Set language
  11. Select your region and hit continue
    Picture of Commands
    Figure 8 – Set region
  12. Select your keyboard layout and click continue
    Picture of Commands
    Figure 9 – Set keyboard layout
  13. Leave the hostname as default and click continue
    Picture of Commands
    Figure 10 – Set the host name as default
  14. Then leave the domain blank and click continue
    Picture of Commands
    Figure 11 – Leave domain blank
  15. Give the full name as “student” and click continue
    Picture of Commands
    Figure 12 – Set the username to student
  16. Then leave the account name as “student” and click continue

    Picture of Commands
    Figure 13 – Set the account name to student
  17. Like other VMs use the password Security1 and click continue 
    Picture of Commands
    Figure 14 – Set password
  18. Select your time zone and click continue

    Picture of Commands
    Figure 15 – Select time zone
  19. Partition Disk
    1. Select option guided – use entire disk and press continue

      Picture of Commands
      Figure 16 – Use the entire disk
    2. Leave the disk partition as the default and click continue

      Picture of Commands
      Figure 17 – Use default disk partition
    3. Select – All files in one partition and click continue 
      Picture of Commands
      Figure 18 – Use all files in one partition
    4. Verify your partition information and click continue

      Picture of Commands
      Figure 19 – Verify settings and continue
  20. Once the software selection screen pops up, leave the defaults and click continue

    Picture of Commands
    Figure 20 – Software selection is the default
  21. Once the install GRUB boot loader screen pops up, leave the default yes radio button and click continue 
    Picture of Commands
    Figure 21 – GRUB loader
  22. On the next screen, select the device; there should be only one, and click continue 
    Picture of Commands
    Figure 22 – Select the device
  23. Once this is done, click continue one last time
  24. Finish the installation by clicking continue
    Picture of Commands
    Figure 23 – Finish the installation
  25. Once the login screen pops up, login to make sure everything works

Phase II – Necessary Software

While Kali comes with a large toolset, there are two tools that we will need later and do not come preinstalled.

  1. Open the terminal and run this command to install rainbow crack

    sudo apt-get install rainbowcrack

  2. Once the installation completes, close the terminal and open Firefox
  3. In Firefox, go to this link to download Nessus Essentials for Education. Click on try now 
    Picture of Commands
    Figure 24 – Install Nessus
  4. You will need to provide a business email, but none of our testers have reported spam from this
  5. Click the download button that appears. Then leave the defaults on the next screen and click download. At the time of writing, the version of Nessus is 10.7.1
  6. Open the folder where you downloaded the file. Right-click inside the folder and click Open Terminal Here
    Picture of Commands
    Figure 25 – Open the download folder
  7. Use the following command to install the Nessus Package

    NOTE: Adjust the filename to reflect the current file name you just downloaded

    sudo dpkg -i Nessus-10.7.1-ubuntu1404_amd64.deb

  8. Use the following command to start the Nessus Scanner. While we won’t do much with it right now, we will need to input the activation code from our email

    /bin/systemctl start nessusd.service

  9. In the window that pops up, enter the user password. Following that, reopen Firefox and go to this link

    https://kali:8834

  10. The page will tell you that it is insecure. Click advanced and then Accept the risk and continue 
    Picture of Commands
    Figure 26 – Using Firefox to navigate Nessus
  11. Click continue on the first screen
    Picture of Commands
    Figure 27 – Continue
  12. Select the Register for Nessus Essentials radio button
    Picture of Commands
    Figure 28 – Register
  13. And click continue. If you have already received the email earlier, then click skip

    Picture of Commands
    Figure 29 – Skip if you already have the code
  14. Input the activation code from your email and click continue 
    Picture of Commands
    Figure 30 – Input the activation code
  15. Make a username and password for your account and select submit
    Picture of Commands
    Figure 31 – Create username and password

     

    Sleeping 0
    Figure 32 – This could take a while
  16. Nessus will take a while to download and compile plugins, so wait for this process to complete before switching the machine off

 

End of Lab
Feedback email
Figure 00 – Contact us via prmaster@erau.edu

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Mastering Enterprise Networks 2e Copyright © 2024 by Mathew J. Heath Van Horn is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.