Skip to main content
Synced from an Obsidian vault

For graph and advanced features, download the full Intel Codex Vault and open it in Obsidian.

Mobile Security (iOS & Android)

Authorized environments only. Comprehensive guide to mobile application security testing, reverse engineering, and exploitation for iOS and Android platforms. Use against apps and devices you own or have written authorization to test. See Legal & Ethics.


Table of Contents​

  1. Overview
  2. Pre-Engagement & Authorization
  3. Android Security Testing
  4. iOS Security Testing
  5. Common Mobile Vulnerabilities
  6. Network Analysis
  7. Dynamic Instrumentation
  8. Bypassing Security Controls
  9. Automated Testing
  10. Tools Reference
  11. Learning Resources
  12. Related SOPs

Overview​

Mobile Security Testing Scope​

Key areas:

  • App reverse engineering: Decompile, analyze code, find vulnerabilities
  • Runtime analysis: Hook functions, modify behavior, bypass protections
  • Network security: HTTPS interception, API security, certificate pinning bypass
  • Data storage: Analyze local databases, shared preferences, keychains
  • Authentication/authorization: Session management, token security
  • Cryptography: Weak algorithms, hardcoded keys, insecure random number generation
  • Platform-specific: Android intents, iOS URL schemes, deep linking

Testing Environments​

Android:

  • Emulator: Android Studio AVD (x86_64 or arm64 system images); Genymotion as alternative
  • Physical device: Rooted Android phone (Pixel preferred for AOSP-clean Magisk/KernelSU support)
  • OS version: Test on the oldest Android version the app supports (its minSdkVersion) and on the newest. Much security behaviour follows the app's targetSdkVersion as well as the device version (see the version floors below).

iOS:

  • Simulator: Xcode Simulator (limited: Keychain APIs work, but Secure Enclave–backed keys and passcode-gated data protection don't behave as on a device, and there is no jailbreak or anti-tamper surface)
  • Physical device: Jailbroken iPhone on an iOS build the public jailbreaks still cover. Dopamine 3.x tops out at iOS 26.0.1 (A12/A13 only) and palera1n covers A8–A11 hardware [verify 2026-11-08], so a jailbroken rig runs older iOS than the current release. Matrix: iOS Dynamic Analysis.
  • OS version: Test on current and previous iOS versions; use a stock (non-jailbroken) device for current-iOS behaviour. arm64e (A12+) devices are needed to exercise PAC-aware code paths.

Lab version floors (check each row against its source before buying or flashing hardware):

TopicFactLab impact
User-added CAsApps targeting Android 6.0 (API 23) and lower trust the user CA store by default; apps targeting API 24+ trust only system CAs unless their network security config opts in [verify 2026-11-08]A Burp/mitmproxy CA in the user store intercepts only old-target or opted-in apps; others need the CA in the system store (root)
System CA storeSince Android 14, root certificates live in the Conscrypt module APEX as well as the system partition; depending on the Conscrypt module version, the active store is /system/etc/security/cacerts or /apex/com.android.conscrypt/cacerts/ [verify 2026-11-08]Copying a CA into /system/etc/security/cacerts alone may not take effect on newer devices (see Network Analysis)
APK signingApps targeting Android 11 (API 30)+ that are signed only with scheme v1 can't be installed or updated on Android 11+ devices [verify 2026-11-08]Re-sign repackaged APKs with apksigner (see Modifying & Repackaging APKs)
adb backupFor apps targeting Android 12 (API 31)+, adb backup excludes app data unless the app sets android:debuggable="true" [verify 2026-11-08]Test data at rest through root filesystem access, not adb backup
16 KB pagesGoogle Play requires apps targeting Android 15 (API 35)+ to support 16 KB pages on 64-bit devices; from February 1, 2027, updates that don't can't be released [verify 2026-11-08]Keep one 16 KB environment: the "Google APIs Experimental 16 KB Page Size" emulator images (Android 15+), or the "Boot with 16KB page size" developer option on Pixel 8 / 8 Pro / 8a and Pixel 9 / 9 Pro / 9 Pro XL / 9a; adb shell getconf PAGE_SIZE returns 16384 in 16 KB mode
Current AndroidAndroid 17 (API 37) is the newest release on developer.android.com/about/versions [verify 2026-11-08]Include a device or AVD on the newest release
Current iOSiOS 27.2 (October 26, 2026) is Apple's current release [verify 2026-11-08]The Dopamine and palera1n matrices don't reach it on real hardware; test current-iOS behaviour on a stock device (matrix: iOS Dynamic Analysis)

Authorized testing only:

  • ✅ Test apps you developed or have permission to test
  • ✅ Bug bounty programs (HackerOne, Bugcrowd)
  • ✅ Penetration testing engagements with signed contracts
  • ❌ Reverse engineering apps without authorization (may violate TOS)
  • ❌ Circumventing DRM or software protection for piracy

Responsible disclosure: report findings to the app developer or vendor through the channel the engagement or program names. Remediation windows, publication timing and CVE requests follow the engagement terms. See Legal & Ethics and Reporting, Packaging & Disclosure.


Pre-Engagement & Authorization​

Mobile testing inherits unique authorization wrinkles: rooting/jailbreaking is destructive and warranty-voiding, sideload/re-sign tooling can violate app-store ToS, and on-device data routinely contains real PII even on "test" accounts. The bullets below are pre-flight gates — do not skip them, and do not re-derive legal content here. See also the Legal & Ethical Considerations sub-block under Overview for the testing-only allow/deny list, and Legal & Ethics for the canonical jurisdictional framework.

Authorization Checklist​

  • Target app, device, and backend covered by signed engagement letter, bug-bounty / VDP scope, or written owner permission; app-store ToS implications of sideload, re-sign, and tampering tooling acknowledged in writing.
  • Device root (Magisk, KernelSU, APatch) or jailbreak (Dopamine, palera1n; checkra1n or unc0ver only on legacy hardware and iOS) authorized on this device only — warranty-void and brick risk explicitly accepted by the asset owner.
  • App-data extraction scope (Keychain, Keystore, shared prefs, app sandbox, WebView caches) and PII handling defined; on-device user data treated per Collection Log chain-of-custody and OPSEC artifact rules.
  • Frida-server install, Objection injection, and IPA/APK re-signing scoped to the test device — not the analyst's daily driver or any device holding personal credentials.
  • Network MITM authorization (Burp/MITMproxy CA in system trust store, SSL pinning bypass) scoped separately from production API interception; out-of-scope endpoints, third-party SDK telemetry, and shared backend tenants explicitly excluded.
  • MDM bypass, biometric bypass, iOS arm64e PAC bypass, and Android FBE decryption are explicitly listed as in-scope or out-of-scope (default: out-of-scope unless the engagement letter says otherwise).
  • Halt criteria, emergency contact, and disclosure pathway (vendor PSIRT or VDP, app-store security inbox) identified before any tooling touches the device.
  • If the engagement is an App Defense Alliance MASA assessment (a Google Authorized Lab validates the app against MASVS Level 1 requirements; not an OWASP program) [verify 2026-11-08], the reporting chain between lab, developer and tester is agreed in writing.

Lab Environment Requirements​

  • Dedicated test devices matched to target OS version. Jailbreak/root tooling is tightly version-pinned; confirm on each project's release page before buying or flashing (full iOS matrix in iOS Dynamic Analysis):
    • Dopamine 3.x (opa334/Dopamine): iOS 15.0–17.3.1 on arm64e, iOS 15.0–18.7.1 on arm64 and A12/A13, plus iOS 26.0–26.0.1 on A12/A13 [verify 2026-11-08]
    • palera1n: A8–A11 and T2 devices on iOS/iPadOS/tvOS 15.0 and later (checkm8-based, so no A12+) [verify 2026-11-08]
    • checkra1n (last release 0.12.4 beta): iPhone 5s to iPhone X (A7–A11), iOS 12.0 and up, with preliminary iOS 14 support [verify 2026-11-08]
    • Legacy only: unc0ver (unc0ver.dev lists iOS 11.0–14.8) [verify 2026-11-08]
    • Legacy only: Taurine (iOS 14.0–14.8.1) [verify 2026-11-08]
    • Android root: Magisk (v31.1 requires Android 7.0+) [verify 2026-11-08]
    • Android root: KernelSU (officially GKI 2.0 devices, kernel 5.10+) [verify 2026-11-08]
    • Android root: APatch (ARM64 only, Android kernels 3.18–6.12) [verify 2026-11-08]
  • frida host CLI and on-device frida-server on the same release (frida --version, frida-server --version), with the server built for the device ABI. A major-version mismatch fails with a protocol error ("please ensure that major versions match") [verify 2026-11-08]. Objection rides on top.
  • Separate Apple ID provisioned for iOS testing — never sign in with personal iCloud; disable Find My, iMessage, and iCloud Keychain on the test device.
  • Android Studio AVD with system image matching target ABI (arm64-v8a vs x86_64) for automated dynamic runs; emulator proxy with Burp/MITMproxy CA installed into the system trust store (apps targeting Android 7.0 / API 24+ ignore user-store CAs unless they opt in via network_security_config.xml; apps targeting API 23 or lower still trust them).
  • MobSF instance for static triage running containerized on an isolated bridge — never expose the MobSF web UI to a routable network.
  • Snapshot device/emulator state before each instrumentation campaign; revert after Frida hooks, re-signs, or kernel patches to keep evidence reproducible.

Disclosure-Ready Posture​

Capture before you touch: app version + build identifier (aapt dump badging app.apk, apksigner verify --print-certs app.apk, codesign -dvvv App.app, otool -l App | grep -A4 -E 'LC_BUILD_VERSION|LC_VERSION_MIN'), acquisition provenance (store, vendor handoff, internal build URL), and device jailbreak/root state at test time. Version-pin every Frida script, Objection plugin, and re-sign cert (thumbprint + signing chain). Archive the decompiled APK/IPA, smali/Hopper exports, and the re-signed package alongside hashes per Collection Log. Stream device logs throughout (idevicesyslog or log collect --device on iOS; adb logcat -v threadtime on Android) so post-hoc reconstruction is unnecessary. Defang any URLs, package IDs, deep-link schemes, or endpoints that surface in the writeup (hxxp://, [.], [@]) and ship the package per Reporting, Packaging & Disclosure.


Android Security Testing​

Android Application Structure​

APK (Android Package) contents:

app.apk (ZIP file)
│
├── AndroidManifest.xml # App metadata, permissions, components
├── classes.dex # Dalvik bytecode (compiled Java/Kotlin)
├── resources.arsc # Compiled resources
├── res/ # Resources (images, layouts, strings)
│ ├── drawable/
│ ├── layout/
│ └── values/
├── lib/ # Native libraries (.so files)
│ ├── armeabi-v7a/
│ ├── arm64-v8a/
│ ├── x86/
│ └── x86_64/
├── assets/ # Raw asset files
├── META-INF/ # APK signature
│ ├── MANIFEST.MF
│ ├── CERT.RSA
│ └── CERT.SF
└── kotlin/ # Kotlin metadata (if Kotlin app)

Android Reverse Engineering​

Step 1: Obtain APK

# Method 1: Download from device (requires adb)
adb shell pm list packages | grep -i "example"
# Output: package:com.example.app

adb shell pm path com.example.app
# Output: package:/data/app/com.example.app-xxx/base.apk

adb pull /data/app/com.example.app-xxx/base.apk app.apk

# Method 2: Download from APK mirror sites
# APKMirror, APKPure, APKMonk — verify integrity by re-checking
# the signing certificate fingerprint against vendor's known cert
# (`apksigner verify --print-certs app.apk`).

# Method 3: Extract from Play Store (requires tools; gplaydl and apkeep's Play
# source sign in with a Google account: use a dedicated test account, never a personal one)
# - gplaydl (rehmatworks/gplaydl, Python 3.9+; v4 signs in with your own
# account and its README warns Google may flag or lock it) [verify 2026-11-08]
# - apkeep (EFForg/apkeep, Rust): Google Play by default (email + AAS token),
# APKPure behind an explicit flag, F-Droid with signature check; Huawei
# AppGallery support removed in 1.1.0 [verify 2026-11-08]
# - Aurora Store (anonymous Play client; not headless)

Step 2: Decompile APK with JADX

# Install JADX:
# https://github.com/skylot/jadx/releases

# Decompile APK to Java source:
jadx app.apk -d output_dir/

# Output structure:
# output_dir/
# ├── sources/ # Decompiled Java code
# │ └── com/example/app/
# │ ├── MainActivity.java
# │ ├── LoginActivity.java
# │ └── utils/
# └── resources/ # Decoded resources
# └── AndroidManifest.xml

# Or use JADX-GUI:
jadx-gui app.apk

Step 3: Analyze decompiled code

// Example: LoginActivity.java (decompiled)
public class LoginActivity extends AppCompatActivity {
private static final String API_KEY = "sk_live_abc123xyz"; // Hardcoded API key!

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}

public void loginUser(String username, String password) {
// Vulnerable: No input validation
String query = "SELECT * FROM users WHERE username='" + username + "'"; // SQL injection!

// Insecure: HTTP instead of HTTPS
String url = "http://api.example.com/login"; // Cleartext transmission!

// Weak crypto: MD5 for password hashing
String hashedPassword = MD5(password); // MD5 is broken!
}
}

Step 4: Decode with Apktool (for resources and smali)

# Install Apktool 3.x (latest 3.0.3; needs Java 8+) [verify 2026-11-08]:
# https://apktool.org/docs/install

# Decode APK:
apktool d app.apk -o app_decoded/

# Output structure:
# app_decoded/
# ├── AndroidManifest.xml # Decoded manifest (readable XML)
# ├── smali/ # Dalvik assembly code
# │ └── com/example/app/
# │ ├── MainActivity.smali
# │ └── LoginActivity.smali
# ├── res/ # Decoded resources
# │ ├── layout/
# │ ├── values/
# │ │ └── strings.xml # App strings
# └── original/ # Original files

# Analyze resources:
cat app_decoded/res/values/strings.xml

Step 5: Analyze AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">

<!-- Permissions (check for excessive permissions) -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Suspicious if the app has no contacts feature -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- VULNERABLE: debuggable="true" lets a debugger attach (must be false in production);
allowBackup="true" lets backup tooling copy app data (see table below) -->
<application
android:debuggable="true"
android:allowBackup="true"
android:networkSecurityConfig="@xml/network_security_config">

<!-- Exported = reachable by other apps. The launcher activity must be exported;
review every other exported activity/service/receiver/provider for missing
permission checks -->
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Key manifest checks:

CheckSecurity Impact
android:debuggable="true"Allows attaching debugger, inspecting memory
android:allowBackup="true"App data can be copied by backup tooling; for apps targeting Android 12 (API 31)+, adb backup excludes app data unless the app is also debuggable [verify 2026-11-08]
android:exported="true"Component accessible by other apps (intent hijacking)
Excessive permissionsPrivacy violation, larger attack surface
android:usesCleartextTraffic="true"Allows HTTP traffic (MITM risk); defaults to false for apps targeting API 28+, and the attribute is deprecated in API 37 in favour of the network security config [verify 2026-11-08]

Android Dynamic Analysis​

Step 1: Set up testing device

# Enable Developer Options on Android device:
# Settings → About Phone → Tap "Build number" 7 times

# Enable USB debugging:
# Settings → Developer Options → USB debugging (ON)

# Connect device via USB:
adb devices
# Output: List of devices attached
# ABC123XYZ device

# Root device (if not rooted; test device only, bootloader unlocked):
# Magisk (https://github.com/topjohnwu/Magisk): in the Magisk app, Install →
# "Patch firmware / image" → pick the stock boot.img (or init_boot.img /
# vendor_boot.img, whichever holds the ramdisk), then flash it from fastboot.
# Custom-recovery (TWRP) install is deprecated upstream [verify 2026-11-08]
PATCHED_IMG="magisk_patched-&lt;version&gt;_&lt;random&gt;.img" # file written by the Magisk app
fastboot flash boot "$PATCHED_IMG" # use init_boot / vendor_boot if you patched that image

# Magisk v31.1+: no interactive root prompt. Grant superuser ahead of time in the
# Magisk app's Superuser tab, including the Shell entry used by `adb shell`, or
# `su` (e.g. to start frida-server) gets no prompt to approve [verify 2026-11-08]
# v31.1 also removed app hiding (repackaging); Magisk now needs Android 7.0+
# Alternatives: KernelSU (https://github.com/tiann/KernelSU) or
# APatch (https://github.com/bmax121/APatch; ARM64, kernels 3.18-6.12)

Step 2: Install app

# Install APK:
adb install app.apk

# Or install from device:
adb shell pm install /sdcard/app.apk

# Verify installation:
adb shell pm list packages | grep com.example.app

Step 3: Explore app filesystem

# App data directory (requires root; on Magisk v31.1+ grant Shell first, see Step 1):
adb shell
su # Switch to root
cd /data/data/com.example.app/

# Directory structure:
# /data/data/com.example.app/
# ├── cache/ # Cached data
# ├── databases/ # SQLite databases
# │ └── app.db
# ├── shared_prefs/ # SharedPreferences (XML)
# │ └── settings.xml
# ├── files/ # App files
# └── lib/ # Native libraries

# Check for sensitive data:
cat shared_prefs/settings.xml
# Example:
# <string name="api_token">eyJhbGciOiJIUzI1...</string> # Stored token!

cat databases/app.db
# Or use sqlite3:
sqlite3 databases/app.db
# sqlite> .tables
# sqlite> SELECT * FROM users;

Step 4: Monitor logcat (logs)

# View real-time logs from the app's process (start the app first;
# logcat lines carry PIDs and tags, not package names) [verify 2026-11-08]:
adb logcat --pid="$(adb shell pidof -s com.example.app)"

# Common log leaks:
# - API keys, tokens
# - Passwords (if logged during debugging)
# - Sensitive user data (PII)

# Example log:
# D/LoginActivity: Logging in user: john@example.com with password: password123

Step 5: Intercept network traffic (see Network Analysis section)

Android Static Analysis (Automated)​

MobSF (Mobile Security Framework):

# Install MobSF (Docker); publish the web UI on localhost only:
docker pull opensecurity/mobile-security-framework-mobsf:latest
docker run -it --rm -p 127.0.0.1:8000:8000 opensecurity/mobile-security-framework-mobsf:latest

# Access: http://127.0.0.1:8000

# Upload APK → Automated scan:
# - Permissions analysis
# - Manifest security checks
# - Code analysis (hardcoded secrets, SQL injection, etc.)
# - Binary analysis
# - Report generation (PDF)

Beyond static triage, MobSF 4.6.x:

  • runs Android dynamic analysis on physical devices, rooted or stock (stock devices via its built-in Frida Gadget APK builder, split APK sets included) [verify 2026-11-08]
  • extracts Dart strings from a Flutter app's libapp.so [verify 2026-11-08]

The isolation rule in Lab Environment Requirements still applies: never expose the web UI to a routable network.

AndroBugs Framework, still cited in older guides, is an archived repository with no commits since November 2015 [verify 2026-11-08]; use MobSF for automated static triage instead.

Android Native Library Analysis​

Analyzing .so files (ARM/x86 native libraries):

# Extract native library from APK:
unzip app.apk "lib/arm64-v8a/*" -d lib_extracted/

# Analyze with Ghidra:
# File → Import File → lib_extracted/lib/arm64-v8a/libnative.so
# Language: AARCH64:LE:64:v8A [verify 2026-11-08]

# Look for:
# - Hardcoded strings (encryption keys, API endpoints)
# - JNI functions (Java Native Interface bridges)
# - Crypto implementations (custom or weak crypto)
# - Anti-tampering checks

# 16 KB page-size check: every LOAD segment should read "align 2**14" or higher
# (llvm-objdump ships in the NDK under toolchains/llvm/prebuilt/&lt;host&gt;/bin/)
llvm-objdump -p lib_extracted/lib/arm64-v8a/libnative.so | grep LOAD
# APK-level check (build-tools 35.0.0+); last line "Verification successful" = aligned
zipalign -c -P 16 -v 4 app.apk

On a 16 KB device, rule out page-size effects before reporting a crash as anti-tamper behaviour:

  • An app whose libraries are only 4 KB-aligned runs in page-size backcompat mode and shows a warning on first launch [verify 2026-11-08].
  • A GNU_RELRO segment whose end shares a 16 KB page with writable data crashes the app with SIGSEGV when that data is written [verify 2026-11-08].

JNI (Java Native Interface) reversing:

// Java side (loads native library):
public class NativeLib {
static {
System.loadLibrary("native"); // Loads libnative.so
}

// Native method declaration:
public native String decrypt(String encrypted);
}
// Native side (C/C++ in libnative.so):
#include <jni.h>

JNIEXPORT jstring JNICALL
Java_com_example_app_NativeLib_decrypt(JNIEnv *env, jobject thiz, jstring encrypted) {
const char *enc_str = (*env)->GetStringUTFChars(env, encrypted, 0);

// Hardcoded AES key (vulnerable!):
char aes_key[] = "0123456789ABCDEF0123456789ABCDEF";

// Decrypt with AES...
char *decrypted = aes_decrypt(enc_str, aes_key);

return (*env)->NewStringUTF(env, decrypted);
}

Modifying & Repackaging APKs​

Step 1: Decompile with Apktool

apktool d app.apk -o app_decoded/

Step 2: Modify smali code

# Edit app_decoded/smali/com/example/app/FeatureFlags.smali

# Original (debug menu compiled off):
.method public isDebugMenuEnabled()Z
.locals 1
const/4 v0, 0x0 # Return false
return v0
.end method

# Modified (flag forced on to reach the in-scope debug screen):
.method public isDebugMenuEnabled()Z
.locals 1
const/4 v0, 0x1 # Return true
return v0
.end method

The test is whether the app or its backend notices. A backend that trusts a client-side flag is a finding in any app; a tampered build that runs unchallenged is a finding when the engagement covers resilience (MASVS-RESILIENCE). MASTG documents the general workflow as MASTG-TECH-0038 (Patching) and MASTG-TECH-0039 (Repackaging & Re-Signing) [verify 2026-11-08].

Step 3: Rebuild APK

apktool b app_decoded/ -o app_modified.apk

Step 4: Sign APK (required for installation)

APK Signature Scheme v2 arrived in Android 7.0 and v3 in Android 9. Apps targeting Android 11 (API 30)+ that are signed only with v1 (jarsigner) can't be installed or updated on Android 11+ devices [verify 2026-11-08]. Use apksigner from build-tools, and align before signing: any change after apksigner signs the APK invalidates the signature.

# Generate keystore (one-time):
keytool -genkeypair -v -keystore my.keystore -alias mykey -keyalg RSA -keysize 2048 -validity 10000

# Align FIRST; -P 16 page-aligns uncompressed .so files to 16 KiB
# (the old 4 KiB -p flag is deprecated) [verify 2026-11-08]:
zipalign -P 16 -f -v 4 app_modified.apk app_aligned.apk

# Sign with apksigner (build-tools 24.0.3+); by default it picks the v1/v2/v3
# schemes from the APK's min/max SDK versions [verify 2026-11-08]:
apksigner sign --ks my.keystore --ks-key-alias mykey --out app_final.apk app_aligned.apk

# Verify signature scheme(s) attached:
apksigner verify --verbose --print-certs app_final.apk

# Install:
adb install app_final.apk

iOS Security Testing​

iOS Application Structure​

IPA (iOS App Store Package) contents:

app.ipa (ZIP file)
│
└── Payload/
└── App.app/
├── Info.plist # App metadata, bundle ID, permission-prompt strings
├── App (Mach-O binary) # Main executable (ARM64)
├── embedded.mobileprovision # Provisioning profile
├── _CodeSignature/ # Code signature
├── Frameworks/ # Embedded frameworks
├── Assets.car # Compiled assets
└── Base.lproj/ # Localized resources

iOS Reverse Engineering​

Step 1: Obtain IPA

# Method 1: Copy the app bundle from a jailbroken device over SSH
# (accounts and default passwords: iOS Dynamic Analysis, Step 2)
DEVICE_IP="&lt;device_ip&gt;" # test device address
ssh "mobile@$DEVICE_IP" # root@ on legacy rootful setups

# On the device (prefix sudo when logged in as mobile):
find /var/containers/Bundle/Application/ -maxdepth 2 -name "*.app"

# Back on the host:
APP_UUID="&lt;bundle_uuid&gt;" # directory name from the find above
scp -r "mobile@$DEVICE_IP:/var/containers/Bundle/Application/$APP_UUID/App.app" ./
# App Store binaries copied this way are still FairPlay-encrypted. cryptid 0 means
# not encrypted (Mach-O loader.h):
otool -l App.app/App | grep -A4 LC_ENCRYPTION_INFO

# Method 2: Decrypt on a jailbroken device (App Store apps are FairPlay-encrypted)
# frida-ios-dump (AloneMonkey/frida-ios-dump): Python 3.10+, Node.js/npm, and the
# same Frida release on host and device.
git clone https://github.com/AloneMonkey/frida-ios-dump.git
cd frida-ios-dump
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade -r requirements.txt
# npm install fetches the Objective-C bridge, which Frida 17 no longer bundles [verify 2026-11-08]
npm install
# Keep the device unlocked on USB with SSH running. dump.py reaches SSH port 22
# through Frida's USB channel, so there is no IP to configure and no iproxy.
# -p sets another SSH port, -u / -P another account (default root / alpine),
# -o the IPA name.
# Dopamine / Procursus rootless: root login is locked, so pass -u mobile -P "<mobile password>".
python dump.py -l # list installed apps
python dump.py com.example.app # writes the decrypted IPA to the current directory

# Other decryptors:
# - bagbak (ChiChou/bagbak, npm): deprecated by its author. Decryptors that launch
# the app (bagbak, and frida-ios-dump too) can be stopped by the target SDK or
# RASP; its README points to mremap_encrypted-based tools that don't run the
# app, e.g. unfaird (Lakr233/unfaird), which needs macOS 11.2.3 or earlier
# [verify 2026-11-08]
# - r2flutch (as0ler/r2flutch): decrypts iOS apps through r2frida and radare2 on
# the host; its README describes a general iOS app decryptor, nothing
# Flutter-specific [verify 2026-11-08]
# - Clutch (KJCracks/Clutch): legacy, last release 2.0.4 in August 2016

# Method 3: ipatool (majd/ipatool) downloads the store IPA with an Apple ID; no
# jailbreak needed. Use the dedicated test Apple ID. The account needs a license
# for the app: `--purchase` on download (or `ipatool purchase`) obtains one
# [verify 2026-11-08].
APPLE_ID="&lt;test_apple_id_email&gt;"
ipatool auth login -e "$APPLE_ID" # prompts for the password and 2FA code
ipatool download -b com.example.app -o ./app.ipa
# The IPA is FairPlay-encrypted: decrypt it with Method 2 before static analysis.

# Method 4: third-party IPA sites. Their files may have been modified, decrypted or
# re-signed by unknown parties. Prefer Methods 1-3; otherwise check the signature
# (codesign -dvvv) and provisioning profile and diff the binary against a
# store-acquired copy before trusting any result.

Step 2: Analyze with Hopper/Ghidra

# Extract IPA:
unzip app.ipa

# Main binary: Payload/App.app/App (Mach-O ARM64). Work on a decrypted copy
# (cryptid 0):
otool -l Payload/App.app/App | grep -A4 LC_ENCRYPTION_INFO

# Ghidra:
# File → Import File → Payload/App.app/App
# Analyze with AARCH64:LE:64:AppleSilicon processor

# Hopper (commercial; macOS, and Linux on 64-bit Intel): open Payload/App.app/App
# in the Hopper app. It decodes Swift names and extracts Objective-C selectors
# (https://www.hopperapp.com/) [verify 2026-11-08]

# IDA Pro (commercial; the IDA 9.5 docs call the binary `ida`):
ida Payload/App.app/App

Step 3: Class dump (Objective-C apps)

# class-dump (nygard/class-dump): Objective-C runtime metadata only; no upstream
# commits since March 2019 [verify 2026-11-08]. Run it on a decrypted binary:
class-dump -H -o headers/ Payload/App.app/App

# Example header:
# @interface LoginViewController : UIViewController
# - (void)loginWithUsername:(NSString *)username password:(NSString *)password;
# - (BOOL)validateLicense:(NSString *)license;
# @end

# Alternatives:
# - jtool2 (`jtool2 -d objc`): its author stopped supporting it in April 2024 and
# points to disarm (http://newosxbook.com/tools/disarm.html) [verify 2026-11-08]
# - Hopper / Ghidra / IDA: parse Objective-C metadata and demangle Swift names
# - Swift types at runtime: since Frida 17.21.0, ApiResolver('swift') finds Swift
# types, protocols and protocol conformances, not only functions [verify 2026-11-08].
# Attach to your test app (Swift runtime loaded) and query with globs:
# types:*ExampleApp*!* types in modules matching ExampleApp
# protocols:*ExampleApp*!* protocols in those modules
# conformances:ExampleApp.*!Swift.Encodable app types conforming to Encodable
# e.g. new ApiResolver('swift').enumerateMatches('types:*ExampleApp*!*')
# (types/protocols take module!name; conformances take type!protocol)

Step 4: Analyze Info.plist

# View Info.plist:
plutil -p Payload/App.app/Info.plist

# Or convert to XML:
plutil -convert xml1 Payload/App.app/Info.plist -o Info_readable.plist

# Key checks:
# - CFBundleIdentifier: Bundle ID
# - NSAppTransportSecurity: ATS settings (allows HTTP?)
# - CFBundleURLTypes: custom URL schemes (deep-link attack surface)
# - NS*UsageDescription: purpose strings for permission prompts
# (NSCameraUsageDescription, NSLocationWhenInUseUsageDescription, ...)
# - UIRequiredDeviceCapabilities: Required capabilities

# Entitlements are not in Info.plist. They are signed into the binary; development,
# ad-hoc and enterprise builds also carry them in embedded.mobileprovision (App Store
# builds have no profile). On a macOS host (Apple TN3125) [verify 2026-11-08]:
codesign --display --entitlements - --xml Payload/App.app | plutil -convert xml1 -o - -
security cms -D -i Payload/App.app/embedded.mobileprovision -o profile.plist

Info.plist security checks:

<!-- Example Info.plist -->
<dict>
<!-- App Transport Security (ATS) disabled (VULNERABLE!) -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/> <!-- Allows HTTP connections! -->
</dict>

<!-- URL schemes (deep linking attack surface) -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string> <!-- myapp:// URL scheme -->
</array>
</dict>
</array>
</dict>

iOS Dynamic Analysis​

Step 1: Jailbreak device

Jailbreak tooling is hardware- and iOS-version-pinned. Confirm support on the project's release page before buying or flashing hardware; the table lists what each project states.

ToolHardwareiOS versionsNotes
Dopamine 3.x (opa334/Dopamine)A8–A1315.0–18.7.1; also 26.0–26.0.1 on A12/A13Rootless, semi-untethered; latest release 3.0.13 (2026-11-03). The project advises 3.0.7 or later: 3.0–3.0.6 could panic during environment updates and corrupt a file under /var/jb [verify 2026-11-08]
Dopamine 3.xA14–A17, M1–M215.0–17.3.1The 3.0 notes say real devices stop at 17.3.1 for lack of an SPTM bypass on 17.4+ [verify 2026-11-08]
palera1n (stable v2.4)A8–A11, Apple T2iOS/iPadOS/tvOS 15.0 and latercheckm8 BootROM exploit, so never A12+; rootless or rootful (full-root) environment [verify 2026-11-08]
checkra1n (0.12.4 beta)iPhone 5s–iPhone X (A7–A11)12.0 and up, preliminary iOS 14Legacy; installs Cydia only [verify 2026-11-08]
unc0ver—unc0ver.dev lists 11.0–14.8Legacy, ships Cydia [verify 2026-11-08]
Taurine (1.1.7-3)—14.0–14.8.1Legacy [verify 2026-11-08]
  • Version gap: Apple's current release is iOS 27.2 (October 26, 2026). Apple's security-releases list jumps from iOS 18 to iOS 26, released on September 15, 2025 alongside iOS 18.7; there is no iOS 19–25 [verify 2026-11-08]. Dopamine's notes list 26.0–26.0.1 (A12/A13) as its newest real-device support, plus iOS 26.1 betas 1–3 since 3.0.5. Anything newer, including every iOS 27 build, has no public jailbreak listed in these projects; test current-iOS behaviour on a stock device.
  • Frida on iOS 26+: use Dopamine 3.0.10 or later with frida 17.19.0 or later; 3.0.10 fixed kernel panics when using Frida on iOS 26+ [verify 2026-11-08].
  • palera1n v3 flags: v3.0.0 is in beta (beta.3, 2026-10-18) while v2.4 stays the stable line. v3 renames -f/--fakefs to -f/--rootful, -v to -d (--debug-logging) and -S to -n (--no-colors) [verify 2026-11-08]. Check --help for the release you run.

Package managers: palera1n and Dopamine both ship Sileo and Zebra [verify 2026-11-08]. Cydia is the package manager of the legacy setups (checkra1n, unc0ver).

Post-jailbreak tools (install from Sileo or Zebra):

  • OpenSSH: remote access. Rootless jailbreaks install packages under the /var/jb prefix (Procursus builds rootless packages for /var/jb) [verify 2026-11-08].
  • Frida (frida-server): add Frida's repository https://build.frida.re (frida.re/docs/ios). Run the same release as the host frida CLI (see Lab Environment Requirements).
  • TLS pinning tests: on rootless rigs, start with Frida-based tooling such as objection's ios sslpinning disable, which hooks common networking frameworks (AFNetworking, NSURLSession) [verify 2026-11-08]. Method and pass/fail criteria: Bypassing Certificate Pinning.
  • SSL Kill Switch 3 (NyaMisty/ssl-kill-switch3): has a rootless build but no commits or releases since November 2023 (latest stable release v1.4); treat as legacy [verify 2026-11-08].
  • AppSync Unified (akemin-dayo/AppSync): installs ad-hoc signed, fakesigned, unsigned or expired IPAs [verify 2026-11-08].
  • Choicy (opa334/Choicy, maintained): per-app control of tweak injection, e.g. to keep tweaks out of the app under test when checking what its jailbreak detection reacts to [verify 2026-11-08].
  • A-Bypass: end of life; its README says the project "has reached the end" [verify 2026-11-08]. Jailbreak-detection testing: Root/Jailbreak Detection Bypass.

Lockdown Mode awareness (iOS 16+): if the test device has Lockdown Mode on (Settings → Privacy & Security → Lockdown Mode), Apple lists these effects among others: most message attachment types are blocked and links and link previews are unavailable; certain complex web technologies are blocked; incoming FaceTime calls are blocked unless you called that contact in the past 30 days; configuration profiles can't be installed and the device can't be enrolled in MDM (Apple: About Lockdown Mode) [verify 2026-11-08]. Turn it off on the test device, or a proxy CA delivered as a configuration profile won't install and WebView tests won't reflect default behaviour.

Step 2: SSH into device

# OpenSSH: install from Sileo or Zebra if the jailbreak's bootstrap lacks it.
DEVICE_IP="&lt;device_ip&gt;" # test device address; used in the steps below

# Accounts: legacy rootful setups log in as root. The Procursus rootless bootstrap
# (used by Dopamine) locks root password login: log in as mobile and use sudo.
# Default password for both: alpine [verify 2026-11-08]. Dopamine's settings
# also have a button to change the mobile password.
ssh "mobile@$DEVICE_IP" # root@ on legacy rootful setups

# IMPORTANT: Change default password!
passwd # the account you logged in as
passwd mobile # rootful setups, as root: the mobile user too

# Explore filesystem:
cd /var/mobile/Containers/Data/Application/
ls -la
# Each app has a UUID directory

# Find app by bundle ID:
find . -name "*.plist" -exec grep -l "com.example.app" {} \;

Step 3: Analyze app sandbox

# App data directory:
# /var/mobile/Containers/Data/Application/&lt;UUID&gt;/

# Documents/ # User documents
# Library/ # App data
# ├── Caches/ # Cached data
# ├── Preferences/ # User preferences (.plist files)
# └── Cookies/ # Cookies
# tmp/ # Temporary files

# Check for sensitive data:
APP_UUID="&lt;data_uuid&gt;" # directory found in Step 2
cd "/var/mobile/Containers/Data/Application/$APP_UUID/Library/Preferences/"

# View .plist files:
plutil -p com.example.app.plist

# Example (leaked token):
# "api_token" => "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Step 4: Analyze Keychain (requires tool)

# Keychain-Dumper: https://github.com/ptoomey3/Keychain-Dumper
# Its README: with no flags it dumps Generic and Internet passwords; -a adds
# identities, certificates and keys. On recent iOS releases it reads only the
# keychain access groups signed into it (the repo's updateEntitlements.sh grants it
# the entitlements available on the device), and some items are readable only
# while the device is unlocked [verify 2026-11-08].

# Copy to device:
scp keychain_dumper "mobile@$DEVICE_IP:/tmp/"

# Run on device (prefix sudo when logged in as mobile):
ssh "mobile@$DEVICE_IP"
cd /tmp
chmod +x keychain_dumper
./keychain_dumper # Generic + Internet passwords
./keychain_dumper -a # all item classes

# Example, a canary credential saved by your test account:
# Generic Password
# Service: com.example.app
# Account: tester@example.com
# Password: CANARY-KC-7f3a

# App-scoped alternative: objection's `ios keychain dump` lists the items of the
# app it is attached to [verify 2026-11-08].
# Record which items hold secrets; storage findings belong under
# Insecure Data Storage (see Common Mobile Vulnerabilities).

Step 5: Monitor system logs

# iOS apps log through Apple's unified logging system (os_log) [verify 2026-11-08].
# Stream it from the host over USB; nothing to install on the device:
idevicesyslog -p ExampleApp # libimobiledevice; -p filters by process, -m by string

# macOS alternatives: Console.app, or
# Xcode → Window → Devices and Simulators → Select device → Open Console
# On-device syslog packages from Sileo/Zebra install under /var/jb on rootless setups.

iOS Static Analysis (Automated)​

MobSF (supports iOS):

# Upload IPA to MobSF (same as Android):
# http://localhost:8000

# Automated analysis:
# - Binary analysis (strings, symbols)
# - Info.plist checks
# - Code signing verification
# - Entitlements analysis
# - Hardcoded secrets detection

# Dynamic analysis on a jailbroken iOS device: added in MobSF v4.5.1 as an early
# beta, tested on iPhone 6s and 8 with checkra1n and palera1n [verify 2026-11-08]

iMAS (iOS Mobile Application Security):

# https://github.com/project-imas/
# LEGACY: no commits in any iMAS repository since June 2017, most not since
# 2014-2016 [verify 2026-11-08]. Treat as historical reference, not current tooling.
# Modern equivalents:
# - Semgrep on app source (semgrep/semgrep-rules has a swift/ rule set) [verify 2026-11-08]
# - MobSF (also runs SAST passes on iOS source/IPA — see above)
# - r2 / Ghidra / IDA scripts for binary-side checks

Common Mobile Vulnerabilities​

Insecure Data Storage​

Android - SharedPreferences (plaintext):

<!-- /data/data/com.example.app/shared_prefs/settings.xml -->
<map>
<string name="username">john@example.com</string>
<string name="password">password123</string> <!-- PLAINTEXT! -->
<string name="api_token">sk_live_abc123</string>
</map>

Test: hook the SharedPreferences.Editor write methods (putString, putStringSet) while you exercise the app, then read the app's shared_prefs/ files on a rooted test device (MASTG-TEST-0287). Fail: credentials, tokens or personal data are written without being encrypted first.

Mitigation: keep secrets out of SharedPreferences where possible. Where a value must be stored, encrypt it with a key held in the Android Keystore (AndroidKeyStore provider), whose key material never enters the app process [verify 2026-11-08].

Google deprecated every API in androidx.security:security-crypto, including EncryptedSharedPreferences and MasterKeys, in 1.1.0-alpha07 (April 2025), "in favour of existing platform APIs and direct use of Android Keystore" [verify 2026-11-08]. An app that still uses it does encrypt its preferences; report the deprecated dependency, not plaintext storage.

iOS - NSUserDefaults (plaintext):

// Vulnerable (plaintext storage):
[[NSUserDefaults standardUserDefaults] setObject:@"password123" forKey:@"password"];

Mitigation:

// Store sensitive data in Keychain:
#import <Security/Security.h>

// Save to Keychain:
NSDictionary *query = @{
(__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrService: @"com.example.app",
(__bridge id)kSecAttrAccount: @"user_token",
(__bridge id)kSecValueData: [@"secret_token" dataUsingEncoding:NSUTF8StringEncoding]
};
SecItemAdd((__bridge CFDictionaryRef)query, NULL);

Insecure Communication​

Cleartext HTTP traffic:

// Vulnerable (Android):
URL url = new URL("http://api.example.com/login"); // HTTP!
HttpURLConnection conn = (HttpURLConnection) url.openConnection();

Mitigation:

// Use HTTPS:
URL url = new URL("https://api.example.com/login");

Cleartext is already disabled by default for apps targeting Android 9 (API 28) and higher [verify 2026-11-08]. For older targets, or to make the setting explicit, use a Network Security Config:

<?xml version="1.0" encoding="utf-8"?>
<!-- res/xml/network_security_config.xml -->
<network-security-config>
<base-config cleartextTrafficPermitted="false" /> <!-- Block HTTP -->
</network-security-config>

iOS - App Transport Security (ATS) bypass:

<!-- Vulnerable Info.plist (allows HTTP): -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/> <!-- BAD! -->
</dict>

Mitigation: remove NSAllowsArbitraryLoads; it defaults to NO, so ATS enforces HTTPS when the key is absent [verify 2026-11-08]. If a host really needs HTTP, scope the exception to that domain with NSExceptionDomains instead of disabling ATS globally.

Hardcoded Secrets​

API keys in code:

// Android (decompiled):
public class APIClient {
private static final String API_KEY = "sk_live_abc123xyz"; // Exposed!
private static final String SECRET = "mysecret";
}

Finding secrets:

# Android:
jadx -d output_dir app.apk
grep -r "api_key\|secret\|password\|token" output_dir/

# iOS:
strings Payload/App.app/App | grep -i "api\|key\|secret\|token"

Mitigation:

  • Store secrets server-side (fetch at runtime)
  • Build-time injection (environment variables, Gradle properties, xcconfig) keeps secrets out of source control, but the value still ships inside the binary
  • Obfuscate strings (minimal protection, not secure)

Weak Cryptography​

MD5/SHA1 for passwords:

// Vulnerable:
String hashedPassword = MD5(password); // MD5 is broken!

Weak encryption:

// Vulnerable (hardcoded key, ECB mode):
SecretKeySpec key = new SecretKeySpec("1234567890123456".getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); // ECB mode!

Mitigation:

// Hash passwords server-side with Argon2id (bcrypt only on legacy systems).
// For encryption, use AES-GCM with randomly generated keys:
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
keyGen.init(256);
SecretKey key = keyGen.generateKey();

Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] iv = cipher.getIV(); // Save IV for decryption
byte[] encrypted = cipher.doFinal(plaintext.getBytes(StandardCharsets.UTF_8));

SQL Injection (Mobile)​

Vulnerable SQLite query:

// Android:
String query = "SELECT * FROM users WHERE username='" + username + "'";
Cursor cursor = db.rawQuery(query, null); // SQL injection!

Test: trace untrusted input (UI fields, intent extras, deep-link parameters, content-provider URIs and selection arguments) to rawQuery() / execSQL() calls.

  • Pass: every query that takes such input uses ? placeholders with bound arguments.
  • Fail: input is concatenated into the SQL string. To confirm in your own test build, enter a lone ' in the field: an android.database.sqlite.SQLiteException in logcat (or a crash) confirms the concatenation. Stop there; the finding is the concatenation, not what the query can be made to return.
  • Impact is highest where the query sits behind an exported content provider or another IPC entry point (MASTG-TEST-0339; mitigation MASTG-BEST-0039).

Mitigation:

// Use parameterized queries:
String query = "SELECT * FROM users WHERE username=?";
Cursor cursor = db.rawQuery(query, new String[]{username});

Intent Hijacking (Android)​

Exported component without permission:

<!-- AndroidManifest.xml -->
<activity android:name=".PaymentActivity"
android:exported="true"> <!-- Accessible by other apps! -->
</activity>

Since Android 12, apps targeting API 31+ must declare android:exported explicitly on every activity, service or receiver with an intent filter, or they can't be installed [verify 2026-11-08]. An exported component in a current app is therefore a deliberate choice that still needs a reason and a guard.

Test: list the exported activities and their android:permission in the decoded manifest and inspect each one's code (MASTG-TEST-0364). Confirm each one that reaches sensitive functionality by starting it from outside the app with an explicit intent and a harmless marker extra:

# Test device and your authorized target app only
adb shell am start -n com.example.app/.PaymentActivity --es note CANARY-INTENT-001
  • Pass: the activity refuses to start (permission denial) or ignores the external caller.
  • Fail: it opens a sensitive screen or acts on the extras without going through the app's normal flow.

Also review PendingIntent creation: apps targeting Android 12 must give each one FLAG_MUTABLE or FLAG_IMMUTABLE (lint: UnspecifiedImmutableFlag) [verify 2026-11-08]. Report mutable PendingIntents and implicit base intents, which another app can modify or redirect (MASTG-TEST-0381).

Mitigation:

<!-- Require permission or set exported=false: -->
<activity android:name=".PaymentActivity"
android:exported="false"> <!-- Only accessible by app -->
</activity>

<!-- Or require custom permission: -->
<permission android:name="com.example.app.PAYMENT_ACCESS"
android:protectionLevel="signature" />

<activity android:name=".PaymentActivity"
android:permission="com.example.app.PAYMENT_ACCESS"
android:exported="true">
</activity>

Network Analysis​

HTTPS Interception (MITM Proxy)​

Setup Burp Suite for mobile (MASTG-TECH-0011 for Android, MASTG-TECH-0063 for iOS):

Step 1: Configure proxy

In Burp, open Settings → Tools > Proxy, click Add under Proxy Listeners, bind to any free port (8080 below) and set Bind to address to All interfaces [verify 2026-11-08].

# Find the IP address the device will use to reach Burp:
ip addr show # Linux
ipconfig # Windows

Step 2: Configure device proxy

Android: open the Wi-Fi network you test on, enter edit mode, and in the advanced settings set the proxy to manual: hostname = the Burp machine's IP, port = the listener port [verify 2026-11-08]. Menu names vary by Android version and vendor.

Android emulator: set the same proxy in the emulated device's Settings > Network & Internet > Wi-Fi (Google's "Android System Proxy", the one meant for inspecting app traffic). The emulator's extended-controls proxy and -http-proxy flag are meant for getting through network restrictions and tunnel traffic without HTTPS inspection; Burp notes some emulators may still need the emulator settings menu [verify 2026-11-08].

iOS: Settings → Wi-Fi → (i) next to the network → Configure Proxy: Manual → Server = the Burp machine's IP, Port = the listener port [verify 2026-11-08].

Step 3: Install Burp CA certificate

Android:

Export the CA from Burp: Settings → Tools > Proxy → Import / export CA certificate → Export → Certificate in DER format, saved as burp.der (type the .der extension yourself) [verify 2026-11-08].

Apps targeting Android 7.0 (API 24) and higher ignore user-installed CAs unless their network security config opts in (see Lab Environment Requirements), so most apps need the CA in the system store:

  • Rooted physical device (Magisk or KernelSU): install the NVISOsecurity/AlwaysTrustUserCerts module, install burp.der as a user certificate, and reboot. The module adds user certificates to the system store and handles both /system/etc/security/cacerts and the Android 14+ Conscrypt APEX store (/apex/com.android.conscrypt/cacerts/), on Android 7 to 16 [verify 2026-11-08].
  • Android emulator where adb root succeeds: copy the certificate into /system/etc/security/cacerts by hand, as below. Since Android 14 the active store can be the Conscrypt APEX instead, so a copy in /system may not take effect; there, use an Android 13 image or the module route [verify 2026-11-08].
# Convert DER to PEM:
openssl x509 -inform DER -in burp.der -out burp.pem

# System CA files are named &lt;subject_hash_old&gt;.0:
HASH=$(openssl x509 -inform PEM -subject_hash_old -in burp.pem | head -1)
mv burp.pem "$HASH.0"

# Emulator started with -writable-system (adb remount needs it):
adb root
adb remount
adb push "$HASH.0" /system/etc/security/cacerts/
adb shell chmod 644 "/system/etc/security/cacerts/$HASH.0"
adb reboot

Check after the reboot: the PortSwigger CA is listed under the system tab of Trusted credentials in the security settings (location varies by version).

iOS: with the proxy set, open http://burpsuite in the device browser and tap CA Certificate. Then Settings → Profile Downloaded → Install, and Settings → General → About → Certificate Trust Settings → enable full trust for the PortSwigger CA [verify 2026-11-08].

Step 4: Intercept traffic

In Burp, turn on Proxy > Intercept, launch the app and watch its requests. An intercepted request looks like:

POST /api/login HTTP/1.1
Host: api.example.com
Content-Type: application/json

{"username": "john", "password": "password123"}

Modify and forward requests from the intercept view.

Alternative, MobSF: since v4.6.4, MobSF's Android dynamic analysis captures traffic with a built-in mitmproxy and shows it in an authenticated live Web Traffic viewer [verify 2026-11-08]. Its Send to Fuzzer action replays captured flows through an upstream proxy such as Burp or ZAP.

Bypassing Certificate Pinning​

Certificate pinning validates server certificate against known cert/public key.

Detection:

# Android: search decompiled code and the network security config:
grep -r "CertificatePinner\|TrustManager\|PinningTrustManager\|pin-set" output_dir/

# iOS: Search in binary:
strings Payload/App.app/App | grep -i "pin\|certificate\|ssl"

Test (MASTG-TECH-0012 for Android, MASTG-TECH-0064 for iOS): with the proxy CA trusted as above, exercise every network feature of the app.

  • Pass (pinning works): connections to pinned hosts fail through the proxy (TLS handshake errors in Burp, a network error in the app) while other traffic is intercepted.
  • Fail: traffic to hosts that should be pinned (from the detection step or the app's design) appears decrypted in Burp with only the proxy CA trusted.
  • To reach the API behind the pin, disable pinning on your test device with the maintained tools below, in this order. Stop once the pinned traffic is visible, record which tool worked, and keep patched builds inside the lab.

1. objection (Frida-based, Android and iOS):

# Install objection:
pip3 install objection

# Non-rooted Android only: embed the Frida gadget (writes app.objection.apk)
objection patchapk -s app.apk
adb install app.objection.apk

# Attach by process name, PID or package/bundle identifier (list targets with frida-ps -Ua):
APP_ID="com.example.app"
objection -n "$APP_ID" start
# `objection explore` still runs on 1.12.x but is deprecated and hidden [verify 2026-11-08]

# Inside the objection REPL:
android sslpinning disable # iOS: ios sslpinning disable

On a rooted device with frida-server running, skip the patching step. On Linux and Windows, Frida 17.25.0 and later reach iOS devices through idund, a per-user daemon that holds the device's single CoreDevice tunnel and starts on first use [verify 2026-11-08].

2. Frida CodeShare (Android): akabe1/frida-multiple-unpinning (MASTG-TOOL-0140) covers more pinning implementations than objection's built-in hooks [verify 2026-11-08]. For in-house pinning that neither covers, follow the MASTG techniques above.

3. Xposed modules (Android, legacy): MASTG still lists TrustMeAlready and SSLUnpinning. TrustMeAlready is an archived Xposed module with no commits since September 2019, and ac-pm/SSLUnpinning_Xposed has had none since September 2016 [verify 2026-11-08]. MASTG now describes SSLUnpinning as an LSPosed module; check either against your target Android version before relying on it.

4. SSL Kill Switch (iOS jailbreak tweaks, legacy): SSL Kill Switch 2 (nabla-c0d3/ssl-kill-switch2, latest release 0.14 from December 2019) installs from Cydia on rootful jailbreaks only. SSL Kill Switch 3 (NyaMisty/ssl-kill-switch3) has a rootless build but no commits or releases since November 2023 [verify 2026-11-08]. On current jailbreaks start with objection (see iOS Dynamic Analysis).


Dynamic Instrumentation​

MASTG documents these methods as Method Hooking (MASTG-TECH-0043 for Android, MASTG-TECH-0095 for iOS) and Method Tracing (MASTG-TECH-0033) [verify 2026-11-08]. The examples use the Frida 17 JavaScript API. Instrument only apps and devices in scope.

Frida Basics​

Installation:

# Install Frida on computer:
pip3 install frida frida-tools
frida --version # frida-server on the device must be this same release

# Install frida-server on a rooted Android device. Release assets are xz-compressed:
# frida-server-&lt;version&gt;-android-&lt;arch&gt;.xz, arch = arm, arm64, x86 or x86_64 [verify 2026-11-08]
adb shell getprop ro.product.cpu.abilist # arm64-v8a -> arm64, armeabi-v7a -> arm
FRIDA_VERSION="$(frida --version)"
ARCH="arm64"
curl -LO "https://github.com/frida/frida/releases/download/${FRIDA_VERSION}/frida-server-${FRIDA_VERSION}-android-${ARCH}.xz"
unxz "frida-server-${FRIDA_VERSION}-android-${ARCH}.xz"

adb push "frida-server-${FRIDA_VERSION}-android-${ARCH}" /data/local/tmp/frida-server
adb shell "chmod 755 /data/local/tmp/frida-server"
# Magisk v31.1+: grant the Shell entry superuser first (Android Dynamic Analysis, Step 1)
adb shell "su -c '/data/local/tmp/frida-server &'" # detached as root; nohup if persistence needed

# Install Frida on iOS (jailbroken):
# Sileo / Zebra → Sources → add https://build.frida.re → install "Frida"
# (legacy Cydia repo URL is the same; Cydia itself is largely retired on rootless JBs)

A host/server major-version mismatch fails with a protocol error (see Lab Environment Requirements). On iOS 26 jailbreaks, check the Dopamine and Frida minimum versions in iOS Dynamic Analysis.

Listing processes:

# List processes on the USB device:
frida-ps -U

# Running apps only, with their identifiers:
frida-ps -Ua

# Output:
# PID Name Identifier
# ---- ----------- ---------------
# 1234 Example App com.example.app

Attaching to app:

# Spawn app with Frida:
frida -U -f com.example.app -l script.js

# Attach to the running app by identifier (-n NAME and -p PID also work):
frida -U -N com.example.app -l script.js

The frida REPL and frida-trace (frida-tools 14.0.0 and later) bundle the Java, Objective-C and Swift bridges, so the scripts below run as-is with -l. Frida 17 stopped bundling the bridges into its runtime, so agents loaded any other way (for example through the Python or Node.js bindings) must bundle the bridges they use [verify 2026-11-08].

Frida 17 changes that affect testing:

  • 17.0.0 removed the callback-style enumeration APIs and the static Module lookups (Module.findBaseAddress(), Module.findExportByName() and the rest). Use Process.enumerateModules(), which returns an array, and Process.getModuleByName(name).base [verify 2026-11-08]. Older scripts that call the removed APIs throw on 17.x.
  • 17.20.0 adopted ImHex's pattern language for describing native structs [verify 2026-11-08].
  • 17.21.0 taught the Swift ApiResolver to find types, protocols and conformances (query syntax in iOS Reverse Engineering, Step 3).
  • 17.25.0 maps agents into the target from outside on Linux (Android included) and Windows, as it already did on Apple platforms: no agent file on disk and no dlopen() call in the target [verify 2026-11-08].
  • 17.26.0: Stalker no longer writes below the target's stack pointer, and the pointer to its execution context in TLS is masked with a random per-process cookie [verify 2026-11-08].
  • MASTG-TEST-0341 (Android) and MASTG-TEST-0354 (iOS) fail an app when your hook runs and returns the expected data [verify 2026-11-08]. Because 17.25.0 and 17.26.0 change what an app can observe, that result can differ between Frida releases, so record the Frida version with the finding.
  • In November 2026 the bridges (frida-java-bridge, frida-objc-bridge) and frida-compile moved to the frida-packages GitHub organization; old URLs redirect [verify 2026-11-08].

Frida Scripting Examples​

1. Hooking Java methods (Android):

// Hook LoginActivity.loginUser() method
Java.perform(function() {
var LoginActivity = Java.use("com.example.app.LoginActivity");

LoginActivity.loginUser.implementation = function(username, password) {
console.log("[+] loginUser called!");
console.log(" Username: " + username);
console.log(" Password: " + password);

// Call original method:
var result = this.loginUser(username, password);
console.log(" Result: " + result);
return result;
};
});

If loginUser has overloads, pick one with .overload('java.lang.String', 'java.lang.String') before setting .implementation. On an overloaded method the plain assignment throws "has more than one overload" [verify 2026-11-08].

2. Root-detection checks (Android):

The test asks whether the app detects a rooted device at runtime (MASTG-TEST-0325) and how much effort its checks take to get past (MASTG-TECH-0144) [verify 2026-11-08].

  1. Observe. On a rooted test device, watch the class that holds the checks (often a helper with an isRooted() method) with objection, e.g. android hooking watch com.example.app.RootUtils --dump-return, or with frida-trace -j. Note which artifacts it probes: su paths, root-manager packages, build tags, writable system paths. The detection patterns are listed in Root/Jailbreak Detection Bypass.
  2. Try the maintained generic hooks: objection's android root disable hooks File.exists(), Runtime.exec(), String.contains() and similar calls, and alters results that point at root artifacts [verify 2026-11-08]. The iOS counterpart is ios jailbreak disable.
  • Pass: the checks run and react to the rooted device. Record each check and what triggers it.
  • Fail: no root-detection check is observed on a rooted device.
  • Report as a resilience observation: checks exist, but objection's generic hooks disable all of them.
  • Stop rule: once you have recorded which checks exist and whether the generic hooks defeat them, stop. Hand-written bypass hooks are out of scope unless the engagement explicitly covers resilience (MASVS-RESILIENCE).

3. Hooking Objective-C methods (iOS):

// Hook UIViewController viewDidLoad
if (ObjC.available) {
var UIViewController = ObjC.classes.UIViewController;
Interceptor.attach(UIViewController['- viewDidLoad'].implementation, {
onEnter: function(args) {
var controller = new ObjC.Object(args[0]);
console.log("[+] viewDidLoad called on: " + controller.$className);
}
});

// Hook specific class method:
var LoginVC = ObjC.classes.LoginViewController;
Interceptor.attach(LoginVC['- loginWithUsername:password:'].implementation, {
onEnter: function(args) {
var username = new ObjC.Object(args[2]).toString();
var password = new ObjC.Object(args[3]).toString();
console.log("[+] Login attempt:");
console.log(" Username: " + username);
console.log(" Password: " + password);
}
});
}

4. Listing modules and dumping memory:

// Frida 17: Process.enumerateModules() returns an array, and
// Process.getModuleByName() replaces the removed Module.findBaseAddress().
for (const m of Process.enumerateModules()) {
console.log("Module: " + m.name + " @ " + m.base + " (" + m.size + " bytes)");
}

// Hexdump the first 4 KB of a module. getModuleByName() throws if the module
// isn't loaded; findModuleByName() returns null instead.
const mod = Process.getModuleByName("libnative.so");
console.log(hexdump(mod.base, { length: 0x1000 }));

5. Tracing all function calls:

// Android - trace every method declared in a class, one hook per overload:
Java.perform(function() {
var LoginActivity = Java.use("com.example.app.LoginActivity");

var names = new Set(["$init"]); // $init = constructors
LoginActivity.class.getDeclaredMethods().forEach(function(method) {
names.add(method.getName());
});

names.forEach(function(name) {
if (!LoginActivity[name]) return;
LoginActivity[name].overloads.forEach(function(overload) {
overload.implementation = function() {
console.log("[+] Called: " + name);
return overload.apply(this, arguments); // original method
};
});
});
});

Without a script, frida-trace traces Java methods by glob with -j (--include-java-method), e.g. frida-trace -U -f com.example.app -j 'com.example.app.LoginActivity!*' [verify 2026-11-08]. objection's android hooking watch does the same from its REPL.

Objection (Frida REPL)​

Objection provides an interactive Frida REPL with common commands. Since release 1.12.0, search and watch take a pattern instead of the old search classes &lt;name&gt; and watch class &lt;name&gt; keywords, so commands copied from older guides no longer do what they say [verify 2026-11-08].

# Launch objection. -n takes a process name, PID or app identifier (frida-ps -Ua);
# put --spawn before `start` to launch the app fresh. -g and explore are deprecated.
APP_ID="com.example.app"
objection -n "$APP_ID" start

# Inside the objection REPL (patterns: &lt;class&gt;!&lt;method&gt;, * wildcards):
android hooking list classes # loaded classes
android hooking search com.example.app --only-classes # classes matching a pattern
android hooking list class_methods com.example.app.LoginActivity # declared methods
android hooking watch com.example.app.LoginActivity --dump-args --dump-return # every method
android hooking watch com.example.app.LoginActivity!loginUser --dump-args # one method

android sslpinning disable # see Bypassing Certificate Pinning
android root disable # see example 2 above

ios hooking list classes --ignore-native # Objective-C classes, Apple-framework prefixes (NS, CF, UI, _ …) filtered out
ios hooking search LoginViewController --only-classes
ios hooking watch LoginViewController --dump-args

memory dump all app-memory.dmp # rw- memory of the process, written to this file on the host

Bypassing Security Controls​

Root/Jailbreak Detection Bypass​

The snippets below show what apps check, so you can recognise the checks in decompiled code and in hook output. Test method, maintained tooling and pass/fail criteria: Frida Scripting Examples, example 2 (Android), and Testing jailbreak detection below (iOS).

Android root detection methods:

1. Check for su binary:

File suFile = new File("/system/xbin/su");
if (suFile.exists()) {
// Rooted!
}

2. Check for root apps (Magisk, SuperSU):

PackageManager pm = getPackageManager();
try {
pm.getPackageInfo("com.topjohnwu.magisk", 0);
// Magisk installed = rooted
} catch (PackageManager.NameNotFoundException e) {
// Not rooted
}

Magisk v31.1 removed app hiding (repackaging), and Magisk no longer reinstalls its app when it is missing, so a Magisk-rooted device may have no Magisk app installed at all [verify 2026-11-08]. KernelSU and APatch have their own manager apps. A package-name check on its own is a weak signal; say so in the report when it is the app's only root check.

3. Check build tags:

String buildTags = Build.TAGS;
if (buildTags.contains("test-keys")) {
// Custom ROM = likely rooted
}

iOS jailbreak detection:

1. Check for jailbreak package managers / artefacts — modern rootless JBs (palera1n, Dopamine) install to /var/jb/... rather than /, so well-written checks scan multiple paths:

NSArray *jbPaths = @[
@"/Applications/Cydia.app", @"/Applications/Sileo.app", @"/Applications/Zebra.app",
@"/var/jb/", @"/var/jb/Applications/Sileo.app",
@"/private/var/lib/apt", @"/usr/sbin/sshd", @"/bin/bash",
@"/etc/apt", @"/usr/libexec/ssh-keysign"
];
for (NSString *p in jbPaths) {
if ([[NSFileManager defaultManager] fileExistsAtPath:p]) { /* jailbroken */ }
}

2. Check for write access to /private:

if ([[NSFileManager defaultManager] isWritableFileAtPath:@"/private"]) {
// Jailbroken
}

3. Fork() restriction:

if (fork() >= 0) {
// Jailbroken (sandboxed apps can't fork)
}

4. ptrace(PT_DENY_ATTACH) / sysctl debugger check — canonical iOS anti-debug primitive; often paired with JB detection in the same routine. ptrace is not part of the public iOS SDK, so apps resolve it at runtime with dlsym. If the process is already being traced, the call makes it exit; otherwise later attach attempts fail (MASTG-KNOW-0085) [verify 2026-11-08]. The sysctl variant is under Debugger Detection Bypass.

#define PT_DENY_ATTACH 31

typedef int (*ptrace_ptr_t)(int request, pid_t pid, caddr_t addr, int data);

ptrace_ptr_t ptrace_ptr = (ptrace_ptr_t)dlsym(RTLD_DEFAULT, "ptrace");
ptrace_ptr(PT_DENY_ATTACH, 0, 0, 0);

Testing jailbreak detection (iOS): MASTG has a static test (MASTG-TEST-0240, Jailbreak Detection in Code), a runtime test (MASTG-TEST-0241) and the technique MASTG-TECH-0152 [verify 2026-11-08].

  1. Observe. On a jailbroken test device, watch the class that holds the checks with objection (ios hooking watch &lt;class&gt; --dump-return) or with frida-trace. Note which artifacts it probes: the paths above, write access outside the sandbox, fork(), debugger state.
  2. Try the maintained generic hooks: objection's ios jailbreak disable hooks NSFileManager's fileExistsAtPath for common jailbreak paths, and fork() [verify 2026-11-08]. MASTG names objection as the quickest automated option.
  • Pass: the checks run and react to the jailbroken device. Record each check and what triggers it.
  • Fail: no jailbreak detection is implemented. The runtime test is not exhaustive, so confirm with the static test before reporting.
  • Report as a resilience observation: checks exist, but objection's generic hooks disable all of them.
  • Stop rule: once you have recorded which checks exist and whether the generic hooks defeat them, stop. Hand-written bypass hooks and binary patches are out of scope unless the engagement explicitly covers resilience (MASVS-RESILIENCE).

Attestation APIs (Play Integrity / App Attest / DeviceCheck)​

Modern apps increasingly defer integrity verdicts to platform-attested signals rather than rolling their own root/JB checks. A verdict is only as strong as the server that checks it, so most of the testing is about how the backend binds, verifies and acts on it.

PlatformAPINotes
AndroidPlay Integrity APIReplaced SafetyNet Attestation. Returns device, app and account verdicts (deviceIntegrity, appIntegrity, accountDetails) in an encrypted token that the app's server decrypts through Google's servers; classic requests can also be decrypted and verified locally on a secure server [verify 2026-11-08].
AndroidSafetyNet (legacy)Deprecated in 2022 and fully turned down in January 2025 [verify 2026-11-08]. An app that still calls it gets no verdict; check what it does instead (fail-open is a finding).
iOSApp AttestiOS 14+. Key created in the Secure Enclave and certified by Apple's servers; the app sends the attestation, and later signed assertions with its requests, to its own server, which verifies them [verify 2026-11-08].
iOSDeviceCheckOlder, lighter: the app's server sets and queries two binary digits per device, stored by Apple [verify 2026-11-08].

Play Integrity verdicts and request types: besides the device, app and account verdicts, the API can return appAccessRiskVerdict (apps running that could capture the screen, display overlays or control the device), playProtectVerdict, recentDeviceActivity (how many integrity tokens the app requested on the device in the last hour, as a level) and deviceRecall (beta; a device the app flagged before, even after a reinstall or reset) [verify 2026-11-08].

On Android 13+, MEETS_STRONG_INTEGRITY requires MEETS_DEVICE_INTEGRITY plus security updates from the last year on all partitions; on Android 12 and lower it only requires hardware-backed proof of boot integrity, so read it together with the device's SDK version [verify 2026-11-08].

Standard requests carry a requestHash and leave replay mitigation to Google Play; classic requests carry a nonce that the developer's server logic must check. Google advises against caching verdicts: a cached verdict from a good device can be reused for abuse ("proxying") [verify 2026-11-08].

Common testing notes:

  • Verify whether the app fails-closed (refuses to run on non-attested device) or fails-open (only blocks specific actions). Report fails-open as a finding.
  • Server-side verdict consumption is where most real bugs live: missing or reused nonce/requestHash, replay window too long, accepting verdicts without checking package name / bundle ID, accepting expired tokens. Google's sample server check rejects a token unless requestPackageName and requestHash match the original request and timestampMillis is inside an allowed window [verify 2026-11-08]. Test with intercepted/replayed verdicts in Burp/Caido.
  • App Attest's unsupported-device path: Apple tells apps to skip the service on devices that fail its compatibility check, and the server then can no longer require assertions [verify 2026-11-08]. If the server takes the app's word that the device is unsupported, attestation is optional in practice; report it.
  • If the app evaluates the verdict on the device instead of on its server, a hook on that decision changes the outcome. Apple's App Attest guide gives the reason for server-side checks: the app's own logic can't be trusted to verify the result. Report client-side verdict evaluation as a finding.
  • A passing device verdict is not proof of an unmodified device. On Android 13+, MEETS_DEVICE_INTEGRITY means hardware-backed proof of a locked bootloader and a certified manufacturer image, and an empty device verdict points to signs of attack such as API hooking [verify 2026-11-08]. Treat the device verdict as one signal and test the server-side checks above.
    • Older devices are weaker: Play Integrity Fork (osm0sis/PlayIntegrityFork) is a Zygisk module that says it fixes MEETS_DEVICE_INTEGRITY for the Android <13 deviceRecognitionVerdict [verify 2026-11-08].

Debugger Detection Bypass​

Android debugger detection:

// Check if debugger attached:
if (Debug.isDebuggerConnected()) {
// Debugger detected
}

// Check debuggable flag:
if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
// App is debuggable
}

iOS debugger detection:

// Check for debugger via sysctl:
#include <sys/sysctl.h>

int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()};
struct kinfo_proc info;
size_t size = sizeof(info);
memset(&info, 0, sizeof(info));
sysctl(mib, 4, &info, &size, NULL, 0);

if (info.kp_proc.p_flag & P_TRACED) {
// Debugger attached
}

Test (MASTG-TEST-0353 for Android, MASTG-TEST-0402 for iOS): hook the debugging-detection APIs above, plus ptrace on iOS, exercise the app, and attach a debugger where your setup allows [verify 2026-11-08].

  • Pass: the checks run in the release build, before or during security-relevant flows and not only once at startup, and the app reacts when a debugger is attached (warning, restricted access, termination, reauthentication or a backend risk signal).
  • Fail: no debugging-detection call is observed at runtime. This shows whether checks are present, not how robust they are.
  • Patching the checks out or hooking them is a resilience exercise; do it only when the engagement covers MASVS-RESILIENCE.

Emulator/Simulator Detection Bypass​

Android emulator detection:

// Check for emulator properties (more values in MASTG-KNOW-0031):
String brand = Build.BRAND; // starts with "generic" on many emulator images
String device = Build.DEVICE; // starts with "generic" on many emulator images
String model = Build.MODEL; // e.g. "sdk", "google_sdk", "Android SDK built for x86_64"
String hardware = Build.HARDWARE; // "goldfish" or "ranchu" on the Android emulator

// Check for Genymotion:
if (Build.PRODUCT.contains("vbox")) {
// Genymotion emulator
}

Test (MASTG-TEST-0351): run the app on an emulator, hook the property reads and other emulator-detection checks, and exercise the app [verify 2026-11-08].

  • Pass: emulator checks are observed and the app reacts to them.
  • Fail: no emulator-detection check is observed. As with debugger checks, this shows presence, not robustness.
  • If the app refuses to run on the emulator, continue the remaining tests on a physical test device rather than spoofing emulator properties.

Automated Testing​

Mobile App Scanners​

QARK (Quick Android Review Kit): LinkedIn's scanner is legacy: the last PyPI release is 4.0.0 from February 2019, and the repository has had no commits since April 2019 [verify 2026-11-08]. Its rules predate current Android releases; use MobSF for current automated triage.

# Install QARK:
pip3 install qark

# Analyze APK:
qark --apk app.apk

# Output: Vulnerability report (manifest issues, code vulnerabilities, etc.)

MobSF (Mobile Security Framework): setup and static triage are in Android Static Analysis (Automated) and iOS Static Analysis (Automated). Current releases cover:

  • static analysis of APKs and IPAs, and since v4.6.4 of standalone Android .dex files [verify 2026-11-08]
  • Android dynamic analysis, since v4.6.2 also on physical devices (rooted or stock), and jailbroken-iOS dynamic analysis as an early beta since v4.5.1
  • a built-in mitmproxy traffic viewer with replay through Burp or ZAP (see HTTPS Interception)
  • report generation

IPC Attack Surface (Drozer)​

Drozer (Android IPC attack-surface assessment):

Drozer's upstream is Reversec Labs (ReversecLabs/drozer; the old WithSecureLabs/drozer URL redirects there), and its README calls the current Python 3 code a beta of a rewritten drozer in which building custom agents crashes the client [verify 2026-11-08]. Commands and flags can differ between forks and older guides, so check them against the current README and the console's help.

# Install the drozer console (the README prefers pipx; pip also works):
pipx install drozer

# Install the agent on the test device
# (APK from https://github.com/ReversecLabs/drozer-agent/releases/latest):
adb install drozer-agent.apk

# In the agent app: Embedded Server → Enable. The agent listens on all interfaces
# on port 31415, so keep the device on the lab network and connect over USB:
adb forward tcp:31415 tcp:31415
drozer console connect

Inside the drozer console:

dz> run app.package.attacksurface com.example.app
Attack Surface:
3 activities exported
2 broadcast receivers exported
0 content providers exported
1 services exported

dz> run app.activity.info -a com.example.app
dz> run app.activity.start --component com.example.app com.example.app.PaymentActivity --extra string note CANARY-INTENT-001

Feed the exported components into the Intent Hijacking (Android) test: the harmless marker extra and the pass/fail criteria there apply to app.activity.start too.


Tools Reference​

Android Tools​

ToolPurposePlatform
JADXAPK decompiler (DEX to Java)Win/Linux/macOS
ApktoolAPK decoder/rebuilder (smali); current line 3.x (apktool.org)Win/Linux/macOS
apksigner / zipalignv2/v3/v4 signing + alignment (zipalign -P 16), build-toolsWin/Linux/macOS
MobSFAutomated security testing (SAST + dynamic, including physical devices)Web-based
Frida + frida-serverDynamic instrumentation (Frida 17 API; host CLI and server on the same release)Win/Linux/macOS
ObjectionFrida REPL for mobile (objection -n &lt;target&gt; start)Win/Linux/macOS
r2fridaRadare2 ↔ Frida bridgeWin/Linux/macOS
Drozer (ReversecLabs/drozer)Android IPC / attack-surface assessment (Python 3 beta)Win/Linux/macOS
apkeep / gplaydlAPK acquisition (apkeep: Google Play, F-Droid, APKPure; gplaydl: Google Play)Linux/macOS
AndroBugsStatic analyzer; archived, no commits since November 2015 (use MobSF) [verify 2026-11-08]Linux
QARKQuick security scanner (legacy; last release February 2019) [verify 2026-11-08]Linux
adbAndroid Debug BridgeWin/Linux/macOS
Magisk / KernelSU / APatchRoot frameworks (KernelSU and APatch are kernel-based; APatch is ARM64-only)Android device

iOS Tools​

ToolPurposePlatform
frida-ios-dumpDecrypt App Store IPAs (FairPlay → plaintext Mach-O); bagbak is deprecated by its authorLinux/macOS + JB device
ipatoolDownload encrypted IPA from App Store via Apple IDLinux/macOS
ClutchLegacy IPA decryptor (last release 2.0.4, August 2016)iOS (jailbroken)
class-dumpExtract Objective-C headers (legacy; Swift unsupported)macOS/Linux
jtool2Mach-O analysis (codesign, entitlements, Obj-C metadata); unsupported by its author since April 2024, who points to disarmmacOS/Linux
HopperDisassembler/decompiler (commercial; hopperapp.com)macOS/Linux (64-bit Intel)
MobSFAutomated security testing (jailbroken-device dynamic analysis in early beta)Web-based
Frida + frida-serverDynamic instrumentation (iOS 26+: Dopamine 3.0.10+ with frida 17.19.0+)Win/Linux/macOS
ObjectionFrida REPL for mobileWin/Linux/macOS
r2fridaRadare2 ↔ Frida bridgeWin/Linux/macOS
SSL Kill Switch 3Pinning-bypass tweak with a rootless build; no commits or releases since November 2023 (legacy)iOS (Sileo/Zebra)
Keychain-DumperExtract Keychain itemsiOS (jailbroken)
Dopamine 3.x / palera1n / checkra1nJailbreak (matrix in iOS Dynamic Analysis; checkra1n is legacy)macOS/Linux + iOS device
libimobiledevice (idevicesyslog, ideviceinstaller, idevice_id)Non-JB device interaction & log streamingLinux/macOS

Multi-Platform Tools​

ToolPurposePlatform
Burp SuiteHTTPS interception/fuzzingWin/Linux/macOS
GhidraBinary analysis (ARM/x86)Win/Linux/macOS
IDA ProDisassembler (commercial)Win/Linux/macOS
FridaRuntime hooking (17.x API, see Dynamic Instrumentation)Win/Linux/macOS
Radare2RE frameworkWin/Linux/macOS
WiresharkNetwork traffic analysisWin/Linux/macOS

Learning Resources​

Documentation​

Books​

All four predate Play Integrity, App Attest and the Frida 17 API; use them for fundamentals and MASTG for current techniques.

  • Mobile Application Penetration Testing by Vijay Kumar Velu (Packt, 2016)
  • Android Hacker's Handbook by Joshua J. Drake et al. (Wiley, 2014)
  • iOS Hacker's Handbook by Charlie Miller et al. (Wiley, 2012)
  • The Mobile Application Hacker's Handbook by Dominic Chell et al. (Wiley, 2015)

Online Courses​

Practice Apps​


Analysis:

Pentesting & Security:

Methodology & Authorization:


Version: 1.2 Last Updated: 2026-11-08 Review Frequency: Quarterly (mobile platform APIs, jailbreak tooling, and SSL-pinning bypass primitives churn quickly)