In Pursuit of a Better Internet.

Setting Up My Metasploitable Home Lab

As a bit of a break from my usual CCNA studies, I wanted to try setting up my own home lab to experiment with ethical hacking.

YouTube has been recommending videos about home labs as a new IT project, and they encompass everything from networking to ethical hacking.

Initially, I have thought it would be useful to get my hands on some Cisco equipment like routers and ethernet cables just so I can physically play around and experiment with what I’ve been learning in networking, but I have also heard the costs and electricity requirements simply make it impractical.

Besides, there is no shortage of free virtual software to simulate networks, including Cisco’s own Packet Tracer. I can’t say I love the program (it can be a nightmare sometimes), but it is comprehensive.

I wanted to build a home lab to experiment with what I’ve been learning in ethical hacking.

With all I’ve been learning lately, I feel like I was losing focus on why I started my cyber security course in the first place. And while networking is obviously a huge component of that, I don’t have any current ambitions to purely be a network engineer.

I want to learn how to build and break things.

Hence, the Metasploitable virtual machine.

This was actually part of my last unit, where we had to set up a series of virtual machines in order to assemble our home lab, but I was overwhelmed with all the instructions and download files that I ended up just using the school’s in-browser labs instead.

Setting up a virtual machine itself isn’t too difficult.

For the most part, once you have a hypervisor like VMWare or VirtualBox installed, it’s relatively straightforward.

It’ll even unpack and install the virtual machine for you, so it’s simple as clicking a few files and booting it up in the program.

The problem with home labs is that you need to isolate it from the rest of your network.

Especially for a home lab dedicated to ethical hacking, you need to make sure that your virtual machines are connected to one another, but still isolated from a real network environment (i.e. your home network).

For example, the Metasploitable machine provides for several vulnerable web applications that you can test and exploit, but they can also be exploited by other actors if it is discoverable on your real network.

It is the same for any experiments with a Kali Linux machine. It can be fun to play around with malicious payloads, but you have to be sure that these are isolated in your play environment and separated from any real devices.

This is where network adapters come in.

Network adapters allow you to configure your virtual machine’s connectivity to a network. You may want it to access your home network and the wider web, or you may want to restrict its access to only a few devices on an isolated network.

Bridged mode is a pretty common configuration. It gives your virtual machine its own IP address within your real network, and essentially acts like another device. I imagine this is what you would use if you wanted to use a Windows machine to play Steam games, but only had a Mac.

NAT mode, or Network Address Translation mode, uses your host device’s IP address to connect to the internet.

Both these modes enable your virtual machine to connect to the internet, but it also exposes it to a wider variety of threats from external sources.

That’s why for these kinds of home labs, you would prefer to use a Host-Only mode where the virtual machines have an isolated network environment.

For this home lab, I set up a custom network with a host-only mode, so that I could connect all my virtual machines into this isolated network. This way, they are all able to connect with each other, but not to my home network or the external internet.

Once I was finally able to ping the Metasploitable machine from my Kali machine, I was ecstatic.

Now that I’ve finally set up my home lab (which I should have done months ago), I’m so keen to try out different techniques and recon tools that I’ve learnt previously in school.

Leave a Reply