Mobile Application Penetration Testing
Mobile Security Lab Setup
Building Your Mobile Test Lab
A professional mobile security assessment starts with a well-configured lab. The first decision is your target environment. You have three primary choices: a physical device, an x86-based emulator like Genymotion, or an ARM-native virtualisation platform like s. Physical devices offer the highest fidelity, as you're testing on the exact hardware the application will run on. However, they can be costly to acquire and maintain, especially if you need a range of models and OS versions. Emulators are easier to scale and reset, but they translate ARM instructions for x86 processors, which can introduce inaccuracies and performance issues. Cloud-based virtualisation offers a powerful hybrid, running native ARM code on servers for high-fidelity testing without the need for physical hardware.
| Feature | Physical Device | Genymotion (Emulator) | Corellium (Virtualisation) |
|---|---|---|---|
| Fidelity | Highest (Real hardware) | Medium (x86 translation) | High (ARM native) |
| Setup | Moderate (Drivers, cables) | Easy (Software install) | Easy (Cloud-based) |
| Cost | High (Device purchase) | Freemium/Paid | Subscription (High) |
| Scalability | Low (Manual) | High (Virtual) | Very High (Cloud) |
| Root/Jailbreak | Difficult / Risky | Easy (Built-in) | Easy (Built-in) |
For your analysis workstation, Kali Linux is the industry standard. It comes pre-packaged with a vast arsenal of security tools, saving you significant setup time. While you can install these tools individually on other operating systems, a dedicated Kali VM keeps your testing environment isolated and organised.
Kali Linux includes over 600 penetration testing and security tools, such as Metasploit, Wireshark, Nmap, Burp Suite, and Aircrack-ng, all pre-installed for immediate use.
Device Communication and Interception
Once your virtual or physical device is running, you need a way to communicate with it from your Kali workstation. The (ADB) is the essential command-line utility for this. It acts as a client-server bridge, allowing you to install applications, access the device's shell, and transfer files directly from your terminal.
# Check for connected devices (virtual or physical)
adb devices
# Open a root shell on the device
adb shell
# Install an application package (APK)
adb install app-release.apk
# Push a file from your computer to the device
adb push /local/path/file.txt /sdcard/file.txt
# Pull a file from the device to your computer
adb pull /data/data/com.app.name/databases/user.db .
To inspect an application's internal files or modify its behaviour, you need privileged access. On Android, this is achieved through rooting; on iOS, it's called jailbreaking. In a lab environment, this is non-negotiable. Rooting allows you to bypass standard security controls, explore the app’s private data directory, and install system-level tools. Most virtualisation platforms like Genymotion and Corellium provide pre-rooted images or a simple one-click rooting option, making the process trivial.
Intercepting Traffic with Burp Suite
A core activity in mobile security testing is analysing the network traffic an application sends and receives. For this, we use an interception proxy like Burp Suite. The goal is to route all traffic from the mobile device through Burp Suite running on our Kali workstation. This requires a few configuration steps.
First, configure Burp Suite to listen on all interfaces, not just the localhost address. This allows your mobile device, which is on the same network, to connect to it. You'll set this in Proxy > Options > Proxy Listeners. Next, on your mobile device, you need to modify your Wi-Fi connection's settings to use a manual proxy, pointing it to your Kali workstation's IP address and the port Burp is listening on (e.g., 8080).
Finally, to decrypt HTTPS traffic, you must install Burp's Certificate Authority (CA) certificate on the mobile device. With the proxy configured, open a browser on the device and navigate to http://burp. This special address will serve the certificate for you to download and install. On modern Android versions, you must install it as a system-level trusted credential, which is another reason a rooted device is essential.
With these components in place—a virtual device, ADB for communication, root access, and a configured proxy—your lab is ready. You can now begin installing target applications and analysing their behaviour in a controlled and powerful environment.
When setting up a mobile testing lab, what is the main drawback of using an x86-based emulator compared to a physical device or ARM-native virtualisation?
What is the primary function of the Android Debug Bridge (ADB) in a mobile security assessment?