# Home Lab: Part 1

<div data-full-width="false"><figure><img src="/files/LgEOjGxZq8jDbVsxgKv7" alt=""><figcaption></figcaption></figure></div>

Credit: This lab setup based on David Varghese Home\_Lab.

For convenience the contents are republished below:

## 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)

<figure><img src="/files/s8MPXG1nbInn2QsWA49L" alt=""><figcaption></figcaption></figure>

> **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.

### Requirements <a href="#requirements" id="requirements"></a>

#### System <a href="#system" id="system"></a>

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

#### Concepts <a href="#concepts" id="concepts"></a>

* Basic familiarity using VirtualBox (or other virtualization software)
* Basic understanding of networking concepts (NAT, DHCP, IP Address, LAN, Routing, Firewall, etc.)
* Familiarly with Linux and Windows (installing software, troubleshooting, etc.)

### Enabling Virtualization <a href="#enabling-virtualization" id="enabling-virtualization"></a>

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

<figure><img src="/files/Qof1jbiOzLim5ZI7n2q9" alt=""><figcaption></figcaption></figure>

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.

[Enabling Virtualization in your PC BIOS](https://bce.berkeley.edu/enabling-virtualization-in-your-pc-bios.html)

### Installing VirtualBox <a href="#installing-virtualbox" id="installing-virtualbox"></a>

#### Downloading VirtualBox <a href="#downloading-virtualbox" id="downloading-virtualbox"></a>

Go to the following URL: [Downloads – Oracle VM VirtualBox](https://www.virtualbox.org/wiki/Downloads)\
Download VirtualBox and VirtualBox Extension Pack.

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

<figure><img src="/files/B4YY4CiISEUHyzUXkBlb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/UtLRGwYZ7sQfDgTFV3gV" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/vOC4LmOznMOW41sjMogK" alt=""><figcaption></figcaption></figure>

You might get the following error:

<figure><img src="/files/UxAK5hiPPaLattCM2yhG" alt=""><figcaption></figcaption></figure>

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

#### Downloading VC++ 2019 Redistributable <a href="#downloading-vc-2019-redistributable" id="downloading-vc-2019-redistributable"></a>

Close the installer and go to the following URL to download VC++ 2019 Redistributable.\
[Latest supported Visual C++ Redistributable downloads | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170)

<figure><img src="/files/XDCegyEDt0is0EDkHMQY" alt=""><figcaption></figcaption></figure>

#### Installing VC++ 2019 Redistributable <a href="#installing-vc-2019-redistributable" id="installing-vc-2019-redistributable"></a>

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

<figure><img src="/files/dKBaB9vhhUxnKdTvzlcy" alt=""><figcaption></figcaption></figure>

Accept the agreement and click on **`Install`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-53.png" alt=""><figcaption></figcaption></figure>

#### Installing VirtualBox <a href="#installing-virtualbox-1" id="installing-virtualbox-1"></a>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-55.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-56.png" alt=""><figcaption></figcaption></figure>

Click on **`Yes`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-57.png" alt=""><figcaption></figcaption></figure>

Click on **`Yes`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-58.png" alt=""><figcaption></figcaption></figure>

Click on **`Install`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-59.png" alt=""><figcaption></figcaption></figure>

Click on **`Finish`** to close the installer and start VirtualBox.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-60.png" alt=""><figcaption></figcaption></figure>

#### Installing Guest Additions <a href="#installing-guest-additions" id="installing-guest-additions"></a>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-61.png" alt=""><figcaption></figcaption></figure>

On the Extension Manager page click on **`Install`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-63.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-62.png" alt=""><figcaption></figcaption></figure>

Click on **`Install`** to confirm the selection.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-64.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-65.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-66.png" alt=""><figcaption></figcaption></figure>

#### Changing VM Storage Location <a href="#changing-vm-storage-location" id="changing-vm-storage-location"></a>

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`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-68.png" alt=""><figcaption></figcaption></figure>

> **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.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-72.png" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-1/vbox-69.png" alt=""><figcaption></figcaption></figure>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://foothold.gitbook.io/blog/home-lab/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
