# Home Lab: Part 8

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

In the module, we are going to set up the Malware Analysis Lab. This lab will consist of two VMs. One of the VMs will be for Windows Malware Analysis and the other one will be for Linux Malware Analysis.

### Creating New Interface <a href="#creating-new-interface" id="creating-new-interface"></a>

VirtualBox GUI does not allow us to create more than four Network Interfaces.

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

However, we can configure up to 8 interfaces per VM. To add more than 4 interfaces we have to utilize the VirtualBox CLI.

#### VirtualBox CLI Setup <a href="#virtualbox-cli-setup" id="virtualbox-cli-setup"></a>

The VirtualBox CLI binary is called **`VBoxManage.exe`**.

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

To be able to use the CLI we have to add its path as an environment variable.\
VirtualBox is by default installed at **`C:\Program Files\Oracle\VirtualBox`**.

Copy the path to the executable from the navigation bar.

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

Open Search and type “Environment”. Click on **`Edit environment variables for your account`**.

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

In the top window select the variable named “Path” and then click on **`Edit`**.

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

Click on **`New`** and then paste the path to the VirtualBox CLI. Then click on **`OK`**.

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

Click on **`OK`** to close the Environment Variables menu.

To test if the variable was added successfully open PowerShell and run the following command:

```
# List all installed VMs
VBoxManage list vms
```

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

#### Creating new Interface <a href="#creating-new-interface-1" id="creating-new-interface-1"></a>

Before we create the new interfaces we need to know the name of the pfSense VM (it is “pfSense” in my case). The VM should also be “Powered Off”.

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

To add a network interface run the following commands:

```
# Create a Internet Network
VBoxManage modifyvm "pfSense" --nic5 intnet

# Use the Paravirtualized Adapter
VBoxManage modifyvm "pfSense" --nictype5 virtio

# Give it the name LAN 3
VBoxManage modifyvm "pfSense" --intnet5 "LAN 3"

# Network Interface is connected by Cable
VBoxManage modifyvm "pfSense" --cableconnected5 on
```

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

> In the above commands “pfSense” is the name of my VM.\
> In the 3rd command in place of “LAN 3” you can use a different name that matches your network interface naming convention.

Now if we look at the overview of the pfSense VM we should see Adapter 5.

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

> Interfaces that are created using the CLI will not show up in the Settings page for the VM. If you want to modify the adapter settings you have to do it using the CLI.

#### Enabling the Interface <a href="#enabling-the-interface" id="enabling-the-interface"></a>

Start the pfSense VM. On boot, you will notice that there are still only 4 interfaces. The new interface has to be onboarded before it shows up in pfSense.

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

Enter **`1`** to select “Assign Interfaces”.\
Should VLANs be set up now? **`n`**

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

Enter the WAN interface name: **`vtnet0`**\
Enter the LAN interface name: **`vtnet1`**\
Enter the Optional 1 interface name: **`vtnet2`**\
Enter the Optional 2 interface name: **`vtnet3`**\
Enter the Optional 3 interface name: **`vtnet4`**

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

Do you want to proceed?: **`y`**

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

The new interface has been added. Now we need to assign the interface an IP address.

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

Enter **`2`** to select “Set interface(s) IP address”\
Enter **`5`** to select the OPT3 interface.

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

Configure IPv4 address OPT3 interface via DHCP?: **`n`**\
Enter the new OPT3 IPv4 address: **`10.99.99.1`**\
Enter the new OPT3 IPv4 subnet bit count: **`24`**

For the next question press **`Enter`**. Since we are configuring a LAN interface we do not have to worry about the upstream gateway.

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

Configure IPv6 address OPT3 interface via DHCP6: **`n`**\
For the new OPT3 IPv6 address question press **`Enter`**.\
Do you want to enable the DHCP server on OPT3?: **`y`**\
Enter the start address of the IPv4 client address range: **`10.99.99.11`**\
Enter the end address of the IPv4 client address range: **`10.99.99.243`**\
Do you want to revert to HTTP as the webConfigurator protocol?: **`n`**

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

Now interface OPT3 will have an IP address.

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

#### Renaming the Interface <a href="#renaming-the-interface" id="renaming-the-interface"></a>

Launch the Kali Linux VM. Login to the pfSense web portal. From the navigation bar select **`Interfaces -> OPT3`**.

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

In the description field enter **`ISOLATED`**. Scroll to the bottom and click on **`Save`**.

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

Click on **`Apply Changes`** in the popup that appears to persist the changes.

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

#### Interface Firewall Configuration <a href="#interface-firewall-configuration" id="interface-firewall-configuration"></a>

From the navigation bar click on **`Firewall -> Rules`**.

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

Select the **`ISOLATED`** tab. Click on the “Add” button to create a new rule.

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

Change the values as follows:\
Action: **`Block`**\
Address Family: **`IPv4+IPv6`**\
Protocol: **`Any`**\
Source: **`ISOLATED subnets`**\
Description: **`Block access to everything`**

Scroll to the bottom and click on **`Save`**.

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

In the popup click on **`Apply Changes`** to persist the new rule.

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

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

> Since this Interface is going to be used for Malware Analysis we are blocking network access. This will ensure that malware cannot spread to other systems using the network.

#### Reboot pfSense <a href="#reboot-pfsense" id="reboot-pfsense"></a>

Now we need to restart pfSense to ensure that the firewall rules are propagated properly. From the navigation bar select **`Diagnostics -> Reboot`**.

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

Click on **`Submit`**.

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

Once pfSense boots up you will be redirected to the login page.

### Flare VM Setup <a href="#flare-vm-setup" id="flare-vm-setup"></a>

To install Flare we need a Windows machine. Flare can be set up using most versions of Windows. Since we already have the ISO for Windows 10 Enterprise I will be using it to configure Flare.

#### Windows ISO Download <a href="#windows-iso-download" id="windows-iso-download"></a>

Go to the following URL: [Windows 10 Enterprise | Microsoft Evaluation Center](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise)

Click on the 64-bit edition Enterprise ISO download option. The ISO file is \~5GB.

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

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

Select Tools from the sidebar and click on **`New`**.

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

Give the VM a name. Select the downloaded Windows 10 ISO Image. Check “Skip Unattended Installation”. Then click on **`Next`**.

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

Increase Base Memory to **`4096MB`** and click on **`Next`**.

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

Increase the Drive Size to **`100GB`** and click on **`Next`**.

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

Verify all the settings and click on **`Finish`**.

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

**Adding VM to Group**

Right-click on the VM and select **`Move to Group -> [New]`**.

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

Right-click on the group and rename it to “Malware Analysis”.

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

Right-click on the “Malware Analysis” group and select **`Move to Group -> Home Lab`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-8/flare-8.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-8/flare-9.png" alt=""><figcaption></figcaption></figure>

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

Select the VM then from the toolbar select **`Settings`**.

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

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

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

Leave the **`Network Adatper`** on its default setting of **`NAT`**.

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

> Machines assigned to the **`ISOLATED`** interface does not have internet connection. But to setup Flare we need Internet access. Once we finish the configuring Flare we will move it to the correct subnet.

Click on **`OK`** to save the settings.

#### Installing Windows <a href="#installing-windows" id="installing-windows"></a>

Select the Flare VM from the sidebar and click on **`Start`**.

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

Install Windows as shown below. The installation process is identical to the process from the previous module (Part 7).

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

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

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

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

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

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

Select “Domain join instead”.

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

> Provide a name that does not use special characters and spaces. This is very important. The installer for Flare will not work otherwise.

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

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

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

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

Once on the desktop Windows will ask should access to the Internet be allowed click on **`Yes`**.

**Guest Additions Installation**

Install Guest Additions to enable the resizing on the VM display. Once again you can refer to the last module (Part 7) for more detailed steps.

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

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

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

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

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

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

After rebooting the VM. Remove the Guest Addition Image.

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

**Creating VM Snapshot 1**

Before we proceed we are going to take a snapshot of the VM. Snapshots allow us to roll back to an old functional state of the VM.

Shut down the VM. Click on the Hamburger menu on the right of the VM name in the sidebar. Select **`Snapshots`**.

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

Click on **`Take`**.

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

Give the Snapshot a descriptive name. Click on **`OK`** to create the Snapshot.

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

Click on the Hamburger menu and click on **`Details`** to return to the original page.

#### Flare VM Pre-Install Configuration <a href="#flare-vm-pre-install-configuration" id="flare-vm-pre-install-configuration"></a>

You can read more about Flare VM and its pre-requisites on the below link:\
[mandiant/flare-vm: A collection of scripts to setup a reverse engineering environment](https://github.com/mandiant/flare-vm)

TLDR; “Windows Updates” and “Windows Defender” have to be disabled.

**Disabling Windows Update**

[How to change account password on Windows 11 | Windows Central](https://www.windowscentral.com/software-apps/windows-11/how-to-change-account-password-on-windows-11)

Open on Search bar and search for “Settings”. Open the Settings app.

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

Click on “Update & Security”.

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

Click on the “Pause updates for 7 days” button.

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

**Disabling Windows Defender**

Download the following script: [jeremybeaume/tools: Script to disable Windows Defender](https://github.com/jeremybeaume/tools/blob/master/disable-defender.ps1)

Right-click on the Shield icon on the taskbar and select “View Security Dashboard”.

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

Click on “Virus & threat protection”.

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

Select “Manage settings” from the “Virus & threat protection settings” section.

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

Disable all the features that are shown in the image below:

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

Right-click on the Start menu and select “Windows PowerShell (Admin)”.

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

Run the following command to download the script:

```
# Save the script in the Downloads folder
Invoke-WebRequest "https://raw.githubusercontent.com/jeremybeaume/tools/master/disable-defender.ps1" -OutFile $HOME\Downloads\disable-defender.ps1
```

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

Use the shortcut **`Windows+R`** to open the Run dialog. Enter **`msconfig`** and click on **`OK`**.

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

Navigate to the Boot tab. In the Boot options section enable “Safe boot” and then click on **`OK`** to save changes.

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

Click on **`Restart`** to boot into Safe Mode.

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

In Safe Mode, the VM cannot be resizable. Safe Mode essentially disables all features that are not required to run the OS.

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

Right-click on the Start menu and select “Windows PowerShell (Admin)” and enter the following commands:

```
# Change directory
cd .\Downloads\
# Unblock the downloaded script
Unblock-File .\disable-defender.ps1
# Disable the PowerShell policy preventing script execution 
Set-ExecutionPolicy Unrestricted -Force
# Start the script
.\disable-defender.ps1
```

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

Once the script completes its execution press **`Enter`** to close the script. Reboot the VM for the changes to take place.

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

Press **`Windows+R`** to open the Run dialog. Enter **`msconfig`** and click on **`OK`**.

Navigate to the Boot tab. From the Boot options section disable “Safe boot”. Click on **`Apply`** then **`OK`**. Restart the VM to boot normally into Windows.

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

Wait for some time for Defender to load completely and then you will see that “Virus & threat protection” will show as disabled. This means that the script worked successfully.

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

**Renaming the VM**

Search for “This PC” and from the right side click on “Properties”.

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

Select “Rename this PC”.

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

Give the PC a name. Click on **`Next`** and then select “Restart Now” for the changes to take effect.

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

**Creating VM Snapshot 2**

Shut down the VM. Go to the Snapshot page using the Hamburger menu. Click on **`Take`** to create a new Snapshot.

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

Give the Snapshot a descriptive name. Then click on **`OK`**.

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

Use the Hamburger menu and return to the Details page. Click on **`Start`** to start the VM.

#### Flare VM Installation <a href="#flare-vm-installation" id="flare-vm-installation"></a>

Right-click on the Start menu and select “Windows PowerShell (Admin)”.

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

Enter the following commands to download and run the Flare VM script.

```
# Download the FlareVM script
Invoke-WebRequest "https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1" -OutFile $HOME/Downloads/install.ps1
# Go to Downloads Folder
cd $HOME/Downloads
# Unlock the downlaoded script
Unblock-File .\install.ps1
# Disable PowerShell script execution policy 
Set-ExecutionPolicy Unrestricted -Force
# Run the script
.\install.ps1
```

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

The script will make some checks before starting the installation.

Enter **`Y`** when asked about Snapshot. Enter password when prompted.

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

After some time the Flare VM configuration dialog will open.

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

In the Package Installation Customization section from the left side select “debloat.vm” and click on the right arrow to select it for installation.

{% hint style="info" %}
If you don't see debloat.vm and th ui is different just press enter to continue.
{% endhint %}

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

Click on **`OK`** to start the install. The VM will restart multiple times during the setup.

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

The installation can take a very long time. Once the setup is complete we will get the following prompt click on **`Finish`** to complete the setup.

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

After the installation is complete. Restart the VM to complete the setup.

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

#### Post-Install Configuration <a href="#post-install-configuration" id="post-install-configuration"></a>

**Installing OpenSSH Server**

Once we move this VM to the **`ISOLATED`** subnet it will not be able to access the internet. We will not be able to download malware samples directly from the Internet. We will download the samples onto a different VM that has Internet access and then move them to this machine using SSH. I will cover this process in more detail in a later module. For now, we need to install “OpenSSH Server”.

Open the Search bar. Type “Add” and from the results select the “Add or remove programs” option.

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

Click on **`Optional Features`** under “Apps & features”.

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

Click on **`Add a feature`**. This will open a new menu.

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

Search for “SSH”. Enable “OpenSSH Server” and then click on **Install**.

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

Once the install is complete if you search for “SSH” in the “Installed features” section you should see “OpenSSH Client” and “OpenSSH Server”.

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

**Moving VM to the Isolated Network**

Shut down the VM. Open the VM **`Settings`** page and go to **`Network`**. For the Attached to field select **`Internal Network`**. For name select **`LAN 3`**. Click on **`OK`** to save the changes.

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

**Creating VM Snapshot 3**

Using the Hamburger menu open the Snapshot page. Click on **`Take`** to create a Snapshot. Give the Snapshot a descriptive name and then click on **`Ok`**.

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

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

You can now delete the Windows 10 Enterprise ISO if you do not plan to store it in the future.

### REMnux VM Setup <a href="#remnux-vm-setup" id="remnux-vm-setup"></a>

#### Download Image <a href="#download-image" id="download-image"></a>

Go to the following link: [Get the Virtual Appliance - REMnux Documentation](https://docs.remnux.org/install-distro/get-virtual-appliance)

Click on **`Box`** to open the download page.

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

Click on the blue Download button. The image is \~5GB.

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

Once the download is complete we will have an **`.ova`** file.

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

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

Click on Tools from the sidebar and then select **`Import`**.

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

Select the downloaded OVA file and click on **`Next`**.

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

Configure the VM as required. Ensure the VM has **`4096MB`** of RAM. For the MAC Address Policy select “Generate new MAC addresses for all network adapters” then click on **`Finish`**.

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

**Adding VM to Group**

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

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

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

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

Go to **`System -> Motherboard`**. In Boot Order ensure that **`Hard Disk`** is on the top followed by **`Optical`**. Uncheck **`Floppy`**. Click on **`OK`** to save the changes.

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

#### Post-Install Configuration <a href="#post-install-configuration-1" id="post-install-configuration-1"></a>

Select the VM and from the toolbar click on **`Start`**.

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

**Updating Guest Additions**

The VM will already have Guest Additions installed but it will be an older version. From the VM toolbar select **`Devices -> Upgrade Guest Additions`** to update Guest Additions.

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

**Upgrading Packages**

Once Guest Additions is updated open a Terminal and enter the following command to update the system packages.

```
remnux upgrade
```

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

Once the update is complete restart the VM.

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

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

**Moving VM to the Isolated Network**

Shut down the VM. Open the **`Settings`** menu and select **`Network`**.

For the Attached to option select **`Internal Network`**. For the name field select **`LAN 3`**. Click on **`OK`** to save the changes. This will move the VM to the **`ISOLATED`** interface that does not have internet access.

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

**Creating VM Snapshot**

Click on the Hamburger menu and select **`Snapshot`**.

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

Click on **`Take`** to create a Snapshot.

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

Give the Snapshot a descriptive name. Then click on **`OK`**.

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

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

Use the Hamburger menu to go back to the **`Details`** page.

In the next, module we will start configuring the Security subnet. This subnet will have our DFIR VM and SIEM (Splunk).


---

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