CTF Lab Setup

VirtualBox is a free hyper-visor we can use to setup a lab for practice. Go ahead and download it now and we’ll go through setup for a semi-secure lab that will suffice. I’ll reference a book if you want to go balls to the wall lab setup at the end.

Creating virtual networks

Virtual Networks

  1. After downloading VirtualBox we’ll want to set up the virtual network. Go to file > preferences
  2. Click on “Network” and you should be looking like the picture above
  3. Make sure you’re on the “Network” tab and “Host-only Networks” and click on the icon that looks like a network card with a “+” sign on it.
  4. “vboxnet0” should now be available. Click on the other icon that looks like a screw driver to configure this network.
  5. Default settings should be fine for this. Should have a default of 192.168.56.100 for the gateway server and be 192.168.56.101-192.168.56.254.

Adding network card to Attacking and Victim VirtualMachines

  1. Download your attacking VM (Likely Kali)
  2. Install your attacking virtual machine to VirtualBox
  3. Once your VM is installed click on settings while the VM is highlighted. VM Settings
  4. Make sure you’re on the network tab
  5. Select “Host-only Adapter” in the “Attached to” portion as shown in the picture.
  6. Make sure vboxnet0 is the selected network card
  7. For the kali box you’ll want to add a second adapter so you can update tools 8, Select Adapter 2 and change “attached to” to “NAT” Natted Network
  8. Go ahead and install your victim machine now. You can get vulnerable OS’s from VulnHub
  9. Once you have the Victim OS installed repeat steps 3-6

After Thoughts

This is just a very basic lab setup that’ll keep a vulnerable operating system out of harms way; however understand that malware and hackers are a lot more sophisticated these days and have ways to know if they’re sandboxed. Essentially allowing them to break out of the sandbox and onto your host machine. I consider this quick and dirty. The “Host-Only” adapter keep you on a seperate internal network scheme, so make sure the defaults are different than your home/work network. For instance if your home network is a 192.168.x.x you might want to change the virtual adapter to 10.x.x.x or 172.16.x.x.

If you have the hardware and want to build a good lab I suggest getting the book Building Virtual Machine Labs: A Hands-On Guide which will go over pfsense firewall, building multi-layer networks, as well as other cool things. It’s truly a great resource for infosec related labs. It covers all major and even some not as well known hyper-visors.

comments powered by Disqus