iOS Exploitation & Jailbreaking
Mobile Exploitation Techniques · Mobile Exploitation track
6 min read
In this module
The Exploit Chain
Exploiting a modern iOS device is never a matter of finding a single vulnerability. Apple's layered defences (code signing, sandboxing, ASLR, PAC, PPL, KTRR) force the attacker to chain multiple bugs, each one knocking down a different mitigation. A typical full-chain exploit walks this progression:
The dotted boxes map the case studies below onto the chain. Trident skipped a separate sandbox escape: once its kernel bug gave read/write, it switched off code signing and the sandbox from inside the kernel.
Each link in the chain represents months of expert research. That's why full-chain iOS exploits fetch seven figures on vulnerability markets.
Case Study: Trident (2016)
Trident was a trio of zero-day vulnerabilities (CVE-2016-4657, CVE-2016-4655, CVE-2016-4656) caught being used by NSO Group's Pegasus spyware. The chain was a one-click exploit, delivered via SMS with a malicious link.
The chain worked in three stages:
- CVE-2016-4657 (WebKit): A memory corruption vulnerability in the WebKit JavaScript engine. Clicking the link triggered exploitation through Safari, giving the attacker code execution within the browser's sandbox.
- CVE-2016-4655 (Kernel info leak): A kernel information disclosure vulnerability that leaked kernel memory addresses, defeating KASLR (kernel address space layout randomisation).
- CVE-2016-4656 (Kernel use-after-free): A kernel vulnerability that provided arbitrary kernel read/write, enabling the attacker to disable code signing, escape the sandbox, and install the Pegasus implant.
Trident mattered because it laid bare the commercial exploitation of iOS at scale, with journalists and activists on the receiving end of a one-click attack vector.
Case Study: FORCEDENTRY (2021)
FORCEDENTRY (CVE-2021-30860) marked a leap in exploitation sophistication. It was zero-click: no taps, no opens, nothing. Just iMessage receiving a crafted message.
The bug was an integer overflow in the JBIG2 image codec within CoreGraphics. JBIG2 is a lossless compression standard for bi-level (black and white) images. It supports logical operations (AND, OR, XOR, XNOR) on bitmap segments.
The exploit chained over 70,000 JBIG2 segment commands to wire up a virtual computer out of those logical operations. The virtual CPU had registers, a 64-bit adder, and a comparator — Turing-complete enough to do real work. From there, the virtual machine bootstrapped the rest of the exploitation: scanning memory, building ROP chains, and eventually walking out of the sandbox.
FORCEDENTRY also sidestepped BlastDoor, Apple's iMessage sandbox introduced specifically to contain zero-click iMessage attacks. According to Project Zero's analysis, the attachment was sent with a .gif extension, which made iMessage hand it to a GIF-copying routine in the IMTranscoderAgent process, outside BlastDoor. That routine's ImageIO call sniffed the real format and fed the PDF/JBIG2 payload to CoreGraphics there. A second stage then escaped IMTranscoderAgent's own sandbox. In iOS 15 Apple moved GIF decoding entirely inside BlastDoor.
FORCEDENTRY (CVE-2021-30860) was a zero-click iMessage exploit that used an integer overflow in the JBIG2 image decoder to build a virtual CPU from logical bitmap operations. Using over 70,000 segment commands, it bootstrapped exploitation without any user interaction. It demonstrated that even purpose-built sandboxes (BlastDoor) can be bypassed with sufficient sophistication.
Case Study: checkm8 (2019)
checkm8 (CVE-2019-8900) sits in a category of one among iOS exploits because it's unpatchable. The vulnerability is a use-after-free in the USB DFU (Device Firmware Update) stack of the SecureROM (bootrom), the very first code that runs when an Apple device powers on.
The bootrom is mask ROM, burned into the chip at the factory. Software updates cannot touch it. Apple would have to manufacture new chips to fix it. Affected SoCs include A5 through A11 (iPhone 4S through iPhone X).
checkm8 needs physical USB access to land. The attacker has to plug the device in and shove it into DFU mode. That's a real constraint, but it still unlocks plenty:
- Tethered jailbreaks that can be re-applied on every boot.
- Forensic extraction of device data (used by law enforcement tools).
- Security research on otherwise locked-down devices.
The Fugu14 jailbreak (Linus Henze) pulled off untethered jailbreaking on iOS 14.3-14.5.1 for arm64e devices, chaining several CVEs to keep persistence without needing a computer plugged in on every boot.
Jailbreak Categories
Jailbreaks are classified by their persistence and requirements:
- Tethered: Must be re-applied via a computer on every reboot. The device cannot boot independently once it's been jailbroken. checkm8-based jailbreaks are tethered.
- Semi-tethered: The device boots fine without a computer, but comes up un-jailbroken; re-enabling the jailbreak needs the computer again.
- Semi-untethered: The device also boots un-jailbroken, but the jailbreak app stays installed, so you re-activate it by running that app on the device — no computer needed. Most modern software jailbreaks live here.
- Untethered: Persists fully across reboots, no user action required at any point. The rarest, most valuable category, since it demands a vulnerability somewhere in the boot chain. Fugu14 pulled this off for specific iOS versions.
Hardware Mitigations
Modern iOS devices (A12 and later) ship hardware mitigations that have completely rewritten the exploitation landscape:
PAC (Pointer Authentication Codes)
PAC (ARMv8.3-A, A12+) signs pointers with cryptographic codes using five hardware keys. PACIA/AUTIA instructions handle the sign and verify operations. A tampered pointer fails authentication and is intentionally corrupted, so the process crashes rather than handing the attacker control flow.
PPL (Page Protection Layer)
PPL walls off page table management into a separate execution context inside the kernel. Even with full kernel read/write, an attacker can't modify page table entries directly. PPL brokers every page table operation and enforces W^X (write XOR execute) at the hardware level.
KTRR (Kernel Text Read-only Region)
KTRR locks the kernel's code pages permanently read-only after boot. The hardware register controlling KTRR is locked during early boot and software cannot unlock it. That kills kernel code patching, a technique historically essential to jailbreaks and rootkits alike.
APRR (Alternative Permission Remap Register)
APRR slots an indirection layer between page table bits and the actual read/write/execute permissions they imply. Rather than page bits directly meaning RWX, APRR uses a CPU register to remap what those bits mean. The system can flip memory permissions around without ever touching page tables, which throws a wrench into any exploitation technique that assumes predictable permission semantics.
On newer hardware the list has moved on. A15 and M2 chips and later replace PPL with the Secure Page Table Monitor and Trusted Execution Monitor (SPTM and TXM), which run above the kernel and own page tables and code-signing decisions. Later chips also replace KTRR with CTRR, and the iPhone 17 generation (2025) adds Memory Integrity Enforcement, always-on hardware memory tagging aimed at catching the memory-corruption bugs exploit chains start from. Check Apple's current Platform Security guide for which apply to a given device.
These mitigations stack on top of each other. An attacker needs to defeat PAC to hijack control flow, defeat PPL to modify page tables, and defeat KTRR to patch kernel code. Each bypass demands its own vulnerability or technique, and the costs multiply.