As you know when we talk about malware analysis we need an safe environment to run our tools. It’s not a good choice to working in your host main machine for malware analysis. Therefore in this section we want to create a safe environment as much as possible.

The first thing we need is a Linux based virtual machine. I recommend Debian based Linux. Personally my choice is Ubuntu but you are free to choose other distributions. You also need an Hypervisor to run this VM. You can choose between VirtualBox or VMWare Workstation.

For having an android emulator I highly recommend to use Android X86 Virtual Machine. You can use other emulators like Genymotion or Android Studio Emulator but both them are host-only and NAT network type which is a risk for our host machine.

Also there is also CuckooDroid which is a sandbox for Android malware analysis that we may try in the future.

Let’s start 🙂.

Untitled

1.1. Linux Analysis & Transparent Proxy Virtual Machine

1.1.1. Machine specifications

In the center of the previous scheme we will have the analysis machine that through a network interface, in bridge mode, will be connected to the internet (eth0) and through the other interface (eth1) will be connected to the internal network of Virtualbox. Since we are going to run a lot of software at the same time on the analysis machine, we have to dedicate more than 2GB of RAM, in our case 4GB. We also have to add one more interface (eth1) where the DHCP server will be configured and where the Android machine will be connected.

1.1.2. Tools

There are hundreds of tools for both dynamic and static analysis of Android applications. Here is the installation of the tools that we have found most relevant.

1.1.3. DHCP server installation and configuration

To install:

sudo apt install isc-dhcp-server

Add the interface, in the file /etc/default/isc-dhcp-server, where you want to let the DHCP running. Modify the line INTERFACESv4="" to INTERFACESv4="eth1"