Mobile Application Security

Securing and testing iOS and Android apps: a client you don’t control, running on a device the attacker may own, talking to a backend that is the real crown jewel.

What it is

Mobile appsec covers the app binary, its on-device data, its IPC and link-handling edges, its embedded browsers, and the API it talks to. The discipline exists because a mobile app ships its logic to the attacker:

  • Binaries decompile (jadx for DEX; stock iOS binaries resist more, but FairPlay now falls to offline IPA decryption with Unfairplay) and secrets come out with them — a 2025 study of ~156,000 apps found 71% carried at least one hardcoded secret (815,000 unique secrets, many live), which passed both App Store and Play review (Qualysec, Guardsquare).
  • Every client-side check — pinning, root/jailbreak detection, RASP, biometric booleans — runs on hardware the attacker owns and can be rewritten with Frida.
  • The device itself is often hostile: over 50% of devices run an outdated OS at any time, sideloaded apps sit on 23.5% of enterprise devices, and over 60% of top third-party SDKs ship as precompiled binaries that SCA can’t read (Zimperium 2025).

The governing rule follows: the client is untrusted; enforce security server-side. Most high-impact mobile bugs are either the backend trusting the client (an API that trusts the account ID the app sends — OWASP API1, see BOLA in APIs) or an IPC/link/WebView edge where attacker data crosses into privileged context (Atlant Security, "Only as secure as its API").

Core concepts

Platform models.
| | Android | iOS |
|---|---|---|
| Isolation | Per-app UID + private data dir; SELinux untrusted_app domain | Sandbox; containers brokered by containermanagerd |
| Hardware root | TEE/StrongBox, hardware-backed Keystore, Verified Boot | Secure Enclave, secure boot, Signed System Volume |
| Data at rest | Keystore; Jetpack DataStore + Tink (EncryptedSharedPreferences deprecated) | Keychain accessibility classes; Data Protection classes tied to passcode |
| Code integrity | APK signing; re-signing enables repackaging | Code signing + FairPlay DRM (now offline-decryptable) |
| Main app-level bug sources | Exported components, intents, ContentProviders, WebView | Keychain misuse, URL schemes / Universal Links, WKWebView |
| Attestation | Play Integrity / key attestation (keyboxes, RKP) | App Attest |
| Ecosystem risk | Fragmentation, OEM additions, slow patching | Concentrated in zero-day/zero-click chains with low runtime visibility |

Promon’s comparison frames both platforms around the same mitigations — app signing, encrypted code, W^X, no dynamic executable maps, pointer tagging, sandboxing, kernel protections, device integrity — and notes app stores are “cultural protection, not a technical defense” given third-party stores (DMA) and sideloading (Promon Q1 2025, Apple Platform Security).

Trust edges. Inbound URLs and intents are attacker input: custom schemes and unverified deep links are claimable by any app; App Links (autoVerify + assetlinks.json) and Universal Links (AASA + Associated Domains) are the verified forms — see Mobile OAuth and Deep Link Attacks. WebViews bridge web content to native capability — see WebView Vulnerabilities.

Resilience vs. security. Obfuscation, anti-tamper, detection and RASP are MASVS-RESILIENCE controls: they raise reversing cost, they don’t guarantee integrity. Real assurance moves to the server (authZ, hardware attestation with revocation) — and even attestation fails when keyboxes leak (Jailbreak and Root Detection Bypass).

Standards. The OWASP Mobile Top 10 (2024: M1 Improper Credential Usage … M10 Insufficient Cryptography) says what to worry about; OWASP MAS says how to verify — MASVS (requirements: STORAGE, CRYPTO, AUTH, NETWORK, PLATFORM, CODE, RESILIENCE), MASWE (weakness list) and MASTG (techniques, tools, test cases such as MASTG-TEST-0022 for pinning and MASTG-TEST-0070 for Universal Links) (OWASP MAS).

How to approach it

The Atlant Security engagement shape is a good default — “the same six questions, different mechanisms” on each platform:

  1. Scope and inventory. Both platforms if shared code (Flutter, React Native, .NET MAUI — one bug hits both), every backend endpoint and SDK, rules of engagement for the live API.
  2. Setup and traffic capture. Rooted/jailbroken device, emulator (Magisk + frida-server, works on Apple Silicon) or Corellium; proxy in place. Expect to defeat pinning and detection first — they gate the rest (Certificate Pinning Bypass, Jailbreak and Root Detection Bypass).
  3. Static analysis. jadx/apktool/Ghidra on Android, class-dump/Hopper/radare2 on iOS, MobSF/mobsfscan for breadth: secrets, endpoints, crypto, manifest/Info.plist config, third-party code.
  4. Dynamic analysis. Frida/Objection hooks on pinning, detection, biometrics, crypto and business logic; inspect on-device storage, logs, backups, clipboard.
  5. Attack-surface mapping. Exported components and intent filters, CFBundleURLSchemes/Associated Domains and AASA/assetlinks.json, WebView settings and bridges, ContentProviders, auth flows.
  6. Network and API testing. Every request through the proxy: object- and function-level authZ, rate limits, and endpoints the app never calls (API Security).
  7. Chain and report. Turn findings into paths (a readable token → an account; a bypassed check → exported data); map to MASVS and the Mobile Top 10; push trust-related fixes server-side.

Key techniques

  • Local data review (Android App Security, iOS App Security) — refresh tokens in SharedPreferences/UserDefaults, plaintext logs (logcat), allowBackup=true, keyboard/screenshot/web caches; Android 12’s clipboard toast can be suppressed without permission (Won’t Fix) (SharedPreferences, logging, clipboard, EncryptedSharedPreferences).
  • Secrets in the binary — third-party keys, request-signing HMAC secrets, staging endpoints; see Hardcoded Secrets and Secret Scanning.
  • IPC and component abuse (Android App Security) — exported Activities/Services/Receivers forwarding attacker data, ContentProviders building SQL from caller input (SQL Injection), FileProvider root-scoped <paths>, dynamic code loading + path traversal → RCE.
  • Deep links, intent redirection and mobile OAuth (Mobile OAuth and Deep Link Attacks) — unvalidated server/URL parameters in links, intent forwarding under the app’s identity, ASWebAuthenticationSession + prompt=none auth-code theft bypassing PKCE, AASA path leakage and weak continueUserActivity validation. Cross-topic: OAuth 2.0 Vulnerabilities, Account Takeover.
  • WebView review (WebView Vulnerabilities) — addJavascriptInterface reflection to Runtime, file/universal access settings, host-only URL checks (scheme ignored), loadDataWithBaseURL UXSS, auth headers injected into every WebView request. Cross-topic: Cross-Site Scripting.
  • TLS interception (Certificate Pinning Bypass) — the layered Android trust problem (user CAs ignored since 7, APEX trust store in 14, CT required for API 37 on 17), app-level pinners, and Flutter’s own BoringSSL stack that ignores proxy and system config.
  • Instrumentation (Frida) — Interceptor/Stalker and the Java/ObjC bridges; injected, embedded (Gadget) and preloaded modes; Frida 17 removed bundled bridges from GumJS; 17.27 attaches to running debuggable apps on non-rooted devices via JDWP.
  • Resilience assessment (Jailbreak and Root Detection Bypass) — what root/jailbreak, anti-debug, anti-Frida and emulator checks look for; how commercial RASP scores weighted signals; where attestation is the real control and how leaked keyboxes and boot-state nuance undermine it.
  • Client-side authZ and biometrics — a biometric prompt that returns a boolean is decided by whoever hooks the callback (on iOS, replacing the reply block of -[LAContext evaluatePolicy:localizedReason:reply:]); the fix is a Keystore/Secure Enclave key released only on success, with the server verifying a signed challenge (evilcorp-ios).
  • Token lifecycle and mobile→API trust — HTTPS, encrypted token storage and valid JWT signatures can coexist with weak authorization; test refresh-token handling and backend trust in the app’s claims against RFC 9700 and RFC 10017 (Aug 2026, browser-based OAuth BCP) (partial article) (Rebline; Mobile OAuth and Deep Link Attacks).
  • Fuzzing closed-source native libraries on device — LibAFL Frida mode runs fuzzer, harness and vendor .so in one process with Stalker-injected edge coverage, CmpLog and binary-level ASan, on an unrooted phone as the shell user; see Frida. Backend IDOR via the app’s own IDs: Broken Access Control, Insecure Direct Object Reference.
  • Side channels — keyboard caches on credential fields without textNoSuggestions, credentials in logcat, OTPs pushed to the global clipboard, temp files that outlive the session, and credentials on external storage that survives uninstall. AndroGoat walks all of them, plus client-held isAdmin flags flipped at runtime and biometric callbacks redirected to success AndroGoat.

Tools

NeedToolNotes
Static + dynamic scanningMobSFAPK/IPA/APPX static, Android/iOS dynamic, REST API + CLI for CI; Docker quick setup (MobSF)
Source SASTmobsfscansemgrep/libsast rules for Java, Kotlin, XML, Swift, ObjC, Cordova/Capacitor/Expo; JSON/SARIF/SonarQube output; mobsfscan <src> in CI (e.g. CWE-295, CWE-532) (mobsfscan)
Android REjadx, apktool, GhidraDEX→Java; native .so via JNI; ILSpy for .NET MAUI (Bishop Fox’s mauidll)
iOS REclass-dump, Hopper, Ghidra, radare2/r2fridaCorellium for virtualized iOS/Android and CVE reproduction
InstrumentationFrida, Objection, GrapefruitGrapefruit: Frida web UI with crypto/Keychain/SQLite/WebView inspection, Flutter and React Native support, deliberately no built-in RASP bypasses
InterceptionBurp/ZAP, mitmproxy, HTTP Toolkit, HiznHizn: one-click Android HTTPS interception, Burp-style workbench + static APK analyzer
Device consoleLoupeWebUSB console in Chromium: screen mirror, logcat, file/SQLite browser, Frida server deployment, no local adb needed
IPC testingDrozer, adb am startExported components and deep links
APK evidence + script generationFridexaLocal web app: apktool + JADX, redacted secret/PII/config findings with file:line snapshots, app-specific Frida scripts (observe-only or bypass, OkHttp/Retrofit/URLConnection/WebView URL capture, Burp proxying), runtime-log parsing and optional local-LLM revision Fridexa
Training target (iOS)evilcorp-iosSwiftUI iOS 16+ lab with 30 scenarios mapped to MASVS v2, MASWE and CWE (storage, Keychain, biometrics, pinning, anti-debug), with Frida/LLDB walkthroughs jankesec
Native library fuzzingLibAFL Frida modeCoverage-guided fuzzing of closed-source Android .so on stock devices; ~6k exec/s per core Mobile Hacking Lab
Training targetOWASP AndroGoatKotlin app with 33 documented findings across storage, side channels, WebView, exported components, secrets, network and build flags AndroGoat

The 42gears guide lists the same core set (MobSF, Frida, ZAP, Burp, Drozer, QARK, Objection) against MASVS (42gears).

Pitfalls

  • Treating the client as a boundary. Pinning, detection, request signing with a shipped secret, and biometric booleans are speed bumps; findings that hinge on them should be reported as server-side trust failures.
  • Scanner-only assessments. Atlant notes the recurring attack paths are mostly invisible to static scanners — the code compiles cleanly and the weakness is in what the app trusts.
  • Stopping at “can’t intercept.” Flutter traffic shows up as a generic “no internet” while Crashlytics decrypts; individual unpinning tools each failed in reported cases until every validation path was covered (Flutter interception).
  • Stale tooling. Frida 17 broke scripts relying on bundled bridges and Module.getSymbolByName; Android 17 CT breaks system-CA interception.
  • Ignoring third-party code. Defaults in libraries and SDKs are the bug: image-cropper FileProvider, EngageLab intent redirection, precompiled SDKs with no SBOM (Software Supply Chain Security).
  • Checking host, not scheme. WebView and deep-link validators that check host but accept javascript:, file: or content: URIs.
  • Trusting attestation blindly. Leaked keyboxes forge Strong verdicts; check revocation and treat boot-state (ORANGE/YELLOW) per policy.
  • Calling a generated bypass proven. Script generators and AI revisions produce candidates; only runtime evidence (hooks fired, URLs captured, traffic in Burp) confirms one. Ktor, Flutter, native code and obfuscation usually need app-specific work Fridexa.
  • Fixing pinning but not the config underneath. cleartextTrafficPermitted="true" and <certificates src="user"/> in network_security_config.xml undo TLS before any pin matters AndroGoat network.

Real-world cases

  • Image-cropper library — exported="true" Activity + root-scoped FileProvider gave every consumer app an arbitrary-file-overwrite (itis911).
  • EngageLab SDK — intent redirection via n_intent_uri in apps incl. crypto wallets, reaching non-exported components (Microsoft).
  • OsmAnd — exported MapActivity accepting import extras; one of 24 Android bugs found with AI taskflows (GitHub Security Lab).
  • kChat — login deep link accepted an attacker server, leaking magic-link and push tokens (CVSS 7.1) (kChat).
  • iOS OAuth via ASWebAuthenticationSession — auth-code theft in ~30 popular apps, bypassing PKCE (Connelly & Ahrens).
  • WebView auth-header injection — Bearer + refresh token sent to an attacker/claimable domain, one-click ATO (abdelnasserr).
  • addJavascriptInterface RCE — MitM on an ad SDK injects JS that reflects to Runtime (WithSecure).
  • Chrome for iOS CVE-2026-13795 — Shortcuts + tel: callback bypassed call prompts (Doyensec).
  • OnePlus 15 — OxygenOS audio debug service chained untrusted_app → root (nns.ee).
  • adbd zero-click RCE (CVE-2026-0073) (eSecurityPlanet); SMS of Death (CVE-2026-58882) — malformed WAP Push crashes com.android.phone on Android 12/13 (BleepingComputer).
  • worse_query / CVE-2026-86886 — containermanagerd sandbox-extension bugs exposing other apps’ and system group containers (Ostorlab, cclerc).
  • EX-ARRR — libAppleEXR heap overflow reachable pre-BlastDoor via iMessage, found with LLM-guided fuzzing (ironpeak; see LLM-Assisted Fuzzing).
  • DarkSword — commercial iOS exploit kit (JSC JIT → ANGLE sandbox escape → implant) delivered through watering holes (iVerify); APT29 n-day zero-click chains (BleepingComputer).
  • CVE-2026-21096 (Samsung Quram) — out-of-bounds write in libimagecodec.quram.so’s progressive-JPEG inverse DCT: a scan/frame component-index mismatch drives one component’s geometry into another’s row-pointer array, reachable zero-click via Gallery and the media scanner; attacker pixel data reaches free() as a pointer. Found by Project Zero, rediscovered in seconds by LibAFL Frida mode fuzzing on an unrooted Galaxy S25 at up to 30k exec/s (Mobile Hacking Lab; see Frida).
  • DreameHome cloud API (CVE-2026-49964) — POST /dreame-user-iot/token/rtc2 issued an Agora RTC token for any device DID + owner UID without an ownership check, letting an authenticated user join another owner’s robot camera feed and publish video as that device. The companion app’s backend, not the app, held the authz bug (GHSA-3pfg-cg22-v3rr).
  • LANDFALL — Samsung spyware via malicious DNG exploiting CVE-2025-21042 (Unit 42).
  • Hirudo / SkyHook — repackaged banking malware embedding a Frida agent and a genuine unrevoked keybox (Promon); dead keybox market: 551 of 551 public keyboxes revoked (ProAndroidDev).
  • uCreator (YingGai) — VirtualApp/LSPatch spyware platform hooking WeChat, Telegram, GCash; OTP interception and KYC camera spoofing (0x0v1); Corp MDM — logistics-sector spyware diverting calls via USSD (haveibeensquatted).
  • SS7/Diameter — tracking and interception without device compromise, a limit on SMS-based OTP (BleepingComputer).
  • Bazuka / ArcticRAT (2026) — Android banking malware combining local LLMs with fake screen overlays and ADB debugging, using the model to triage stolen data instead of dumping everything to C2 (partial article) Ismail Tasdelen.
  • OS AI agents reading other apps — Meta’s Muse read Signal messages via Android notification access and macOS accessibility/screenshots; Signal now blocks screenshots by default where it detects an OS assistant (iOS 27 “Block Siri AI” toggle, Android Screen Security on Gemini detection, nothing possible on macOS beyond Siri’s Excluded Apps BleepingComputer) and calls the fix incomplete, since filesystem and notification paths remain. Apps lack a documented opt-out from OS AI data access; iOS 27.2 added “Excluded Apps” for Siri. See Agentic AI Risks The Hacker News.
  • eMudhra CA incident — guessable intermediate keys undetected ~18 months; the case for pinning vetted roots/intermediates (NowSecure).

Checklist

  • No secrets in the package (keys, HMAC signing secrets, staging endpoints); request signing not relied on as authN — M1
  • Tokens in Keychain/Keystore only; no secrets in SharedPreferences/UserDefaults, logs, caches; allowBackup="false" — M9
  • Sensitive fields set textNoSuggestions; no secrets in logcat (R8 assumenosideeffects as backstop); no OTPs or secrets via the clipboard; nothing sensitive on external storage — M9
  • android:debuggable="false" in release, enforced by a CI check — M7
  • Screen content protected where OS assistants or screenshots could read it (FLAG_SECURE, platform exclusion settings) — M6
  • Biometrics release a hardware-bound key, not a boolean — M3
  • Every API call authorizes the object and function server-side; IDs from the app are not trusted — M3, BOLA in APIs
  • Exported components, ContentProviders and FileProviders minimized; every extra validated; no Class.forName on input — M8
  • App Links autoVerify + assetlinks.json / Universal Links AASA correct, no sensitive paths in AASA; receivers validate full URL — M4/M8
  • OAuth flows reviewed for ASWebAuthenticationSession + prompt=none, redirect_uri handling, PKCE — M3
  • WebViews: no unneeded addJavascriptInterface, file/content/universal access off, URL checks on scheme + authority, no blanket auth-header injection — M4/M8
  • TLS everywhere, no cleartext (cleartextTrafficPermitted="false", no <certificates src="user"/>); pinning on vetted roots/intermediates with backup pin, fail closed (MASTG-TEST-0022, -0236) — M5
  • Third-party SDKs inventoried, defaults reviewed, precompiled binaries accounted for — M2
  • Crypto uses hardware-backed keys, not keys baked into the binary; Tink/DataStore over deprecated APIs — M10
  • Resilience controls (obfuscation, detection, RASP) treated as cost-raisers; server-side attestation with revocation checks — M7
  • PII collection and leakage reviewed — M6

Sub-pages

  • Android App Security — sandbox and IPC, local storage, native/cross-platform code, Play Integrity, OEM and firmware weaknesses.
  • iOS App Security — Secure Enclave, Data Protection, code signing, Keychain, URL schemes, sandbox-escape and zero-click research.
  • OWASP Mobile Top 10 — the 2024 awareness list (M1–M10), paired with MASVS/MASTG for verification.
  • OWASP MASVS and MASTG — the MAS verification standard (eight control groups) and its testing guide: test IDs, tooling, versions.
  • Certificate Pinning Bypass — Android’s layered trust-store changes, app-level pinning, Flutter’s own TLS stack, and pinning as a control.
  • Frida — the dynamic instrumentation engine: injection modes, core APIs, Frida 17 breaking changes, detection arms race.
  • WebView Vulnerabilities — addJavascriptInterface RCE, UXSS, file/content access, URL-validation failures, auth-header injection.
  • Mobile OAuth and Deep Link Attacks — deep links, App/Universal Links, intent redirection, iOS OAuth code theft.
  • Jailbreak and Root Detection Bypass — detection signals, RASP scoring, and attestation with its keybox failure mode.

Related topics: API Security · OWASP API Security Top 10 · BOLA in APIs · Hardcoded Secrets · Secret Scanning · OAuth 2.0 Vulnerabilities · Account Takeover · Broken Access Control · Insecure Direct Object Reference · SQL Injection · Cross-Site Scripting · Software Supply Chain Security · LLM-Assisted Fuzzing

Sources