Module 22 · Mobile Application Security · Lesson 65 of 75
Static analysis of an Android app
Pull an APK from a test phone, decompile it, read the manifest for risky settings, and hunt for hard-coded secrets, with MobSF for automation.
In this lesson · about 40 minutes
- Extract and decompile an APK with adb, apktool and jadx
- Spot risky manifest settings such as debuggable, allowBackup and exported components
- Find hard-coded keys and URLs in code and resources
Tools
- adb (Android Debug Bridge): talk to a connected test device or emulator.
- apktool: decode resources and the manifest, and disassemble code to smali.
- jadx / jadx-gui: decompile to readable Java.
- MobSF (Mobile Security Framework): automated static and dynamic analysis with a report.
- For iOS: decrypted IPA from a test device,
otool, class-dump, Hopper or Ghidra.
Manifest red flags
| Setting | Risk |
|---|---|
android:debuggable="true" | Anyone with USB access can attach a debugger and read memory |
android:allowBackup="true" | App data can be copied off the phone with adb backup |
android:exported="true" without a permission | Other apps can launch screens or call services directly |
android:usesCleartextTraffic="true" | Plain HTTP allowed |
| Dangerous permissions not needed by the app | Privacy risk (M6) |
What to grep for
api_key, secret, password, AKIA (AWS key prefix), firebaseio.com, http://, BEGIN PRIVATE KEY, internal or staging URLs, and disabled certificate checks (TrustManager classes that accept everything, ALLOW_ALL_HOSTNAME_VERIFIER).
Binary protections
Obfuscation (R8/ProGuard), root and emulator detection and tamper checks slow attackers down but do not make secrets safe. MASVS-RESILIENCE treats them as extra layers, never as the main control.
Hands-on lab (simulated terminal)
Lab: unpack a banking app's test build
A fintech client asked for an authorised test of the staging build of their app, com.example.wallet, on a lab emulator. Output is simulated; all keys are fake.
Step 1 of 6. Type each command and press Enter. Nothing runs on your computer.
1. List the devices adb can see.
Check your understanding0 of 3 correct
Quiz score: 0 of 3
Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.