# iOS App Security > The iOS-specific model: a hardware-rooted platform (Secure Enclave, secure boot, Data Protection, code signing/FairPlay) with a strong app sandbox, where app-level bugs cluster around Keychain misuse, URL-scheme/universal-link handling, and WebViews, and platform bugs around parsers, the sandbox boundary, and the kernel. ## Platform foundations Apple's integrated hardware/software stack is the baseline attackers work against: the **Secure Enclave** (Apple-customized L4 microkernel coprocessor) guards keys and biometrics (Touch/Face/Optic ID); **secure boot** and the **Signed System Volume** enforce OS integrity; **Data Protection** ties file encryption to classes (Complete, Complete-Until-First-User-Auth, etc.) derived from the passcode; **code signing** + **FairPlay** DRM gate what runs. Defense-in-depth features: **BlastDoor** (locked-down sandbox that parses untrusted iMessage content), **Lockdown Mode**, and the **Apple Security Research Device**. Advanced Data Protection extends end-to-end encryption to iCloud Backup, Photos and 20+ categories. ## App-level attack surface - **Keychain vs. plaintext.** Secrets belong in the Keychain with an appropriate accessibility class (not `NSUserDefaults`/plist). MASVS-STORAGE findings dominate assessments — keyboard, screenshot and web caches leak too. - **Custom URL schemes & OAuth.** Schemes are first-come-first-served but not exclusive. `ASWebAuthenticationSession` (which carries Safari cookies) + an OAuth `prompt=none` silent-auth flow let a malicious app redirect through an attacker domain and capture auth codes for ~30 popular apps — account takeover bypassing PKCE. See [[Mobile OAuth and Deep Link Attacks]]. - **Universal Links.** The `apple-app-site-association` file (served at `/.well-known/`, also cached via Apple's CDN since iOS 14) can leak sensitive/unreleased paths; weak receiver-side validation (`application:continueUserActivity:`) enables spoofing (CVE-2024-10474). Verify with MASTG-TEST-0070. - **WebViews / hybrid.** `WKWebView` bridges and `allowUniversalAccessFromFileURLs`-style settings mirror the Android WebView problems; Brave's Playlist bypassed Face ID on private tabs (PeekList). - **Cross-platform.** Flutter and .NET MAUI apps decompile and expose shared logic on iOS too (see [[Android App Security]], [[Certificate Pinning Bypass]]). ## Reverse engineering and resilience - **DRM is not protection.** FairPlay historically required on-device decryption (Clutch, on jailbroken devices); **Unfairplay** (Oct 2026) decrypts IPAs offline by abusing Mac execution of iOS apps — fast, scalable, undetectable. Guardsquare's point: static secrets and client-side policy fail; rely on obfuscation plus server-side attestation. - **Jailbreak detection** and anti-debug/anti-Frida are resilience controls, not guarantees — their bypass has its own page: [[Jailbreak and Root Detection Bypass]]. Jailbreak types: tethered, semi-tethered, semi-untethered, untethered (hardest to achieve as Apple hardens and can't be downgraded to). - Tooling: Hopper/Ghidra/radare2 (+ r2frida), class-dump, [[Frida]]/Objection, TrollStore/FridaGadget for installation; Corellium for virtualized iOS and CVE reproduction. ## Sandbox escapes and zero-click chains (current research) - **containermanagerd trust bugs.** `worse_query` (iOS 26.0–27.2) replaces a container part with a symlink after validation so `containermanagerd` mints a read-write sandbox-extension token for another app's container (TOCTOU, no kernel bug); `worse_finder` enumerates and exports every app container; CVE-2026-86886 lets an unentitled App Store app obtain extensions to system group containers (MobileGestalt cache, configuration profiles) via the private `container_query_*` SPI. Reaches session cookies, documents and secrets of other apps — though not Keychain or code execution. - **0-click parser chains.** The recurring pattern is a privileged daemon decoding attacker content automatically. EX-ARRR: a 4-bytes-per-pixel heap overflow in `libAppleEXR.dylib` reachable via an iMessage attachment before BlastDoor (LLM-guided fuzzing). DarkSword / Coruna iOS exploit **kits** (JavaScriptCore JIT → ANGLE OOB sandbox escape via GPU process → PE → in-memory implant) are sold and delivered through watering-hole/Instagram-ad infrastructure targeting iOS 18.4–18.6.x; APT29 chained n-days (CVE-2025-43529 et al.) in zero-click attacks. XNU bug-hunting harnesses now generate findings in bulk. ## Testing Jailbroken device (for root FS, debugging) or Corellium; Burp/ZAP + [[Certificate Pinning Bypass]]; MASVS/MASTG via MASVS/MASTG; MobSF for IPA static analysis. Keep devices patched — most exploited chains are n-days against users on old iOS. ## Related - [[Mobile Application Security]] · [[Android App Security]] · [[Mobile OAuth and Deep Link Attacks]] · [[Jailbreak and Root Detection Bypass]] · [[Frida]] · Objection · [[Certificate Pinning Bypass]] · [[Jailbreak and Root Detection Bypass]] · MASVS/MASTG ## Sources - [[raw/help.apple.com/apple-platform-security-guide-6686|Apple Platform Security guide]] - [[raw/mas.owasp.org/ios-security-testing-owasp-mastg-4923|iOS Security Testing (OWASP MASTG)]] - [[raw/evanconnelly.github.io/mobile-oauth-attacks-ios-url-scheme-hijacking-revamped-4008|Mobile OAuth Attacks — iOS URL Scheme Hijacking Revamped]] - [[raw/book.hacktricks.wiki/ios-universal-links-hacktricks-4006|iOS Universal Links (HackTricks)]] - [[raw/blog.ostorlab.co/worse-query-ios-sandbox-escape-exposes-app-data-14436|worse_query: iOS sandbox escape]] - [[raw/melv.in/worse-finder-every-app-container-on-ios-one-symlink-away-15753|worse_finder: every app container on iOS]] - [[raw/cclerc.ch/getting-sandbox-extensions-you-were-never-entitled-to-cve-2026-86886-i-15752|Sandbox extensions you were never entitled to (CVE-2026-86886)]] - [[raw/guardsquare.com/new-offline-ipa-decryption-tool-impacts-ios-app-security-14433|Offline IPA decryption (Unfairplay)]] - [[raw/ironpeak.be/ex-arrr-sailing-the-apple-0-click-seas-12140|EX-ARRR: Sailing the Apple 0-click Seas]] - [[raw/iverify.io/inside-darksword-a-new-ios-exploit-kit-iverify-4332|Inside DarkSword: A New iOS Exploit Kit]] - [[raw/bleepingcomputer.com/hackers-use-n-day-exploits-in-zero-click-attacks-on-ios-android-device-13161|n-day zero-click attacks on iOS and Android]] - [[raw/corellium.com/ios-app-reverse-engineering-tools-tactics-3734|iOS App Reverse Engineering: Tools & Tactics]] - [[raw/macrumors.com/enable-end-to-end-encryption-for-your-icloud-backups-6679|Advanced Data Protection for iCloud]]