Setting up the Kali Linux VM

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Difficulty
Intermediate
Video Transcription
00:00
>> Module 3, Kali Linux Basics.
00:00
Setting up the Kali Linux VM.
00:00
Learning objectives are to understand the types of
00:00
virtual machine software available to run Kali Linux,
00:00
know how to download Kali Linux and run it in VirtualBox,
00:00
and then explain Kali Linux VM best practices.
00:00
Hopefully, if you're watching this course,
00:00
you already have some familiarization
00:00
with virtualization software.
00:00
If you use things like VulnHub,
00:00
what you're going to need to do is
00:00
use something like VirtualBox
00:00
or VMware to load these virtual machines in.
00:00
Virtualization is like inception.
00:00
It's a computer within a computer.
00:00
You have your host operating system,
00:00
whether you have a Mac or you have Windows,
00:00
and then you have a computer within
00:00
that using this virtualization software,
00:00
which is really just a file,
00:00
but is a whole operating system
00:00
contained within your computer.
00:00
For example, people who
00:00
analyze malware will do so in a virtual machine
00:00
because the malware will infect
00:00
the virtual machine but not the host
00:00
operating system or hopefully it won't.
00:00
The software that's available is Oracle's VirtualBox.
00:00
There's also VMware Workstation Player for Windows.
00:00
There's also a pro version,
00:00
so there's VMware Fusion for
00:00
Mac and VMware Workstation Pro for Windows.
00:00
Because I do a lot of virtualization,
00:00
I do pay for the pro version of Fusion and Workstation.
00:00
I started learning on Oracle VirtualBox just because it's
00:00
free and it runs on every platform
00:00
that runs on Windows, Linux,
00:00
and Mac, and
00:00
VMware Workstation Player only
00:00
runs on Windows and Linux,
00:00
VMware Fusion is for Macs.
00:00
What you're going to want to do is
00:00
you're going to want to download
00:00
an ISO file from the Kali download webpage.
00:00
Now, you're not only going to use
00:00
this for these exercises,
00:00
but you'll need these for things like Hack The Box,
00:00
or for VulnHub, or for TryHackMe.
00:00
That's where you'll run your open VPN software
00:00
from and do everything within your virtual machine.
00:00
Most modern computers are 64 bit,
00:00
so you'll want to use the 64 bit version of Kali.
00:00
There still is a 32 bit.
00:00
You'll notice that if you have a Windows OS
00:00
that you need to enable
00:00
virtualization to run the 64 bit VMs.
00:00
Otherwise, you can only run the 32 bit.
00:00
Make sure you look at your bios and you
00:00
ensure that that virtualization is enabled.
00:00
That's the hard way to do it is
00:00
to download this ISO file.
00:00
The easy way to do it is to download custom images for
00:00
VirtualBox and VMware from the Kali Linux website.
00:00
Again, you may need to enable virtualization.
00:00
Google that if you're having issues on how to go through
00:00
the bios or UEFI to
00:00
enable virtualization on your machine.
00:00
You only need two gigabytes of RAM.
00:00
The virtualization software will
00:00
share the memory of your computer.
00:00
The VM is going to be using two gigabytes of RAM,
00:00
and then however many gigabytes
00:00
you have for your host OS,
00:00
it will borrow from that.
00:00
You're also going to need 80 gigabytes of disk space.
00:00
I'm going to walk through how to do this,
00:00
how to download the ISO file, and how to install it.
00:00
Here we are in the Kali Linux Downloads site.
00:00
You can see here is the Kali Linux 64 bit Installer.
00:00
What you want to do is download that as 4.1 gigabytes,
00:00
and that's going to take you some time to download.
00:00
But once you're ready, you're going to click "New".
00:00
You're going to name it
00:00
Kali_Linux and then click "Continue".
00:00
You don't want this to be two gigabytes of RAM,
00:00
so do 2048,
00:00
"Continue", create a virtual hard disk now.
00:00
We're going to want to select VDI,
00:00
VirtualBox disk image dynamically
00:00
allocated for the hard drive.
00:00
We don't want this to be 80 gigabytes.
00:00
Now we're going to want to go into Settings.
00:00
In Advanced, we want to enable
00:00
bidirectional shared clipboard that will allow us
00:00
to put things from our clipboard into and out of our VM,
00:00
as well as drag-and-drop bidirectional so we
00:00
can pull files into and out of the VM.
00:00
For video memory, boost that all the way
00:00
up to 128 megabytes,
00:00
make sure enable 3D acceleration is off.
00:00
Now, we want to make sure in processor we
00:00
enable PAE/NX, click "Okay".
00:00
Now we're going to click "Start".
00:00
You're going to want to
00:00
select the ISO file that you downloaded
00:00
from the Kali Linux website and click "Start".
00:00
When prompted, we want to use the graphical install.
00:00
Now we're installing a whole operating system,
00:00
so this is going to take a while.
00:00
Make sure you have about 50 minutes of
00:00
free time to download this.
00:00
For me, I'm going to make sure my language is English,
00:00
United States for my location,
00:00
American English, that might be different for you.
00:00
I'm going to click out of this warning message.
00:00
Now by default,
00:00
the host name is Kali.
00:00
In this case, let's name it cybrary.
00:00
Don't worry about domain name, just click "Continue".
00:00
For my username, I'm going to use
00:00
my hacker name, Cyberninja.
00:00
It'll ask for it again.
00:00
I'm going to enter my password.
00:00
I'm not going to tell you that one.
00:00
Eastern US, of course,
00:00
this may be different for you.
00:00
I'm going to use Guided: use entire disk,
00:00
SCSE1, all files in one partition,
00:00
finish partitioning and write changes to disk.
00:00
Write the changes to disk,
00:00
I'm going to go yes and click "Continue".
00:00
Now it's going to install the base system.
00:00
This might take a while,
00:00
so I'm going to pause the video.
00:00
For software selection, I'm going to
00:00
use these defaults and click "Continue".
00:00
Again, this is going to take a while,
00:00
so I'm going to pause the video again.
00:00
So install the GRUB bootloader.
00:00
We will make sure we have yes, click "Continue".
00:00
Go down to dev sda, click "Continue".
00:00
Now it's finishing the installation.
00:00
Now we're going to
00:00
click "Continue", installation is complete.
00:00
Now if we're lucky, we should see our Kali VM boot up.
00:00
It's always nice seeing that Kali dragon.
00:00
Our username is going to be what we said
00:00
before, mine was Cyberninja.
00:00
Hopefully you remember your password.
00:00
Now you should be able to resize your window because
00:00
the Guest Edition should be installed
00:00
by default in VirtualBox.
00:00
You can resize your window, you can maximize it.
00:00
But here we are successfully
00:00
installing Kali Linux in VirtualBox.
00:00
That's the more difficult way to do it.
00:00
I'm going to show you the easier way now.
00:00
I'm at the Download Kali Linux Virtual Images.
00:00
These are custom images.
00:00
I want to make sure I go to Kali Linux VirtualBox Images
00:00
, there's also VMware.
00:00
I chose the 64 bit OVA,
00:00
and we'll go back in here to Oracle VirtualBox Manager.
00:00
What we would want to do is import that image.
00:00
I'll import the appliance.
00:00
I'm going to go to the OVA that I downloaded,
00:00
click "Continue" and you'll
00:00
see it already adds all the configuration details here.
00:00
Click "Import", "Agree".
00:00
As opposed to the other install,
00:00
this one takes a lot less time,
00:00
but I'm going to pause the video here.
00:00
Now if we click "Start" here,
00:00
we'll see we get an error.
00:00
Let's read why.
00:00
So implementation of the USB
00:00
2.0 controller was not found.
00:00
If we go into Settings,
00:00
go into Ports,
00:00
and USB, and you can see it's 2.0.
00:00
Let's make that 1.1 and
00:00
let's start this again and see what happens.
00:00
You can see that fixed the error.
00:00
These images have user Kali and
00:00
password Kali as default
00:00
as opposed to the other installation,
00:00
where you got to set your username and password.
00:00
If I enter Kali and Kali,
00:00
we should be able to log in.
00:00
Now we're going to mess with
00:00
virtual machines a lot more,
00:00
so I'm going to save a lot more detail until later.
00:00
But you can see those are basically the two ways
00:00
to install the Kali Linux VM.
00:00
Another good practice is to make a snapshot of your VM.
00:00
This just basically allows you,
00:00
if something happens to your VM,
00:00
to go back in time and go back to that snapshot.
00:00
It does take up some memory,
00:00
so be careful with how many snapshots you make.
00:00
But if you successfully install your Kali VM,
00:00
you might want to go ahead and make a snapshot
00:00
just in case if something breaks later on.
00:00
Some best practices: take frequent snapshots of
00:00
your VM so you can revert it if something happens,
00:00
because this is Linux, you're going to want to update and
00:00
upgrade your VM frequently,
00:00
your Kali VM, decide if you want to use the root user.
00:00
The users that we saw back
00:00
there with Kali and Cyberninja,
00:00
those are non-root users,
00:00
so you have to use sudo a lot to
00:00
do with superuser permissions.
00:00
The older Kali VMs had root by default.
00:00
That's how I have mine configured is just using root.
00:00
It can be riskier because there's a lot more at stake,
00:00
running things as the root user.
00:00
Make sure that Guest Edition is installed.
00:00
It does that by default with the ISO and the OVA file.
00:00
You also want to make sure you set your shell,
00:00
your terminal to infinite scroll.
00:00
I think it sets it at 1,000 by default.
00:00
But a lot of these tools that we'll be running will be
00:00
lines and lines and lines and lines
00:00
and the terminal and will cut off.
00:00
It's always a good idea to set
00:00
your terminal shell to an infinite scroll.
00:00
In summary, we covered understanding
00:00
the types of virtual machine software
00:00
that's available to run Kali Linux.
00:00
Now you should know how to download Kali Linux
00:00
and run it in VirtualBox,
00:00
and we also explained some of
00:00
the Kali Linux best practices.
Up Next
Overview of Tools in Kali Linux
Understanding the Command Line
Who, What, When, Where and How of the Linux Command Line
Windows Command Lab
Command Line Lab