In this video, we will take a look at setting up vulnerable
host machines with an allow environment.
So let's Dive In
So I hope you excited and let's Dive In.
Firstly let us download metasloitable 2 the cool
thing is the creators of my display tool 2, which is
a rapid 7 the app already created a virtual image
for us. So you can simply switch my display
table 2 like so
and we can scroll down just a little bit and we
can use this Source Forge link simply click it.
then click on download latest version like
so
and download will begin within a
few seconds.
The download will actually be is a folder.
However, prior to this video I have downloaded
the virtual image already. So I already have
this full sieve on my desktop. Let's
take a look at it.
So as you can see, I already have the metasploitable to
Lennox 2.0.0 folder
downloaded and this is actually downloaded from
sourceforge.
The thing about it is that it simply
is a folder. So let's extract the contents.
You can right click and you can use the Ability on
zipping application within windows so
we can right click and select extract all
simply uncheck this box that says
show extracted files when completed and I click
on a shock this through such should take a few seconds to
complete.
Once it's completed, we now have the extracted
contents here. Let's take a look to see what files
exist inside this Fuller.
So there's a number files exists. Let's go back.
And I'm going to copy this folder.
I'm going to head over to the directory. I have all my virtuals
machine stored.
Which is in my D drive and inside
of virtualbox VM?
And I'm going to piece it right inside here.
like so
Let's go inside this hole to see that
all the files are there. Yes. All is there.
So now the files are presented here. Let's open virtualbox
once more.
This time we'll have to create a virtualbox.
Or cut this time. We'll have to
create a virtual machine and simply add
the virtual hard drive onto the machine.
To do so. Let's click on new.
And when you click on you your interface might
look like this I highly recommend to click on exploit mode
to Simply get the additional features.
For this virtual machine, let's call it metasploitable.
To like so VM and we
can change a type to Lennox.
Change the version to other Linux 64-bit.
Because this virtual machine does not require too much memory to run
we can scale down the memory to 512.
So therefore we can conserve the amount of available Ram
with no who's computer.
simply click on create
once you click on create you now have the option
to choose cut.
Next instead of we create a new virtual hard drive.
Let us use the option to actually add
an existing virtual machine.
simply select it to adoption click on this
full icon like so
click on ADD
and now we can navigate to where we have stored
or virtual machine.
Once we go within a folder, we'll see there's
one file simply click on open.
Now it will be loaded within
this new window.
Simply select the right file that we will choose.
Then click on choose.
And click on create.
Next we'll need to actually make some minor adjustments
to the virtual machine environment before we pull it
on.
simply click on General cut
simply click on settings like so
we can click on system.
We can uncheck floppy. We can
also uncheck Optical.
Let's click on CPU or processor.
And show it is set one CPU.
Simply click on storage and we'll
see the virtualbox image file or the
virtualbox virtual hard drive is actually selected here.
Let's click on network. And we
want to ensure adapter one is enable while all
the other adapters is this evil?
or an adapter one simply use a
drop-down click on
internal Network
Change its name.
to pen test net like so
you may use a drop-down, but if you don't see the name
of the network, simply delete the existing network name
and type it in manually next click
on advanced.
simply change a promiscuous mode to allow all
and simply click on OK
Now let's power on this spiritual machine to determine
what it is receiving an IP address with an
au pen test net Virtual Lab environment.
Let's click on start.
And which are few seconds. This will machine will
be booted.
So now the virtual machine is booted simply click inside
a window and we can log in using the
default credentials are shown on the screen,
which is msf. Admin as a
username and msf. Admin as
a password.
to determine the IP address on a social machine we
can use the if command like so and it
enter
I'm currently we can see this virtual machine is receiving an
IP address from a pentesonet virtual
Network in other words all virtual DHCP
server.
So great.
Everything seems to be connected and we
can find so far. Let us shot on this virtual machine we
can type sudo.
shutdown and hit enter
simply enter the password for the username,
which is msf. Admin.
And this seems to not be working.
Let's try this one more time sudo.
Shut down.
Okay, so this command is looking let's
try hold sudo halt.
And there we go. The virtual machine is shutting down.
Okay, great. So no matters floatable 2
is within all pen test net lab Network.
Now. We need to create metasploitable tree
and minnesotal tree actually has two versions the
windows version and the long solution.
We will place the windows Vision within the
penthouse net lab environment but to do so, we
actually need to install.
A pre-requirement with no Windows operating
system and this pre-requirement. It is
called vagrant.
To download the foreground application. Let's head over
back to Google.
and search for vagrant
up like so
the first link is wagon by hashiko. Let's click
that link.
Now on the right hand side, we can see that there's a
download button simply click on downloads.
Next select your operating system. I'm using
Windows. So I'm selecting windows.
And I will use the latest version.
The version that I'm going to download, it's a AMD 64-bit
version. I'm going to click on download like so
Save the file.
And I'm going to place this file within my
downloads folder.
And within my folder that
I'm using to create this course.
The download should be completed within a few seconds depending on
your bonnet.
Next I'm going to head over back to my downloads folder.
And here I can see the latest version of vagrant is
available on my computer.
To install this latest version simply double click
on it and let the wizard installation begin.
simply click on next
accept the license agreement like so
click on next next one small uninstall
the installation process should take a few seconds to
complete.
Or perhaps a few minutes depending on the
amount of Hardware resources needed
to actually perform this installation.
All right, great. So the installation is completed simply
click on finish and now you'll have to restart your
computer.
So I'm going to stop the video here temporarily and
restart my computer to ensure all the changes
have taken place. So I'll check you guys back within
a few seconds.
Sonorad vagrant is installed. Let's open our
Command Prompt simply click the windows icon search
CMD and select
the command prompt application.
Once the command prompt is open we can
use this first command to Simply allow
us to install a vagrant reload plugin.
Simply enter the command as it is wagon plugin
install fire and dash reload hit enter
and this should take a few seconds to
Pops a minute or two to actually download and install
the vagrant login onto your system.
Now the plugin is installed. We need to install one additional plugin.
This one is a vagrant plugin
install foreign VB guest, press enter
an as always. It will take a few seconds to
perhaps a few minutes to complete.
Great. So now board plugins are
downloaded are installed automatically on vagrant next
we'll need to add the metasploitable tree
Windows sewer 2008 version on
to our system using vagrant to
do this. We will use the command fogger unbox
odd rapid slash metasploitable
tree dash win two
key eat like so
Once we do this, it will be added onto our
system and next we'll get a message
asking us. Hey, which platform Do
you want to build a spiritual machine for so since we're
using virtualbox, we can simply
select option one like so
Now it is downloaded the image from the internet and this
should take a few minutes to complete. So I'm gonna
pause the video on once this is completed. We'll proceed photo.
Okay, so after a few moments, which
is a lot of minutes it actually finish completed
downloading.
So the next step is we need to go into
Windows Explorer like so
let's head over to the C drive.
Then we'll go into users select your
user folder and my situation.
It's actually my name.
Here we'll go into the dot vagrant.d
file or the full
itself.
Next we'll go into boxes and Witten
boxes. This is the folder with
a contents that we just downloaded.
We will need to rename the solo. So simply rename
it through metasploitable tree -
win 2K8 like so
Once we rename this folder, let's head over back
to our Command Prompt.
So on our Command Prompt we can change our working
directory to dot vagrant like so
and use a subdirectory of boxes.
Next we can do vagrant.
in it
and metasploitable tree -
2 key it like so.
Hit enter and this should take a few
minutes to actually build a virtual machine.
actually
It seemed to have created a vagrone file. So excellent to
to build a virtual machine.
And place it in virtualbox. We need to use a vagrant
up command like so
and this one will actually take a few minutes to complete.
Okay, great. So now the build is complete and let's check our
virtualbox application. I can
see that there's a new virtual machine as automatically automatically created
and it's currently in a running state.
Select double click on it to actually access the
user interface.
And we need to do control all delete to do
this simply click on input keyboards keyboard
on then select insert control
all delete. We can log into either
the administrator account or the
vagrant account both the username. Actually
the passwords are the same for both
of these accounts. So whether you are logging in
into the administrator account or the wagon account,
the password is vagrant in lowercase.
Once you are logged in simply click on the console
button to cancel the Windows activation.
And now the desktop interface loots
let's shut down this operating system
because we need to make some minor adjustments
to ensure. This virtual machine is connected
to boot our pen testnet
on our head Network.
Great. So this virtual machine is powered on.
Let's select the virtual machine click on settings.
And firstly let's ensure that we rename our
virtual machine.
So I'm going to change the name from boxes default to
metasploitable.
Three like so and I'm
gonna specify when VM so I will know this
is a Windows Virtual Machine version of the
metasploitable tree.
Next on system you can increase or decrease the
memory that is all located to this visual machine, but we
can leave it as default on the CPU.
We can leave the CPUs default as well.
Display memory you want to ensure the video memory
is within the green zone.
next you want to ensure the graphics controller is used
in vbox svge like so
next click on Netflix and change
adapter one to internal Network.
if there's an internal Network configure the already simply delete
it and specify pen test net
like so
Next expand advanced settings
and change a promo skill smooth to allow
all ensure. The key
will is connected.
next click on adapter to
enable adapter to
change our thoughts to to internal Network and
ensure it is set to hit net. Lastly click
on promiscuous mode and
set it to our lower wall. Once you're finished click on
OK
Finally, let's power on our virtual
machine once more to ensure that metasploitable tree.
The windows vision is connected
to both or pen. Test Network on our
head Network.
Great. So the virtual machine is powered on
let's click on input keyboard insert
control all delete.
As I mentioned previously you can log into either accounts
because the password is the same which is vagrant and
lowercase.
simply click on console
and let us click on the command
prompt and let's verify that we have two network
adapters presented and ensuring that we
are getting IP addresses on the two different dates V servers.
So let's type ip config like so
And here we can see network adapter one.
We are getting an IP address on the 172
tt1.092 and
for adapter 2 which is connected to the hidden network.
We are getting an IP address on the 10
11 12.0 Network. So excellent.
This virtual machine is configured correctly for
our lab environment. Let's shut down this
virtual machine gracefully. We can select any of these
options.
and finally
Let us create a snapshot.
We can simply create a snapshot to ensure that everything
is we can find and if anything should
go wrong we can simply restore all
virtual machine to this point in time.
Alright great. So now we have a snapshot created. However,
we need to do one additional
thing.
Because all virtual machine is existed within
our vagran that the slash
boxes folder. Let's move this virtual
machine. So I'm going to cut this entire folder.
That I'm going to head over to my D drive into my
virtualbox VM folder and place it
where all my virtual machines live.
Because I'm moving this entire virtual machine files.
If I decide a power on this virtual
machine on virtualbox, it will not work
simply because of virtual hard drive is moved
to fix this problem. Let's click on settings.
storage
click on a virtual this file like so then
click on this hard drive
icon.
choose
choose a dis file.
Next let us navigate to where we have stored all
virtual machine.
So this PC d Drive?
bushel box VM
and here I can simply select metasploitable tree
win two key inside a
weekly fuller side of virtualbox and here
I have the virtual disk file
simply click on OK
And as always for good practice, let's pour
on our virtual machine one last time to ensure it is
working perfectly.
And so far all virtual machine is booting.
So great.
So at this point we have metasploitable tree
Windows vision and metasploitable 2
located in all pen. Test Network.
Next let us set up the metasploitable tree the
Lennox Vision, but the last version will be
pleased within the hit Network to do this. We can
head over back to our Command Prompt.
like so
and we can simply type CD
dot dot a few times.
To go back to our main working directory like
so and this time since we already have
some of the commands that were already executed I
can simply use up button a
few times and just make a minor change this
time. We're going to add the metastasloidable tree.
ubon 2 14 0 4
Fusion like so
great. Now we will use option one
for virtualbox like so and this will take
a few minutes to download. So I'm gonna pause the video until this
is completed.
So now the download is complete we can proceed filter.
Let's head over back to our File Explorer.
And this time we're going to head back to our previous
directory.
So we're gonna click on this PC.
C drive users
select your profile or your profile with the
folder?
and select
vagrant.d
Then we're gonna select boxes and here
we can see the new file is downloaded within
this folder. Once again, we just have to rename the
solar to be metasploitable tree
- u b 1404 great.
Once we do this, we then need to delete this
file inside here, which is the vagrant file.
Simply because the configurations on this background file is
applicable to the previous version of metasploy that
we set up which is the windows version. So simply click on delete
and there you go. It's deleted.
Next unlike the process that
we use previously to build a Windows version of metasoice
all tree with the loud
solution. It is a little bit complicated and sometimes things
don't work as expected. However, what we can
do this time is we can simply copy.
this entire folder
and place it in the directory where all
of our virtual machines actually live.
So I can go into my D drive virtualbox VMS.
And simply piece it in this directory.
The reason being is if I go into metasploitable
tree ub1404 folder into
the weekly build.
There's already a virtual hard disk and this
which will hard disk could be open with virtualbox. So
as a simple shortcut we can
right click on the box file simply
select open with and select
the option for virtualbox manager like
so
now will be able to actually import this
virtual machine into our computer. Well
individual box particularly.
So therefore we can simply click on import like so
alright great. So the import process is completed.
Let's do a couple of things. Let's click on settings.
Let's change the name of this virtual machine
to
my display table
and let's type locks. So we'll know that this
is a Linux vision of metasputabletree.
Next let's click on system and we can reduce
some motor system memory that is a lucky to switch
on machine. Let's use 2048 which
will be equivalent to two gigs of RAM.
The CPU we can leave a CPUs default
display. We want to ensure that display
memory is within the green zone.
next let us change to vbox
SVG like so
and we are still getting one problem. Okay. So this
time we actually have to check the error message. You see what
is the recommended Graphics controller to use which is
VM SVG.
All right, great. So now the error has disappeared. Lastly. Let's
click on network and change the
adapter to internal host.
and change the name to hidden network
or hidden that as soon on the screen and lastly set
promiscuous move to allow all
and show all the other network adapters adopted to three and
four are all the siebel and click on OK.
Now we are getting an error here. It says feel to
save the settings. Okay, let's click on Okie and
this I'm let us pull on
the virtual machine to see if it's working properly.
What is powered on we can then save it and then
three attempt to actually change the network configurations?
So currently it's booting excellent
We'll wait for the boot and then we will reattempt cut.
Once it's booted we will reattempt to actually change
the network configurations.
So the username is administrator and
the password is far Grant like so
Okay, so let's try vagrant instead as a username.
And try vagrant as the
password.
Alright, so now that we are logged in into the virtual machine.
Let's shot machine. Let's use sudo and let's
type shutdown.
And this one's not working. So let's do sudo on
hold instead.
So great. The virtual machine is going to be powered on.
Alright, so one more time let us attempt to
change the network adapter settings.
Right. So the network adapted settings has changed.
Let's click on settings one more time and let's fix
the video memory.
So the video memory is showing that it is less than 9
Megs and we should use the vmsvge.
graphics driver
So let's increase this to let's say 10 that
changes the VM SVG and
click on OK. Let's pull on the virtual machine
one more time to ensure things we can perfectly
Now, let's login user invagrant.
And vagrant one more time.
Let's type ipaddr to verify that
our ethernet 0 interface is receiving
an IP address within our hidden network
as you can see it is 10 11 12 to
20. So this is we can perfectly
let's type shutdown.
And shotong is not working. So let's do sudo. Let's
type hold.
If the virtual machine is taking too long to
shut down simply click the close icon and select the option
to actually power off the virtual machine.
Last but not least. Let's create a snapshot click on
Snapshot.
Take snapshot and let's call this.
fresh installation like so
I'll click on OK.
So great. Now we have our penetration
Testing Lab setup. The last thing we
need to do is actually set up our vulnerable web
application which will be covered in the next
video on setup a wireless network.
During the course of this video. We took a look at setting up a
couple of virtual machines within all patient Testing Lab environment
while this video may be seem to be quite long. However,
the process is quite likely but I highly recommend
that you take the time to carefully set of these virtual
machines simply because these virtual machines will contain a
list of security flows that is commonly exploitable
within the industry.
In the next video, we'll take a look at setting up vulnerable web
applications for web application security
penetration testing. I will see you in the next
video.