How to: Kali Linux in a VIRL topology

    [edit: this guide was originally created using Debian 8.2. while there has not been any major changes that would effect the outcome, the reader should understand that this is just a 'guide'. Adjustments to the installation may be required.]

    [Updated 10/21/2016]

    * added detail to installation steps

    * updated install script to include new repositories and clear old files

     


    Big THANKS to:

    whit-richardson peteadams prsvrnce1


     

    Summary

    This tutorial will show you how to prepare a Debian 8 Linux distribution to run Kali for penetration testing. The link to the Debian Live ISO image may get broken as new releases are published. If that happens to you, just remove the name of the ISO image in the path. This will take you to the parent directory where you can choose the appropriate image. If you are not sure what to remove, then click HERE and look for 'amd64 lxde desktop' image. It should be around 950MB more or less.
    Learn more about Kali Linux HERE and find Kali documentation HERE

    Prerequisites

    1. VIRL installed
    2. Virtualization software such as VMWare, VirtualBox or other
    3. Connection to the internet

    Guide

    • Download Debian Linux debian-live-8.6.0-amd64-lxde-desktop.iso and save it locally.
    • Using the ISO image create a Debian Linux virtual machine.
    • Allocate at least 1vCPU, 512MB RAM (1GB allows for faster install).
    • A minimum of 11GB hard disk is required, but it is recommended to use 15GB or more.
      • Important: When configuring the Debian virtual machine hard disk, uncheck "split into multiple files" under advanced settings. This must be disabled.
    • During the installation of Debian, use this kali_install.txt as a guide
    • Strongly recommend setting LVM option for disk partitioning.
    • Select a network mirror that is in your geographical location for faster package download.
    • Important: Do not install or allow automatic updates.
    • After installation is complete, boot the machine and log in as root using console window of your virtualization platform.

    Installing Kali Packages

    Download the kali-install.sh.txt script and save it to 'Downloads' directory of the 'root' user. Don't forget to remove ".txt" from the file name.

    During installation, you will be prompted for a few settings. Use the kali_install.txt file as a guide, please note that the process has changed recently to account for version updates.
    The whole process can take approximately 60-75 minutes based on your computer configuration and network speed.

    The installation script will force an update and upgrade of the Debian virtual machine. Depending on the current version you have installed, this can take a very long time and you will see a lot of text running in the console. There will be a couple of times where user interaction is required. When the text has stopped scrolling, STOP and read what you see on the screen. You will be asked to acknowledge license terms for different packages, use the 'spacebar' to scroll or press 'q' to ignore; use caution if you choose to ignore! It is safe to take the defaults during this process if prompted, or to answer the prompt based on your requirements.

     

    Important: When prompted for cloud-init data source, only select the one named OpenStack Config Drive. No others should be selected.

    • Power off the machine
    • Identify the location of the Kali .vmdk file.
    • Due to the size of the VM image it is highly recommended that you copy the .vmdk file to your VIRL server using 'sftp'. Copy file to '/home/virl/Downloads' for example. Do not copy to a system directory such as '/var/' '/tmp/' or similar
    • Log into User Workspace Management as 'uwmadmin' and select 'Node Resources' > 'Images'.
    • Click 'Add' and set the fields as shown below. If a field is not mentioned, leave the default setting.
      • Owning project: <default>
      • Subtype: kali
      • Name/Version: (optional)
      • Release: 2016.2 (or appropriate version. There is no right or wrong here, just needs to be set)
      • Source: <File on Server>
        • File on Server = vmdk has been uploaded to the VIRL server, and UWM should look there
        • URL = vmdk is on a file server or similar and is available via http(s)
        • Local Image = vmdk is located on the same system as the UWM web page (not recommended)
      • Image Path: /home/virl/Downloads
    • Press 'Create' and wait! NOTE: This can take 15min. or more.

    Kali_Add_Image.png

    Adding a Kali node to topology

    • From VM Maestro, click File > Preferences
    • Click on 'Node Subtypes' > 'Fetch from Server' > 'Apply' ; then OK to close window
    • Select 'kali' icon from the 'Nodes' palette in VM Maestro.
    • Click to add to your topology.
    • Ensure 'Subtype' is set to 'kali'
    • Select the 'kali' node in your topology and set the 'VM Image' and 'Flavor' by pressing the 'Browse' button for the Node property
    • Set the 'VM Image' to 'kali' (or kali-xxx if you entered a unique name)
    • Set the 'VM Flavor' to 'kali'
    • Press the 'Build initial configurations' to create the configuration for the Kali instance.
    • Start your simulation.
    • The Kali server will take some time to boot initially, so be patient. (subsequent boots will be faster)
    • Connect to your Kali server using either 'ssh' or 'VNC' options.

    Kali_Topo_Properties.png

    Tip: There is no need to create a flavor for Kali or custom subtype. They are already pre-defined in your installation.


    NOTE:
    Connecting via VNC on Linux using VM Maestro appears to be broken. You can work around this by setting the VM Maestro preference for Web Browser to "Use external web browser" under General.