# Home Lab: Part 3

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

> **Changelog**
>
> * **Nov. 10, 2024**
>   * Added note about settings that could fix the “black screen on boot” problem that occurs on certain machines.
>   * Updated Kali Linux VM setup steps to include configuration that is recommended by Offensive Security.

In this module, we are going to install Kali Linux. We will use this VM in the next module also to complete the pfSense setup.

### Download Kali Linux <a href="#download-kali-linux" id="download-kali-linux"></a>

Go to the following link: [Get Kali | Kali Linux](https://www.kali.org/get-kali/#kali-installer-images)

Download the 64-bit Recommended Installer. The image is \~4GB in size so it will take some time to download.

As of writing the latest version of Kali Linux is **`2023.4`**.

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

Once it is downloaded we should have an **`.iso`** file.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-3/kali-download-2.png" alt=""><figcaption></figcaption></figure>

### Kali Linux VM Creation <a href="#kali-linux-vm-creation" id="kali-linux-vm-creation"></a>

Launch VirtualBox. Select **`Tools`** from the sidebar and then click on **`New`** from the toolbar.

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

Give the VM a Name. Set the Folder option to the location where the Home Lab VMs are going to be saved. Leave the ISO Image option empty. Select Type as **`Linux`** and Version as **`Debian (64-bit)`** then click on **`Next`**.

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

Leave everything on its default values. Click on **`Next`**.

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

Increase the Disk Size to **`80GB`** and click on **`Next`**.

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

Ensure that all the settings look right and click on **`Finish`**.

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

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

#### Adding VM to Group <a href="#adding-vm-to-group" id="adding-vm-to-group"></a>

Right-click on the Kali Linux VM from the sidebar, select **`Move to Group -> [New]`**.

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

The VM will now be added to a Group called **`New Group`**. Right-click on the group name and select **`Rename Group`**. Name the group **`Management`**.

[![vbox-8](https://blog.davidvarghese.net/assets/vbox-08.png)](https://blog.davidvarghese.net/assets/vbox-08.png)

Select the Firewall and Management group (**`Ctrl+Click`**). Right-click on the name of one of the groups. From the menu select **`Move to Group -> [New]`**.

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

Now both the groups should be nested inside a group called **`New Group`**. Right-click on the group and choose **`Rename Group`**. Give the group the name **`Home Lab`**.

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

In the end, we should have the following structure:

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

### Kali Linux VM Configuration <a href="#kali-linux-vm-configuration" id="kali-linux-vm-configuration"></a>

Select the Kali Linux VM and then from the toolbar select **`Settings`**.

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

#### System Configuration <a href="#system-configuration" id="system-configuration"></a>

Go to **`System -> Motherboard`**. For the Boot Order option ensure that the **`Hard Disk`** is on the top followed by **`Optical`**. Uncheck **`Floppy`**.

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

Go to **`System -> Processor`**. From Extended Features list select **`Enable PAE/NX`**.

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

Go to **`Display -> Screen`** and increase the Video Memory to **`128 MB`**.

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

#### Boot Image Configuration <a href="#boot-image-configuration" id="boot-image-configuration"></a>

Go to the **`Storage`** tab. Select the Empty disk present below **`Controller: IDE`** then click on the small disk icon on the right side of the Optical Drive option.

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

Select **`Choose a disk file`** and then select the downloaded **`.iso`** file for Kali Linux.

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

The final result should look as follows:

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

#### Network Configuration <a href="#network-configuration" id="network-configuration"></a>

Go to **`Network -> Adapter 1`**. For the Attached to field select **`Internal Network`**. For Name select **`LAN 0`**. Expand the Advanced section. For Adapter Type select **`Paravirtualized Network (virtio-net)`**.

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

### Kali Linux Installation <a href="#kali-linux-installation" id="kali-linux-installation"></a>

Remember to boot the pfSense VM if it was shut down before starting the Kali Linux installation.

Select Kali Linux from the sidebar and click on **`Start`** on the toolbar.

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

From the Installer menu select Graphical Install.

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

Select your Language, location and keyboard layout.

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

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

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

Enter a name for the VM. You can use any name here. The hostname is used to identify the system on the network. The hostname can also be changed after installation.

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

Leave the domain name input blank and click on **`Continue`**.

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

Enter your name. This name will be shown on the login screen.

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

The username is used to create the home directory for the user. All the user-related configurations are stored in this folder.

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

Enter a strong password. Re-enter the password in the second field and click on **`Continue`**.

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

Select your clock and then click on **`Continue`**.

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

Select the drive (**`sda`**) and click on **`Continue`**.

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

Select Guided - use entire disk and then click on **`Continue`**.

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

Select the option: All files in one partition and click on **`Continue`**.

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

Select Finish partitioning and write changes to disk. Then click on **`Continue`**.

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

Select **`Yes`** and click on **`Continue`**.

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

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

After the base system installation is complete we need to choose the desktop environment that will be installed. I have selected GNOME for installation.

The default is XFCE it does not look as pretty as GNOME it is much lighter and should have better performance. KDE Plasma is the fanciest with a lot of bells and whistles. I would only recommend KDE if you can assign 2 cores and 4GB RAM for this VM. Once the desktop environment is selected click on **`Continue`**.

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

The installation will take some time. Select **`Yes`** and click on **`Continue`**.

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

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

Click on **`Continue`** to Reboot the system.

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

After reboot, we should see the Login screen. Click **`Enter`** to log in. Enter the password that was configured during the installation.

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

### Post-Installation Configuration <a href="#post-installation-configuration" id="post-installation-configuration"></a>

Kali Linux installer can detect when it is run from a VM because of this it automatically installs Guest Addons.

Press **`Right Ctrl+F`** to enter Fullscreen mode. The VM should scale to fill the entire screen. Press **`Right Ctrl+F`** again to exit Fullscreen mode. From the dock at the bottom of the screen. Select the Terminal.

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

Run the command: **`ip a`**. We can see that the Kali VM has been assigned an IP address from the LAN network range. The VM should be able to access the internet as well.

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

Use the following command to update the system:

```
sudo apt update && sudo apt full-upgrade
```

Enter password when prompted.

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

Once the sources have been fetched we will be asked if we want to continue. Enter **`Y`** and then press **`Enter`** to start the update.

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

After the update is complete run the following command to remove the unused packages:

```
sudo apt autoremove
```

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

The **`.iso`** file that was downloaded to create the VM can be deleted now if you do not plan to store it for future use.

> **Black Screen on Boot**\
> On certain machines starting the Kali VM results in a black screen. This issue occurs usually after updating the VM. There isn’t a definitive solution to this problem. The issue may popup from time to time.
>
> Some users have reported that changing the “Graphics Controller” to `VBoxSVGA` seems to resolve the problem for them. This option is located under `Settings → Display → Screen`.
>
> Forcefully powering off the VM and starting it back up also seems to fix the issue. The VM might need to be restarted 2-3 times before the VM loads properly.

In the next module, we will access the pfSense Web UI and complete the remaining configuration.


---

# 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-part-3.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.
