Hello everyone. Welcome to this video. In this
video. We're going to be taking a look at setting up our own virtual hacking lab
and setting up our targets and our virtual hiking
lab Network. All right. Now in the previous video, we've
already taken a look at setting up our attack of the M,
which is running Kali Linux, right? And it, regardless
of what, operating system, you're running as your host. It could be Windows
Mac or Linux. Once you've set up your hypervisor. In this case
is going to be virtualbox. Everything should be replicable on
your side now.
Now, our Target operating systems for this particular course, are going to
be Windows 7 and this can be any version and any service pack
of Windows 7 and Metasploit table 3. Now Metasploit
about 3 is an intentionally vulnerable operating system
that is set up to help users, understand
to help users and students, understand how
to exploit Windows systems, or Windows Server
systems, and a very services that
are running on it. Now. Metasploit aboard three is a virtual machine.
That is based on Windows server.
2008. All right, and if I open up my browser
here, and we go to the GitHub link to Metasploit
World 3, which will be added as a resource to
this video. You can find it on a github.com rapid7
met exploitable 3, and this
page will essentially have all the build instructions to help you
build it. And you have the requirements here to actually go through the
build process. So you need virtualbox. You need the
vagrant reload, plug-in, and Packer, and you
also have the build instructions here. Now we
Also have our own building instructions, and
a video tutorial that is available for
free on YouTube, that will actually cover how to set
up Metasploit about 34 yourself. Now, you might be
asking yourself. Why do we need to do this manually? And the
reason for that is because you're dealing with a Windows operating system.
And windows has very strict licensing. Terms in
terms of how you can distribute the operating systems and
under what terms. Now for this particular course,
we're going to be providing you with the ovf file, which is
the
Open source, virtualization format file, which again, is just the VM
image. So you don't have to go through the build process yourself. So
that will also be added as a resource to this video and
you just need to click double, click on that and it will set up the
VM for you as we did with the Kali Linux VM. All
right, so you can go through the build instructions. If you
want to build it yourself based on the operating system, you're using the
ovf file will work on any operating system as long as
you have virtual box installed. All right, and our second operating
system, as I said, is going to be Windows 7 now.
As of recording this particular video, Windows 7
is now discontinued. And as a result Windows does not
offer any evaluation images on the web site. So
before you had your TechNet evaluation center where you could
download various Windows 7, virtual machines, and you
could use them for a period of 90 days until they were deactivated. Now,
for the purpose of this video. You can find your various
Windows isos under Windows ISO dotnet.
And again, this is just public disclosure. Again,
you can it's entirely up to you as to whether you
want to use this.
These are not activated versions of windows. So there is
going to be a certain period of time where they are going to be running as
not activated, which is perfectly fine. That's because these
exploits do not need an activated version of Windows to
actually run. Or you do not need an activated version of window to actually
use the operating system for exploitation purposes.
All right, or in my case, because I'm actually
carrying out a demonstration here. I have licensed
versions of Windows. And again, that is
part of Microsoft terms, if I'm going to be using
Their products for demonstration purposes. I need to be activated. So
I just want to make that clear as possible. All right,
and you can download the iso here. Now. I
already have the VM images. So if I go to my
files here and go into my VMS and
ISO files, I already have my Windows 7 virtual box
file here, which I can easily setup. I already have Windows
7 set up in virtualbox already. So these are the ovf files.
So all you need to do is just double click on them and
they'll ask you to import it and that's all and as
I said, we already have one set up for met exploitable 3, which
will be added and you can use that for yourself. It's about
six gigabytes, which is a large download. But again,
it is a requirement for this particular course. So
again, you just double click on it and that will give you various
instructions to import the VM. So you specify the actual import
directory and you should be good to go. Alright.
So once we have that set up, we can now begin setting
up our virtual hacking lab Network. All right, so to do
that, we want to open up virtualbox here and we want to go.
Into our preferences. Now, I
already have one of my own network setup. So I will just get
rid of this. So I'll just delete that and I'll just hit
remove. All right, so within the
network preferences here, we want to create our own app Network. Now,
the reason we're doing this is because we want all our
VMS in our acting lab to be on the same network so
that they can communicate or with each other to
have the same subnet essentially, which will help them
be identified, much more easily. So again, we want to create one
in your neck.
On this little green plus button here and
we can then edit it so we can right
click and click on edit Network and we want to change the name
to something that will recognize so we'll just call it a virtual hacking
lab, right? And the for the network cidr
and subnet. We're just going to change this to 10. So
we'll just get rid of this. So we'll say 10.0.0.0
one 4/24. So
this is going to be our Network address here. Again an
owie.
We have our subnet. So this is a medium-sized Network
and we want to ensure that it supports DHCP. So
that is going to set up the virtualbox DHCP service, which
is going to be responsible, for assigning new IP addresses
to new devices that we add to the network. All
right, so I'm just going to hit, OK? And we
just want to hit. We have some invalid settings here. Looks
like we have an invalid setting with the actual cidr.
Let me just check what the options. What the incorrect
options are soldiers. Set that to zero and
we'll just
Okay, and that should be okay now,
so I'm sure that that is set to 0 that's
because we're starting off fresh them. All right, so I'm just going to
be okay. And the first virtual machine, we
want to add the network is going to be our Kelly operating system or
our VM want to click on that. We're going to network and
we want to specify the net Network. So not on
the bridge Network anymore. When I click on that Network and
we want to make sure that it's the network. Name is virtual hacking
lab similar to what we had set up just a few seconds
ago.
So the next operating system is going to be Metasploit. Module
3. We want to go into your network settings. And again ensure
that it is on the virtual a hacking lab
Network here under nap Network. And again,
we'll do the same for Windows 7. And in my case, I'm running Windows
7 Enterprise. We're going to network and
ensure that it's on the network and it's on the virtual hacking
lab and we're ready to go. So now
we can essentially test this and start
noting down the the actual IP addresses
and
Whether we can communicate, we can actually connect to
each other from, we can actually establish a connection between
these boxes now that they're on the same network. So
I'll just click on start now.
And and this is the these network settings.
Only going to affect the virtual machines that are currently
set up to use that Network. In our
case. We've only set up Cali Windows 7 and Metasploit about
three. So we're just going to start up Kelly here and Metasploit
bold 3 as well will. Also start up the Windows 7
box. And the reason I'm going to be starting up Metasploit about
three is because there are a few settings, you need to set up or
that you need to know so that you can actually log
in and we can test out the IP configuration here.
So that is Windows 7, slotting up and we also have many,
splittable 3, which is a Windows Server. 2008
box. Let's check up on Kelly because
I want to actually get started with Kelly first. So
Kelly still loading. And again, based
on the amount of system resources. You have you
do not need to have all the virtual machines running at the same time.
You can just run both of them so you can run Callie and
the operating system you're going to be testing on. So
we're going to Stipe in the credentials here.
For Kelly, and we're going to let that start up.
And I'll just open up a terminal will check if
the other boxes are started up. Alright, So Meta splittable three
started up and as you can see, it's running on Windows Server. 2008 R2
and to login is going to ask you to press
Ctrl alt and delete. And to do that. You're going to your input settings
and keyboard and control-alt-delete. You
don't want to click on the vagrant user. So that is going to be
automatically set up. Do not be worried. This is how this virtual machine
is set up. The password for the vagrant user is
Vagrant, right? And you may have noticed that we have a
administrator user. We do not know the credentials to
the administrator user. And that's because, as I said, this virtual
machine is set up to be intentionally vulnerable to teach you,
how to exploit a Windows system, and we will be able to
actually get those credentials at the end of the exploitation process.
Alright, so that is set up. We now
want to check out Windows 7, which is also set up. And as I said all
my versions are activated yours, do not need to be activated. The
reason my inactivated is because I'm going to be demonstrating.
Rating. I am going to be using the operating systems for demonstration. I
need to be in tune with Microsoft licensing terms.
All right, so let us check out the
various IP addresses that have been assigned to these boxes now
that they're on the same network and I'm
just going to use bash here and I'll say ifconfig on
Linux and a, you can see, it tells us that the IP
address is 192 168. Sorry, 10.0.0.0
for right, and you
can actually take a look.
Look at the net mosque, which is set up correctly and
that's perfectly fine as well. And yeah,
that's that's for the Kelly box or the Kelly IP address
is 10.0.0.0. For,
let's, check out the Metasploit module, 3, IP select
in ipconfig, and that is
set up as 10.0.0.0. Six 10.0.0.0. There
we are. And the default gateway is set
up as 10.0.0.0 one for
Windows 7. Let us check this.
Now just open up a command prompt here and type in
ipconfig. And this is running on 10.0.0.0. So
again, because we have the DHCP server setup, that
means that these addresses are going to be assigned automatically, if
you can also sign the addresses manually, you
can also then disable DHCP if that's if you want
a static Network. So what we can do now is
we can use nmap. So again, we say nmap, we
can type in nmap SN to perform a ping scan. And
we can say 10.0
Sorry, 10.0.0.0 Point
actually .0 4/24 and
we essentially just going to perform an entire network.
Discovery scan here that will actually see if we can communicate
with all the devices on the network. And
immediately you can see we're looking for the virtualbox network interface
cards. Here. Then point 0.5 is Windows 7.
10.0.0.0 point. Six is
Metasploit both 3 and our Kali OS runs on 10.0.0.0. So
that's a good sign. That tells
That that we are able to communicate with all the other virtual machines
on this network. Again, you can use a tool
like nap discover for for
network discovery and I if I specify my interface
name, which is ethernet 0, you
can find your ethernet, your interface Name by typing in
ifconfig. Like so and you
can find that right over here. So this is ethernet 0. So again, I type in
net discover I
ether net zero and that is going to start.
When the scan now. Don't worry, if the the actual Network
address here is different from the one we set up.
We're using Nat, which means it's Network address translation,
which means we'll actually be able to discover
any hosts on that on the actual Network that we are running on.
So we're going to give this a few seconds. So it goes through the entire subnet
here and and all
the class B and C networks and we'll just give
this a few seconds. I'm just going to I'll just get back to you when we've discovered all
the devices or all the VMS that are currently.
The network.
All right, so the scan is complete and as you can
see, it tells us what we already know. We have, of
course, apart from our Cali operating system. We have to we have moon,
has seven minutes played 13, that are currently detected here. So
the address is 10.0.0.0 5. And
then point zero point, zero point six. Now again, if
you want to specify owned Range when using a tool like net discover, you
can easily do that by typing in net discover and
we specify our interface which is going to be ethernet 0 and
then the range. So we say 10.0.0.0
Zero 4/24. So that's the entire network range
and this will make the scan a whole lot faster so
you can actually see because it's only going through that entire network range
can see, it's already finished and it should list out
the devices that are currently online. And
this case it's it's currently telling us that we did not
get any results. So I'll just it's not
actually returning and result. So we'll just give that a few seconds. All
right, so the scan is complete. And as you can see that, that
actually completed quite quick and it
now gives us
Us all the IP addresses in ordered fashion. So we have
a Windows box right over here and Metasploit bo3 box, and
we now know that all the machines on the network and
communicate with each other successfully. Alright,
so now that we've taken a look at how to setup a virtual hacking lab.
We're now going to be taking a look at setting up the various tools
that we're going to be using and the tools that are tailored towards,
you know, Windows penetration testing, so I'll be
seeing you there.