| Field | Detail |
|---|---|
| Summary | Android/iOS static and dynamic app testing |
| Category | Mobile application testing |
| Phase | enumeration, web-testing, exploitation |
| Interface | CLI + GUI |
| Platform | Linux, macOS, Windows |
| Licence | Open source |
| Docs | https://mobsf.github.io/docs/ / https://frida.re/docs/ |
| Related | Burp Suite, jwt_tool, CyberChef |
Testing Android (.apk/.aab) and iOS (.ipa) apps: static analysis of the package, dynamic analysis of the running app, intercepting its traffic, and runtime instrumentation. The OWASP MASVS/MASTG is the reference methodology.
⚠️ Warning — Scope & your own device Test apps you're authorised to assess, on a device/emulator you own. Rooting/jailbreaking and repackaging are fine on a test device; don't tamper with other people's installs or production accounts.
Static analysis
MobSF (all-in-one — start here)
# Dockerised static+dynamic framework
docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf
# Browse http://localhost:8000 , drag in the APK/IPA
Gives a scored report: permissions, exported components, hardcoded secrets/API keys, insecure crypto, cleartext traffic config, certificate/pinning info, manifest issues. The fastest first pass.
apktool — decode & rebuild Android
apktool d app.apk -o app_src # decode resources + smali
# ... edit smali / AndroidManifest.xml / res ...
apktool b app_src -o app_mod.apk # rebuild
# then re-sign (required to install):
keytool -genkey -v -keystore k.ks -alias a -keyalg RSA -keysize 2048 -validity 10000
apksigner sign --ks k.ks app_mod.apk
jadx — decompile to readable Java
jadx-gui app.apk # GUI: browse decompiled Java, search strings
jadx -d out app.apk # CLI dump
Grep the decompiled source for http://, API endpoints, keys, SharedPreferences, crypto calls, debug flags.
Traffic interception
Route the app through Burp Suite:
- Set the device/emulator proxy to Burp's IP:8080.
- Install Burp's CA cert as a system cert (user certs are ignored on modern Android).
- Certificate pinning will block you — defeat it at runtime with Frida/objection (below) or by patching with apktool.
adb install app.apk
adb logcat | grep -i <package> # app logs (leaks tokens/URLs often)
adb shell pm list packages | grep <name>
adb shell run-as <package> ls /data/data/<package>/ # app sandbox (debuggable apps)
Dynamic instrumentation — Frida & objection
Frida hooks and rewrites function behaviour in a running app; objection is a Frida-powered toolkit needing no scripting for common tasks.
pip install frida-tools objection
frida-ps -Ua # list running apps on the USB device
# objection — the quick wins
objection -g <package> explore
# inside the objection REPL:
android sslpinning disable # kill cert pinning (unblocks Burp)
android root disable # bypass root detection
android keystore list
android hooking list classes
ios sslpinning disable # (iOS equivalent)
// Frida script: hook a method to see args/return (lab example)
Java.perform(function () {
var Login = Java.use('com.example.app.LoginManager');
Login.checkPassword.implementation = function (p) {
console.log('[*] checkPassword called with: ' + p);
return this.checkPassword(p);
};
});
frida -U -f com.example.app -l hook.js --no-pause
What to look for
- Hardcoded secrets/API keys/endpoints (jadx/MobSF).
- Insecure storage — tokens/PII in
SharedPreferences, SQLite, plist, external storage. - Cleartext/weak TLS, pinning that's trivially bypassed.
- Exported activities/services/receivers/content-providers (IPC attack surface) → test with
adb am/drozer. - Weak crypto, debuggable/backup-allowed flags, logging of secrets.
- Backend API flaws — once you're through pinning, it's web testing: Burp Suite, jwt_tool for tokens, CyberChef for encodings.
More mobile commands
# adb (Android)
adb devices -l ; adb shell ; adb logcat | grep -i <pkg>
adb pull /data/data/<pkg>/ ./loot # debuggable apps / rooted device
adb shell am start -n <pkg>/<activity> # launch exported activity (IPC testing)
# Frida
frida-ps -Uai # installed + running apps
frida-trace -U -i "*crypto*" -f <pkg> # trace matching functions
objection -g <pkg> explore # then: android sslpinning disable; android root disable
# Repackage (Android)
apktool d app.apk -o src ; apktool b src -o out.apk ; apksigner sign --ks k.ks out.apk
# iOS
objection -g <bundleid> explore ; ios sslpinning disable
drozer adds structured exported-component/IPC testing: drozer console connect.
Kill-chain usage
Enumeration
jadx-gui app.apk # (or MobSF) static analysis: secrets, endpoints
Web testing
objection -g <pkg> explore ; android sslpinning disable # reach the backend
Exploitation
frida -U -f <pkg> -l hook.js --no-pause # hook/alter runtime logic
Where it fits
A distinct discipline alongside web testing. Static (MobSF/jadx/apktool) maps the app and finds secrets; dynamic (Frida/objection) bypasses client-side controls so you can reach the backend; from there the API is tested like any web target. iOS mirrors Android with .ipa, Frida, and tools like frida-ios-dump.