MobDojoStart learning free

Mobile Malware · Inside a Malicious App · Lesson 3 of 5

Watching an App Run

Run a sample in an isolated lab and read what it does on the network.

13 min70 XPLab in Pro

A sandbox and a network log

Static analysis shows what an app could do. Dynamic analysis shows what it actually does, by running it and watching. Because the sample may be malicious, it never runs on anyone's real phone. Professionals use a sandbox: an isolated environment, often an emulator (software that pretends to be a phone on a computer) or a dedicated test device with no personal accounts, kept on a separate network. When the run is over, the sandbox is wiped back to a clean state.

The richest thing to watch is usually network traffic, because most mobile malware is useless until it talks to its operators. Analysts record every connection: which names the app looks up, which servers it contacts, and what it sends. Most traffic is encrypted with HTTPS, so a lab device is typically set up to trust the analyst's own monitoring tool, letting them read what this one app sends. That's done only on lab equipment, never on a phone someone actually uses.

Patterns analysts look for include:

Remember from Overlays & Banking Trojans that banking trojans keep a target list of apps and show fake login screens over them.

On the simulated phone, open the network log for PDF Scanner Pro's 10 minute emulator run. Tap each timeline entry and read what it means.

When malware knows it's being watched

Network traffic isn't the only thing analysts record. A good sandbox also logs file activity (what the app writes, downloads and deletes), permission activity (which permissions it requests, and when), and attempts to gain powerful access, such as nudging the user toward an accessibility service or to allow installs from unknown sources.

Malware authors know their apps get run in sandboxes, and some try to behave innocently there. MITRE ATT&CK lists this as Virtualization/Sandbox Evasion (T1633). Conceptually, it takes a few forms:

This is why a clean sandbox result doesn't prove an app is safe. Analysts respond by combining methods. Static analysis might reveal code that checks for an emulator, or a URL that never got contacted. Longer runs, more realistic test devices and repeated runs can coax out more behavior. And every finding gets compared against what others have reported about the same family.

One rule holds through all of it. This is professional work done with samples obtained through proper channels and run in isolated labs. Nobody should install a suspicious app on their own phone just to see what happens. If you think a phone is infected, the cleanup steps from Cleaning Up a Phone are the right tool.

Test yourself

Can you answer these?

  1. At 00:03 the app posts the device model, Android version and a list of installed banking apps to /api/register. What's the most likely reason it wants that list?
  2. Malware that detects an emulator and stays quiet is using what ATT&CK calls Virtualization/Sandbox ______. Fill in the word.

Answer them in the app to earn 70 XP (Pro).

Answer in the app