However, manual lab setup and configuration can prove to be a laborious and time-consuming process.
In this article, we'll look at 4 ways to create a reverse engineering lab, discuss how to save time, and, potentially, improve the detection rate using a sandbox-as-a-service, and a recommended list of tools for a comprehensive setup.
In essence, a malware analysis lab provides a safe, isolated space for examining malware.
The setup can range from a straightforward virtual machine using VirtualBox to a more intricate network of interconnected machines and actual networking hardware.
But in this article, we'll look at building a lab tailored for static analysis, so what we will need is a secure environment where we can run disassemblers, edit binary files and debug.
There are a couple of ways we can go about creating it:
Perhaps the simplest way to create a secure and isolated environment is by using a virtual machine.
A popular option is Virtual Box, open-source software from Oracle. If you are on Linux, to install it, just use the command sudo apt install virtualbox. VMWare is another popular choice — it's a commercial program, but there is a free tier.
Set up is easy — download and install the software, create a virtual machine, configure the settings to make sure it doesn't have network access or shared folders with the host, and then boot it with an .ISO file of your chosen operating system.
But this approach has some drawbacks: you will have to establish custom detection rules for identifying suspicious or malicious entities, independently research emerging techniques, maintain configurations, and determine logging policies using available tools. This increased focus on maintenance and configuration detracts from the time spent on analysis.
Pros:
Cons:
One significant advantage of cloud-based sandbox services is their built-in resilience against VM detection. This reduces the likelihood of a malware sample recognizing it's in a virtual machine and halting its execution, a feature that requires manual configuration in other sandboxes.
Also, in a service like this, detection rules are written by specialists utilizing vast malware and threat intel databases. As a result, the software can enrich analysis outcomes with techniques and IOCs, yielding more comprehensive output compared to raw data from cloud or on-prem VMs.
Furthermore, cloud-based sandbox services streamline environment configurations. For instance, instead of creating separate snapshots in a VM, ANY.RUN's cloud service allows easy environment setup through a user-friendly menu every time a lab is initiated.
Pros:
Cons:
Using an online, interactive sandbox such as ANY.RUN instead of a lab offers convenience and speed. It can help automate parts of static analysis, like extracting malware configurations.
If you'd like to try ANY.RUN for yourself, they are currently running a special promo for Hacker News readers:
In case you have an old laptop lying around or you have the means to get one or build a PC, this is definitely an option. You don't have to break the bank either — the 11-13th generation of Intel processors make even budget machines more than a viable option.
The main upside of opting for a physical computer is better performance and higher security since you can make sure the machine is truly isolated from all devices and networks.
Pros:
Cons:
Creating a malware lab in the cloud actually isn't as difficult as it might sound. Also — it is free! All you need is an account at AWS, or any comparable cloud service provider, and a machine to connect to it. The setup may be slightly more complicated than a local virtual machine, but there are numerous tutorials that you can use as a guide.
If you choose to work with AWSs, look for Kali in the marketplace to set up a Kali Linux Virtual Machine. To use the GUI, you can create a VNC server and connect to your lab with a tool like VNC Viewer.
One of the downsides of this approach is that it's free until it isn't. If you exceed the boundaries of the free tier, your cloud bill could balloon quickly.
Occasionally, cloud providers may also restrict malware execution, posing legal risks. Additionally, cloud machines demand support, burdening IT operations. While suitable for novice independent researchers, this approach presents drawbacks in corporate settings. Crucially, it lacks the ability to counteract malware's VM detection and bypass anti-evasion tactics.
Pros:
Cons:
Here are some essential tools that will help to you reverse-engineer malware:
It's up to the analyst to decide what software to install, but, in our opinion, the list of essential tools looks like this:
Oh, and if you want to get a lab that's been pre-configured, you can use a specialized distribution kit like Remnux, which comes with most of those programs already installed.
There is also FLARE VM — a collection of software installation scripts for Windows-based systems that allows you to easily set up and maintain a reverse engineering environment on a virtual machine.
We have discussed four different methods for creating an analysis lab: utilizing virtualization, building a dedicated machine, deploying a cloud lab, or subscribing to a sandbox-as-a-service.
Each of these approaches comes with its own set of benefits and drawbacks, and the correct choice depends on what you are trying to achieve and the resources available to you.
Thankfully, most of these options are totally free, so just try them all out and see what works best!