Setting up a Malware Analysis Lab


Building a lab has been a bit more challenging than I anticipated. Before taking any safety precautions and adding malware I thought I could just create two virtual machines, put them on the same network, and get them to start talking to each other! Of course anything worth doing should be done well. I don’t want to infect my machine and network with the malware I’m studying. In this tutorial I’ll share a first step to setting up the malware analysis lab:  setting up a basic network of two Windows virtual machines and getting them to communicate.

The first thing I did was download VMWare Workstation 16. The Oregon State University College of Engineering has a program with VMWare where we can download a copy of VMWare Workstation with a 1 year license. It can be downloaded here: https://it.engineering.oregonstate.edu/download-software. The next step is to find an iso for the operating system where you want to activate the malware. Based on the client requirements for our project I downloaded a copy of Windows XP from this link: https://archive.org/details/WinXPProSP3x86.

Once VMWare Workstation is installed we can begin creating virtual machines using the iso image. 

  1. Click on File > New Virtual Machine at the top left. For our purposes we just went with a typical installation.
  2. Choose the iso image we downloaded from the link above.
  3. When asked for a product key enter the Serial number from the page we downloaded the iso from. Enter a Full Name and Password for the admin user on the virtual machine.
  1. .Provide the virtual machine a name and a location.
  2. Afterwards allocate disk size for your virtual machine and whether you want to split the virtual disk into multiple files. I went for the default options here.
  3. I didn’t customize the virtual machine any further for this tutorial so after that you can create your machine!

It takes a while for the machine to boot up so give it a moment.

After you logon the VMWare tools will install as well and reboot your machine.

Now that your machine is created you can either create another virtual machine using a different windows xp iso or create a clone of this one. I will proceed by creating a clone. 

  1. First suspend your machine. You can find this by clicking on the drop down menu for the play button. 
  2. Next begin the process by clicking on the VM tab at the top > Manage > Clone. This brings up the Clone Virtual Machine Wizard. 
  3. We have not setup a snapshot so we will clone the current state of the machine.
  4. I wanted the clone to not share any memory with the original so we will create a full clone.
  5. Provide it a name and location. Then click finish. VMWare Workstation is great for making this  process much easier than installing the original!

At this point we finally have two virtual machines on our network. Next we will have them communicate with each other.

  1. On one of the virtual machines find the command prompt just like shown below Start menu > All programs > Accessories > Command Prompt.
  1. Once the command prompt has booted up enter “ipconfig” into the terminal to see the IP address for that machine.
  1. From my clone machine I attempted to communicate with the original VM by using the ping command towards the host IP 192.168.116.131.  As you can see this was not successful.
  1. To remedy this I added an exception to the Windows Firewall of the original VM. To get to the Windows Firewall go through Start > Control Panel > Network and Internet Connections > Windows Firewall. A separate window will appear for the settings. Go to the Exceptions tab and enable FIle and Printer Sharing. 
  1. With this exception we can now ping the original VM from the clone. When we try again we can see a response this time.

If we repeat the previous steps to have the original communicate the clone we should get the same result.

So there you have it. The next steps after this would be to isolate this network from the host computer. This is to prevent malware from infecting the host. That will be the topic for a future tutorial. Keep an eye out for the next one!

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *