Lab Session 11 - Preparing Virtual Machine and Kali Linux
Lab Session 11 - Preparing Virtual Machine and Kali Linux
In this lab session you will be guided to set a virtual machine with necessary tools for future
exercises.
Follow the step by step guides to set up a virtual machine on your personal computer.
1. Downloading VMware
download and install a desktop VMware product. VMware Player is available free for personal use
for
Microsoft Windows and Linux operating systems (http://www.vmware.com/products/player/).
VMware also offers VMware Workstation (http://www.vmware.com/products/workstation/) for
Windows and Linux. Do not use VMware workstation because it is not for free; you can only use for
free for 30 days.
Make sure you download the version of VMware that matches your operating system and
architecture (32- or 64-bit). If you are using windows operating system with 64-bit processor then
download the 64-bit windows version of the software.
The following screenshot shows the main page of VMware website. The ‘Download Now’ (circled in
red) button will take you to a new page, as in the in Figure 1.1 below.
Figure 1.1
Next, you should see a page like in Figure 1.2 below. You might need to scroll down the page to see
the download link. The ‘GO TO DOWNLOADS’ (circled in red) link will take to a page to download the
software.
Figure 1.2
From the new page (as in Figure 1.3below) click on the ‘DOWNLAOD NOW’ button (circled in read).
Figure 1.3
You should get a prompt to save the executable file somewhere on your computer. Save the
installation file in a suitable location on your personal computer.
2. Installing VMware
The following screenshots show you the process of the installing VMware player on windows
operating system.
When you first execute the downloaded executable file, you should see a screen like in Figure 2.1.
Click ‘Next’ to proceed.
Figure 2.1
Then, accept the terms and condition by ticking the checkbox, as shown in Figure 2.2 below.
Figure 2.2
Make sure you tick the ‘Add VMware workstation console tools into system PATH’. This is will help
your operating system to recognise the software when it is used by the user.
Figure 2.3
Next, you can optionally add shortcut to your Desktop and start menu by ticking the checkboxes. A
window like the one in Figure 2.4 should be presented to you. After clicking on the ‘Next’ button, the
final window to install the system should appear.
Figure 2.4
Finally, click on the ‘Install’ button to install the software, as shown in Figure 2.5
Figure 2.5
The Figure 2.6 below image shows the expected installation process.
Figure 2.6
Click ‘Finish’ button to complete the installation process.
Figure 2.7
Since a new system is added to the windows operating system environment, you are likely to be
asked to restart your system. It is recommended to do so for the effect to take place.
Figure 2.8
Now you can proceed to install Kali linux.
Kali Linux is a Debian-based Linux distribution that comes with a wide variety of preinstalled security
tools that we’ll use in this module. As time passes, newer versions of Kali will be released. If you
would like, feel free to download the latest version of Kali Linux from http://www.kali.org/. Keep in
mind, though, that many of the tools we’ll use in this module are in active development, so if you
use a newer version of Kali, some of the exercises may differ from the walkthroughs in this module.
If you prefer everything to work as written, I recommend using the version of Kali kali-linux-2020.4-
vmware-i386 (32-bit version) or kali-linux-2020.4-vmware-amd64 (64-bit version)), which is a
prebuilt VMware image compressed with 7-Zip. Download the correct version for your windows
operating system from https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-
download/
Note: You can find 7-Zip programs for Windows and Linux platforms at
http://www.7-zip.org/download.html . For Mac users, I recommend Ez7z from
http://ez7z.en.softonic.com/mac/.
1. Once the 7-Zip archive is decompressed, in VMware click on ‘Open a Virtual Machine’ link, as
shown in Figure 3.1 and direct it to the Kali Linux VMware in the decompressed Kali Linux
folder.
Figure 3.1
Once the virtual machine opens, click the Play virtual machine button. As shown in Figure
3.2
Figure 3.2
When prompted as shown in Figure 3.3, choose I copied it.
Figure 3.3
Once Kali Linux boots, you will be presented with a login screen like the one shown in Figure 3.4.
Figure 3.4
6. You will be presented with a screen like the one shown in Figure 3.5.
Figure 3.5
By default, the Kali Linux virtual machine network adapter is set to NAT. Here’s how to change that
option on both Windows and Mac OS.
On the next screen, choose Network Adapter in the Hardware tab and choose the Bridged option in
the Network connection section, as shown in Figure 5.2.
Figure 5.2
Now click the Configure Adapters button and check the network adapter that you’re using with your
host operating system. As you can see in Figure 5.3, I’ve selected only the Realtek wireless adapter.
Once you’ve made your selection, press OK.
Figure 5.3
VMware Fusion on Mac OS. To change the virtual network connection in VMware Fusion, go to
Virtual Machine>Network Adapter and change from NAT to Bridged,
(kali㉿kali)-[~]
└─$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.29 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fe73:982c prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:73:98:2c txqueuelen 1000 (Ethernet)
RX packets 48 bytes 8396 (8.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 35 bytes 4178 (4.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The IPv4 address for this virtual machine is 192.168.20.9, as highlighted in bold in Listing 1. (The IP
address for your machine will likely differ.)
If you do not receive a response, make sure that you have set your network adapter to Bridged, that
Kali Linux has an IP address, and, of course, that your host system currently has Internet access.
6. Installing Nessus
Although Kali Linux has just about every tool we’ll need, we do need to install a few additional
programs. First, we’ll install Tenable Security’s Nessus Home vulnerability scanner. This scanner is
free for home use only (you’ll see a description of limitations on the Nessus website). Note that
Nessus is very actively developed, so the current version as well as its GUI may have changed a bit
since this book went to press.
Use the following steps to install Nessus Home from within Kali:
1. Open ApplicationsInternetFirefox ESR and enter http://www.tenable.com/products/nessus-
home/ in the address bar. Complete the Register for an Activation Code information and click
Register. (Use a real email address—you’ll need the activation code later.)
2. Once you reach the Downloads page, choose the latest version of Nessus for the Linux Debian 32-bit
platform (Nessus-5.2.5-debian6_i386.deb as of this writing) and download it to your root directory (the
default download location).
3. Open a Linux terminal (click the terminal icon at the top of the Kali screen) to open a root prompt.
4. Enter ls to see a list of the files in your root directory. You should see the Nessus file that you just
downloaded.
5. Enter sudo dpkg -i followed by the name of the file you downloaded (you can type the first letter of the
filename and press tab to use tab completion) and press enter to begin the install process. Installation may
take a while as Nessus processes various plugins. Progress is shown by a line of hash symbols (#).
(Reading database ... 262025 files and directories currently installed.)
Preparing to unpack Nessus-8.13.1-debian6_amd64.deb ...
Unpacking nessus (8.13.1) over (8.13.1) ...
Setting up nessus (8.13.1) ...
Unpacking Nessus Scanner Core Components...
6. Once you’re returned to the root prompt with no errors, Nessus should be installed, and you might be
presented with a message like this.
All plugins loaded
Fetching the newest plugins from nessus.org...
Fetching the newest updates from nessus.org...
Done. The Nessus server will start processing these plugins within a
minute
…
8. Open the URL https://kali:8834/ in the web browser. You should see a SSL certificate warning, similar
to that in the figure below.
9. Expand I Understand the Risks and click Add Exception. Then click Confirm Security Exception,
as shown
10. Click Get Started at the bottom left of the opening Nessus page and enter a username and password on
the following page. Remember the username and password because we’ll need them later.
11. At the next page, enter the activation code you received via email from Tenable Security.
12. Once registered with Tenable Security, choose the option to download plugins (downloading will take
some time). Once Nessus processes the plugins, it will initialize.
Accessing Nessus
When Nessus finishes downloading plugins and configuring the software, you should see the Nessus login
screen, as shown below. You should be able to use the credentials for the account you created during setup to
log in.
Click Nessus Essentials of the opening Nessus page. At the next page, enter the activation code you
received via email from Tenable Security. You should see the Nessus login screen. You should be able
to use the credentials for the account you created during setup to log in. Choose the option to
download plugins (downloading will take some time). Once Nessus processes the plugins, it will
initialize.
When Nessus finishes downloading plugins and configuring the software, you should see the Nessus
login screen. You should be able to use the credentials for the account you created during setup to
log in.
To close Nessus, just close its tab in the browser.