# Home Lab: Part 5

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

Virtual Machine images present online come in 2 formats - **`.vmdk`** (Virtual Machine Disk Image) or **`.ova`** (Open Virtualization Format). In this module, we will step up some vulnerable VMs on the **`CYBER_RANGE`** interface which we can then access using Kali Linux running on the **`LAN`** interface. We will also see how to import **`.vmdk`** and **`.ova`** images into VirtualBox.

> Boot the pfSense VM if it was turned off before proceeding with the below setup. Once pfSense is up start the Kali Linux VM as well.

### VM 1: Metasploitable 2 <a href="#vm-1-metasploitable-2" id="vm-1-metasploitable-2"></a>

#### Download Metasploitable 2 <a href="#download-metasploitable-2" id="download-metasploitable-2"></a>

Go to the following URL: [Metasploitable: 2 \~ VulnHub](https://www.vulnhub.com/entry/metasploitable-2,29/) and download Metasploitable.

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

The download is a compressed file (**`.zip`**). Use an extraction software like **`7-zip`** to decompress the file. After extraction, we should have a folder.

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

The folder will have multiple files. We only require the **`.vmdk`** file.

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

#### Creating the VM <a href="#creating-the-vm" id="creating-the-vm"></a>

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

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

Give the VM a name. Ensure that the Folder is set to the location where all the VMs of the Home Lab are going to be saved. Leave the ISO Image option empty. Select the value for Type and Version as shown below and then click on **`Next`**.

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

> The sites from which the VM images are downloaded will in most cases have details on OS type and Version that can be used in VirtualBox

Reduce the Memory to **`1024MB`** and click on **`Next`**.

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

Select “Do Not Add a Virtual Hard Disk” and click on **`Next`**.

> The **`.vmdk`** file we downloaded is the Hard Disk. The OS is pre-installed on it. In the next step we will see how to attach to it to the VM we are creating.

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

Confirm that everything looks correct and click on **`Finish`**.

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

You will get a Warning as shown in the below image. Ignore it and click on **`Continue`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-5/meta-9.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 Metasploitable VM. Select **`Move to Group -> [New]`**.

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

Right-click on the group that is created and select **`Rename Group`**. Call the group **`Cyber Range`**.

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

The output should look as follows:

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

Right-click on the **`Cyber Range`** group and select **`Move to Group -> Home Lab`**.

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

The final output should look as follows:

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

#### Configuring the VM <a href="#configuring-the-vm" id="configuring-the-vm"></a>

All my VMs for the Home Lab project are located in **`D:\Virtual Machines`**. Whenever we create a new group in VirtualBox a corresponding folder is created is created on the filesystem to store the VM.

Since the Metasploitable 2 VM is in the Cyber Range group which is nested inside the Home Lab group the location of the Metasploitable VM on my Hard Drive will be **`D:\Virtual Machines\Home Lab\Cyber Range\Metasploitable 2`**.

Find the Metasploitable VM folder location in your case and move the downloaded **`.vmdk`** into it.

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

Select the VM from the sidebar and then from the toolbar click on **`Settings`**.

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

Go to **`Storage`** and select **`Controller: SATA`** then click on the small “Add Hard Disk” icon on the right.

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

This will open the Hard Disk Selector menu. Click on Add and then select the **`.vmdk`** file. Then click on the Choose button to use the Hard Drive.

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

If done correctly under **`Controller: SATA`** the Hard Disk will be visible.

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

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

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

Go to **`Network -> Adapter 1`**. Change the Attacked to field to **`Internal Network`** and in Name select **`LAN 1`**. Click on **`OK`** to save the changes.

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

#### Testing Connectivity <a href="#testing-connectivity" id="testing-connectivity"></a>

From the sidebar select Metasploitable 2 and then click on **`Start`**.

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

Once the VM boots use the following credentials to log in.\
Username: **`msfadmin`**\
Password: **`msfadmin`**

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

After login use the following command to check if we have an IP address:

```
ip a l eth0
```

We can see that we have been assigned the IP **`10.6.6.12`** (IP may be different in your case) which we know is inside the DHCP address range for the **`CYBER_RANGE`** interface.

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

We can ping Google to test if we have an Internet connection.

```
ping google.com -c 5
```

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

We can do a similar test to check connectivity to the Kali Linux.

```
ping 10.0.0.2 -c 5
```

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

We can also try to reach the Metasploitable 2 VM from Kali Linux.

```
ping 10.6.6.12 -c 5
```

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

### VM 2: Chronos <a href="#vm-2-chronos" id="vm-2-chronos"></a>

#### Download Chronos <a href="#download-chronos" id="download-chronos"></a>

Go to the following URL: [Chronos: 1 \~ VulnHub](https://www.vulnhub.com/entry/chronos-1,735/) and download Chronos.

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

The downloaded file is a **`.ova`** file.

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

#### Creating the VM <a href="#creating-the-vm-1" id="creating-the-vm-1"></a>

From the VirtualBox sidebar select Tools and then click on **`Import`**.

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

This will open the Virtual Appliance Import wizard. Click on the folder icon to the right of the File field and then select the downloaded **`.ova`** file then click on **`Next`**.

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

From this menu, we can change the configuration of the VM as required. I have gone ahead and reduced the RAM to **`1024MB`**. You can change the name of the VM to match your naming convention. For MAC Address Policy ensure that **`Generate new MAC addresses for all network adapters`** is selected. If everything looks right click on **`Finish`**.

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

The import process can take some time.

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

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

Once the import is complete right-click on the VM and then select **`Move to Group -> Home Lab/Cyber Range`**.

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

The result result will be as follows:

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

#### Configuring the VM <a href="#configuring-the-vm-1" id="configuring-the-vm-1"></a>

Select the Chronos VM and then from the toolbar click on **`Settings`**.

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

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

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

Go to **`Network -> Adapter 1`**. For the Attached to field select **`Internal Network`**, for name select **`LAN 1`**. Expand the Advanced settings option. From Adapter Type select **`Paravirtualized Network (virtio-net)`**. Click **`OK`** to save the changes.

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

#### Testing Connectivity <a href="#testing-connectivity-1" id="testing-connectivity-1"></a>

Select the Chronos VM and from the toolbar select **`Start`**. Once the VM starts we should see the login screen. The credentials for this machine are not known so we cannot log in and check if it has been assigned an IP address.

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

On the Kali Linux VM open the pfSense Web Portal. From the navigation bar select **`Status -> DHCP Leases`**.

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

Under the Leases section, there should be an entry for Chronos. We can see that it has been assigned the IP **`10.6.6.13`**.

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

From Kali, we can ping the VM to test if we can connect to it.

```
ping 10.6.6.13 -c 5
```

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

> **Adapter Type Selection**\
> You would have noticed that for the Metasploitable 2 VM we did not chose **`Paravirtualized Network`**. This VM is quite old and does not work properly on that Adapter. Windows VMs also don’t work on **`Paravirtualized Network`** Adapter.\
> From a performance point of view **`Paravirtualized Network`** is the better choice. We don’t have a way to know in advance if a Linux VM will work on the Adapter. So what I recommend is to first select **`Paravirtualized Network`** booting up the VM and check if the network is working properly if not shutdown the VM and select a different Adapter.

In the next module, we will begin configuring the Active Directory Lab.


---

# 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-5.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.
