InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties…

Follow publication

Building a Virtual Security Home Lab: Part 1 - Network Topology

A step-by-step guide for building your very own Cybersecurity Home Lab using VirtualBox

David Varghese
InfoSec Write-ups
Published in
7 min readDec 31, 2023

Banner Background by logturnal on Freepik
Hacker Image by catalyststuff on Freepik

In this project, we will explore how to set up a Cybersecurity Home Lab on our laptop/PC. For this project, I will be using VirtualBox running on my Windows Laptop.

This project will consist of multiple modules. Each module will cover a different component of the lab. If at any point in the future changes are made in the project a note will be added at the start of the respective module to highlight the changes.

This project has been heavily inspired by the following Home Lab guides:

Home Lab Overview

  • pfSense (Gateway & Firewall)
  • Kali Linux (Management VM)
  • Active Directory Lab (Domain Controller & 2 Clients)
  • Malware Analysis Lab (Windows & Linux)
  • Security VMs (DFIR & SIEM)
  • Cyber Range (Vulnerable VMs for CTF practice)

Lab Startup
pfSense is the gateway (router) and firewall for the lab. pfSense should always be the first VM that is booted when using the lab. If pfSense is not booted the machines in the lab will not be able to access the internet. Once pfSense is up other VMs can be launched.

System Requirements

  • 64-bit multi-threaded CPU (minimum 4 cores) with Virtualization Support
  • 16GB RAM
  • 250GB Disk Space

Enabling Virtualization

To use VirtualBox our system has to support virtualization. On Windows to check if virtualization is enabled open Task Manager (Ctrl+Shift+Esc) and go to the Performance Tab. If like in the image below virtualization is shown as enabled then no changes need to be made.

If virtualization is shown as disabled it means that the CPU supports virtualization but it is disabled in the BIOS. If Virtualization is not shown as an option it means that the CPU does not support virtualization.

If virtualization is shown as disabled we need to enable it in the BIOS. The process of getting to the BIOS varies from device to device. Refer to the device manual and online forums for device-specific instructions.

Installing VirtualBox

Go to the following URL: Downloads — Oracle VM VirtualBox
Download VirtualBox and VirtualBox Extension Pack.

As of the writing of this module, the latest version of VirtualBox is 7.0.12.

You will have a .exe and .vbox-extpack file after the download. Double-click the .exe file to start the installer.

You might get the following error.

If you do not get the above error continue to the Installing VirtualBox section.

Close the installer and go to the following URL to download VC++ 2019 Redistributable.
Latest supported Visual C++ Redistributable downloads | Microsoft Learn

The download will give us an .exe file. Double-click on it to launch the installer.

Accept the agreement and click on Install.

Click on the VirtualBox executable to start the setup. Click on Next to continue.

Leave all the settings on their default value and click on Next.

Click on Yes.

Click on Yes.

Click on Install.

Click on Finish to close the installer and start VirtualBox.

From the File Menu bar select: File -> Tools -> Extension Pack Manager

On the Extension Manager page click on Install.

Select the .vbox-extpack file that we downloaded. Click on Open.

Click on Install to confirm the selection.

Scroll to the bottom of the License and click on I Agree.

Once the installation is complete click on the Hamburger icon on the right-side of Tools and select Welcome.

From The File Menu bar select: File -> Preferences.

This step is not necessary but recommended on devices that have multiple drives.

On my laptop the primary drive (C:\) only has 200GB of free space which will completely get filled by the end of the project. My secondary drive (E:\) on the other hand has 1TB of free space. In order to not fill-up my primary drive I have changed the machine folder to a folder on my secondary drive.

From The File Menu bar select: File -> Preferences.

ℹ️ UI Changes
With the release of v7.1, Oracle has given Virtual Box GUI a makeover. Make sure to select “Expert” mode by using the toggle at the top left corner. Once in Expert mode all the options will be identical to the options found in the previous versions of Virtual Box.

From the General tab change the value of Default Machine Folder to change the default storage location of the VMs.

In the next module, we will start with the installation and configuration of pfSense.

Next Steps

If you liked what you just read consider:

  • Clapping for the article (can clap up to 50 times)
  • Drop a comment showing your support
  • Sharing the article with others who will find it useful
  • Follow me on Medium, LinkedIn and GitHub
  • View my posts on Source Code

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by David Varghese

Cybersecurity Student | Digital Forensics | Security Analyst | Software Engineering | davidvarghese.net

Responses (5)

Write a response

Is this possible to do on Raspberry Pi 4 with 8GB ram?

--

more more please

--

As a beginner I love such tutorials. Thanks!

--