June 2, 2023
Updated the Building a pfSense VM for Our VirtualBox Cyber Range step
- Removed the information referencing the
virtio-netdriver issue and the workaround for new and returning readers. This step of the guide has effectively reverted to its original state.
- I am happy to report that the
virtio-netdriver issue appears to be fixed in VirtualBox 7.x at this time. I had previously linked to this ticket where support responded that the issue should be resolved once and for all.
- I finally had some time to test and verify that the issue is indeed resolved. I tested with
VirtualBox 7.0.8 r156879and was able to get a DHCP address on the WAN interface using the
Looking for my Proxmox Guide?
- Check out @Dewalt’s PimpMyKali script to make your Kali VMs so much better
- gimmesystem in the HackTheBox Discord server for QA testing this guide
You have a desktop – either your daily-use computer or backup computer – you do not want to reimage it, but would like to run some labs on your computer.
Your daily-use computer. You want to run some labs on it and would like a mobile security lab.
What We'll Build
- Virtualized pfSense firewall as the gateway
- Multiple subnets for different purposes
- Active Directory
Recommended System Specifications
- Multithreaded CPU with Virtualization Support
- At least 16GB RAM – 32GB would be better
- Plenty of free disk space, preferably more than one internal disk
Enabling Virtualization in the BIOS
- Turn on the laptop
- Press the
ESCkey multiple times until you get to the system setup menu.
Warning: you might need to press a different key on your system to get to the BIOS menu. From my HP laptop,
ESC is the key to get to the BIOS.
- Choose BIOS Setup
- Go to Advanced > System Options
- Enable VTx and VTd (For AMD processors, there is a different name)
- Save changes and exit the BIOS setup
To download the VirtualBox installer for your host OS, navigate to their downloads page here:
You'll see a list of downloads based on host operating system. At the time of writing this guide, the latest version was
- If downloading for Windows, click
- If downloading for Mac OS, click
OS X hosts
- If downloading for Linux, click
Linux distributionsand follow the instructions. You can downloading using an
.debpackage, or you can install using your package manager such as
Install the VirtualBox Extension Pack
Once you've installed VirtualBox, I'd highly recommend you add the extension pack for better VM support.
You can download the extension pack file. Once you open the file, VirtualBox should be the default file handler and install the extension pack. You must reinstall the extension pack any time you update VirtualBox!
A Note on VirtualBox Guest Additions
What are the VirtualBox Guest Additions? As you continue to experiment with VirtualBox, you may hear this name come up. Put simply, the Guest Additions are drivers (or software) you can install inside the VM, to enable it to run more smoothly with VirtualBox.
For example, sometimes you may have VM that has a poor screen resolution, the screen doesn't resize, or some other strange issues. You may need to install the VirtualBox Guest Additions drivers to help the VM run more smoothly.
Building a pfSense VM for Our Cyber Range
Importing Kali from Offensive Security Images
Configuring the pfSense Firewall
Adding Vulnhub VMs to the Lab
Building the Active Directory Lab
Troubleshooting Your Lab
Creating a Windows 7 Buffer Overflow Practice VM
Adding Another Interface to pfSense
Appendix A: Double NAT Diagram
Learn more about NAT here: https://www.youtube.com/watch?v=wg8Hosr20yw