iOS Exploitation Research
A comprehensive skill for iOS security research, exploit analysis, and understanding iOS hardening mechanisms.
When to Use This Skill
Use this skill when the user needs help with:
- Understanding iOS exploit mitigations (PAC, BTI, ASLR, DEP, KASLR, KPP, KTRR, PAN/PXN, TBI, PPL, MTE/EMTE)
- Analyzing iOS kernel or userland heap structures
- Working with iOS exploitation tools (Ghidra, BinDiff, kernelcache analysis)
- Understanding iOS exploit chains and patterns
- Researching iOS security architecture and XNU kernel internals
- Analyzing iOS vulnerability mitigations and bypass techniques
iOS Exploit Mitigations Reference
Core Mitigations
| Mitigation |
Purpose |
Key Details |
| Code Signing |
All executable code must be cryptographically signed |
Thwarts payload drop + execute; checks at runtime before loading binaries |
| CoreTrust |
Runtime signature validation against Apple's root certificate |
Thwarts post-install tampering, jailbreak persistence |
| DEP/NX/W^X |
Writable pages are non-executable, executable pages are non-writable |
Thwarts direct shellcode execution |
| ASLR |
Randomizes base addresses of libraries, heap, stack |
Thwarts hardcoded gadget addresses for ROP/JOP |
| KASLR |
Randomizes kernel base address at boot |
Thwarts kernel-level exploits relying on fixed locations |
| KPP/AMCC |
Monitors kernel text integrity via hash/checksum |
Thwarts persistent kernel patching, inline hooks |
| KTRR |
Hardware-enforced read-only kernel text after boot |
Thwarts any kernel code modification at EL1 |
| PAC |
Pointer Authentication Codes - cryptographic signatures on pointers |
Thwarts pointer tampering, return address corruption |
| BTI |
Branch Target Identification - validates indirect branch targets |
Thwarts jumping to arbitrary gadget addresses |
| PAN/PXN |
Privileged Access/Execute Never |
Prevents kernel from accessing/executing user memory |
| TBI |
Top Byte Ignore - allows pointer tagging |
Enables memory tagging, metadata in pointers |
| PPL/SPTM |
Page Protection Layer / Secure Page Table Monitor |
Creates kernel-within-kernel protection boundary |
| MTE/EMTE |
Memory Tagging Extension / Enhanced MTE |
Detects UAF, OOB, invalid accesses via tag checking |
Pointer Authentication Codes (PAC)
PAC is a hardware feature (ARMv8.3+) that embeds cryptographic signatures in pointer high bits.
Key Types:
APIAKey / APIBKey - Instruction pointer keys
APDAKey / APDBKey - Data pointer keys
APGAKey - Generic key for non-pointer data
Instruction Families:
PACxx - Sign pointer and insert PAC
AUTxx - Authenticate and strip PAC
XPACxx - Strip PAC without validation
Common PAC Bypasses:
- dlsym() - Returns already-signed function pointers
- Shared Cache - Pre-signed pointers in dyld shared cache
- DYLD relocations - Timing-based bypasses during dynamic linking
- NSPredicate/NSExpression - ObjC runtime methods for control flow
Branch Target Identification (BTI)
BTI validates indirect branch targets must have BTI landing pads.
| BTI Variant |
Permits |
Use Case |
| BTI C |
Call-style indirect branches (BLR) |
Function entry points |
| BTI J |
Jump-style branches (BR) |
Jump tables, tail-calls |
| BTI JC |
Both C and J |
General indirect targets |
Memory Tagging (MTE/EMTE)
Apple's Enhanced MTE (EMTE) / Memory Integrity Enforcement (MIE):
- Synchronous mode - Tag mismatches caught immediately
- Tag assignment - Secret tag assigned on allocation
- Tag checking - Hardware validates pointer tag matches allocation tag
- Retagging on free - Prevents use-after-free
- Neighbor differentiation - Catches buffer overflows
- Tag confidentiality - Prevents side-channel leakage
Kernel Heap Structures
Old Kernel Heap (Pre-iOS 15)
Zone Allocator (kalloc):
- Fixed-size zones:
kalloc.16, kalloc.32, kalloc.64, etc.
- Raw freelist pointers in freed chunks
- Predictable object placement via heap sprays
- Easy freelist poisoning via overflow/UAF
Freelist Structure:
Zone page (64-byte chunks):
[ A ] [ F ] [ F ] [ A ] [ F ] [ A ] [ F ]
Freelist view:
HEAD ──► [ F ] ──► [ F ] ──► [ F ] ──► [ F ] ──► NULL
Exploitation:
- Heap overflow into adjacent freed chunk → overwrite "next" pointer
- Use-after-free write → overwrite "next" pointer
- Next allocation returns attacker-controlled address
Modern Kernel Heap (iOS 15+/A12+)
kalloc_type System:
- Type-based zones - Each object type has dedicated zone
- Slabs and per-CPU caches - Decentralized allocation
- Encoded freelist pointers - XOR-encoded with per-zone secret
- Guarded allocations - Guard pages around critical objects
- PPL/SPTM protection - Hardware-enforced page protection
- PAC on pointers - Function pointers, vtables protected
Allocation Flow:
- Type lookup →
kalloc_type_<object> zone
- Check per-CPU cache
- If empty → global freelist
- If empty → allocate new slab
- Return chunk with encoded freelist pointer
Comparison:
| Feature |
Old Heap |
Modern Heap |
| Granularity |
Size-based |
Size + type-based |
| Predictability |
High |
Low |
| Freelist |
Raw pointers |
Encoded pointers |
| Adjacency control |
Easy |
Hard |
| Exploit reliability |
High |
Low |
Userland Heap (xzone malloc)
Modern iOS userland allocator (iOS 17+):
Architecture:
- Segment groups - Partition by usage (data, pointer_xzones, data_large, pointer_large)
- Metadata slabs - Out-of-line metadata separate from payloads
- Chunks and blocks - Chunks for size classes, blocks for allocations
- Guard pages - Unmapped slices between chunks
- Type IDs -
malloc_type_id_t for type-aware allocation
Security Features:
- Metadata decoupling from object payloads
- Guard pages catch out-of-bounds writes
- Type-based segregation prevents cross-type reuse
- EMTE/MIE integration for tag checking
- Delayed reuse, poisoning, quarantine for freed blocks
- Randomized placement within chunks
Exception Handling in XNU
Exception Flow:
- CPU triggers synchronous exception
- Low-level trap handler (
trap.c, exception.c)
exception_triage() routes exception
- Delivers to: thread port → task port → host port
- If unhandled → BSD signal or kernel panic
Exception Ports:
task_set_exception_ports()
thread_set_exception_ports()
host_set_exception_ports()
Mach Exception to Signal Mapping:
| Mach Exception |
Signal |
| EXC_BAD_ACCESS |
SIGSEGV/SIGBUS |
| EXC_BAD_INSTRUCTION |
SIGILL |
| EXC_ARITHMETIC |
SIGFPE |
| EXC_SOFTWARE |
SIGTRAP |
| EXC_BREAKPOINT |
SIGTRAP |
| EXC_CRASH |
SIGKILL |
| EXC_ARM_PAC |
SIGILL (non-fatal) |
PAC Exceptions:
EXC_ARM_PAC raised on signature mismatch
TFRO_PAC_EXC_FATAL flag makes PAC failures fatal (bypasses debugger)
- Platform binaries use fatal PAC exceptions
Exploitation Tools
Ghidra + BinDiff Setup
Installation:
- Download BinDiff DMG from https://www.zynamics.com/bindiff/manual
- Install BinDiff
- Open Ghidra, go to File → Install Extensions
- Add
/Applications/BinDiff/Extra/Ghidra/BinExport
- Install even with version mismatch
Kernel Version Diffing:
- Download iOS IPSW files from https://ipsw.me/
- Decompress to extract kernelcache binaries
- Load both kernelcaches in Ghidra
- Export as "Binary BinExport (v2) for BinDiff"
- Open BinDiff, create workspace with primary (vulnerable) and secondary (patched)
Finding XNU Versions
Check iOS version to XNU mapping at: https://www.theiphonewiki.com/wiki/kernel
Example: iOS 15.1 RC/15.1/15.1.1 → Darwin Kernel Version 21.1.0 (xnu-8019.43.1~1)
Modern Exploit Chain Patterns
JSKit-Based Safari Chains
Pattern:
WebKit renderer RCE → kernel IPC UAF → kernel arbitrary R/W → code-sign bypass → unsigned system stager
Key Components:
- JSKit framework - Reusable JavaScript-level arbitrary read/write primitive
- Version abstraction - PAC bypass modules for different iOS releases
- Manual Mach-O mapping - In-memory payload loading without filesystem artifacts
- Portfolio model - Multiple interchangeable WebKit exploits
Kernel Bridge Pattern
CVE-2023-41992 (IPC UAF):
- Kernel use-after-free in IPC code
- Re-allocate freed object from userland
- Abuse dangling pointers for arbitrary kernel R/W
CVE-2023-41991 (Code-sign bypass):
- Patch trust cache / code-signing structures
- Unsigned payloads execute as
system
- Expose lightweight kernel R/W service
PREYHUNTER Helper Modules
Watcher anti-analysis:
- Checks
security.mac.amfi.developer_mode_status
- Detects diagnosticd, jailbreak traces (Cydia, bash, tcpdump, frida, sshd)
- Detects AV apps (McAfee, Avast, Norton)
- Blocks on custom HTTP proxy or root CAs
Helper surveillance:
/tmp/helper.sock communication
- DMHooker/UMHooker hook sets
- VOIP audio capture (
/private/var/tmp/l/voip_%lu_%u_PART.m4a)
- System-wide keylogger
- Photo capture without UI
- SpringBoard notification suppression
HiddenDot suppression:
- Hooks
SBSensorActivityDataProvider._handleNewDomainData:
- Zeroes Objective-C
self pointer
- Drops camera/mic indicator updates
Research Workflow
Step 1: Identify Target iOS Version
- Check iOS version and corresponding XNU kernel version
- Download IPSW files for vulnerable and patched versions
- Extract kernelcache binaries
Step 2: Set Up Analysis Environment
- Install Ghidra and BinDiff
- Load kernelcaches in Ghidra
- Export BinExport format
- Create BinDiff workspace
Step 3: Analyze Mitigations
- Identify which mitigations are active (PAC, BTI, KTRR, PPL, etc.)
- Determine hardware generation (A12+, A15+, etc.)
- Check for EMTE/MIE support
- Map out kernel heap structure (kalloc_type zones)
Step 4: Identify Vulnerability Class
- Determine if userland or kernel vulnerability
- Check for heap corruption, UAF, OOB, type confusion
- Map to appropriate heap structure (kernel kalloc_type or userland xzone)
- Identify available primitives (read/write, control flow)
Step 5: Plan Exploitation
- Assess mitigation bypass requirements (PAC, BTI, etc.)
- Determine if info leak needed for ASLR/KASLR
- Plan heap grooming strategy (if applicable)
- Identify code-sign bypass path (if kernel)
Step 6: Execute and Validate
- Implement exploit chain
- Test on target iOS version
- Validate each stage (primitive → bypass → payload)
- Document findings and patterns
Key References
Quick Reference Commands
# Install BinDiff extension in Ghidra
ghidraRun
# File → Install Extensions → Add /Applications/BinDiff/Extra/Ghidra/BinExport
# Download iOS IPSW files
# Visit https://ipsw.me/ and download target versions
# Decompress IPSW to extract kernelcache
# Use standard archive tools to extract .ipsw → .dmg → kernelcache
# Check XNU version for iOS
# Visit https://www.theiphonewiki.com/wiki/kernel
Common Pitfalls
- Assuming PAC is bypassable - Kernel PAC is highly robust; focus on userland bypasses
- Ignoring type-based heap - Modern kalloc_type separates object types; heap sprays less effective
- Overlooking EMTE - Memory tagging catches UAF/OOB immediately on supported hardware
- Missing PPL/SPTM - Page protection layers prevent arbitrary kernel memory modification
- Forgetting PAC exceptions -
TFRO_PAC_EXC_FATAL prevents debugger interception on platform binaries
- Assuming freelist poisoning works - Encoded freelist pointers require key knowledge
- Ignoring PAN/PXN - Kernel cannot access/execute user memory by default
When to Escalate
If the user needs:
- Specific exploit code implementation
- Detailed binary analysis of a specific vulnerability
- Custom tool development for iOS exploitation
- Legal/ethical guidance on exploitation research
Provide the conceptual framework and direct them to appropriate resources or suggest they consult with security professionals for implementation details.
1---2name: ios-exploitation3description: iOS exploitation research and analysis. Use this skill whenever the user mentions iOS security, exploit mitigations, kernel/userland heap analysis, PAC/BTI/ASLR/DEP, XNU kernel structures, iOS exploit chains, or any iOS security research task. This skill helps understand iOS hardening mechanisms, analyze kernel heap structures, work with exploitation tools like Ghidra/BinDiff, and understand modern iOS exploit patterns.4---56# iOS Exploitation Research78A comprehensive skill for iOS security research, exploit analysis, and understanding iOS hardening mechanisms.910## When to Use This Skill1112Use this skill when the user needs help with:13- Understanding iOS exploit mitigations (PAC, BTI, ASLR, DEP, KASLR, KPP, KTRR, PAN/PXN, TBI, PPL, MTE/EMTE)14- Analyzing iOS kernel or userland heap structures15- Working with iOS exploitation tools (Ghidra, BinDiff, kernelcache analysis)16- Understanding iOS exploit chains and patterns17- Researching iOS security architecture and XNU kernel internals18- Analyzing iOS vulnerability mitigations and bypass techniques1920## iOS Exploit Mitigations Reference2122### Core Mitigations2324| Mitigation | Purpose | Key Details |25|------------|---------|-------------|26| **Code Signing** | All executable code must be cryptographically signed | Thwarts payload drop + execute; checks at runtime before loading binaries |27| **CoreTrust** | Runtime signature validation against Apple's root certificate | Thwarts post-install tampering, jailbreak persistence |28| **DEP/NX/W^X** | Writable pages are non-executable, executable pages are non-writable | Thwarts direct shellcode execution |29| **ASLR** | Randomizes base addresses of libraries, heap, stack | Thwarts hardcoded gadget addresses for ROP/JOP |30| **KASLR** | Randomizes kernel base address at boot | Thwarts kernel-level exploits relying on fixed locations |31| **KPP/AMCC** | Monitors kernel text integrity via hash/checksum | Thwarts persistent kernel patching, inline hooks |32| **KTRR** | Hardware-enforced read-only kernel text after boot | Thwarts any kernel code modification at EL1 |33| **PAC** | Pointer Authentication Codes - cryptographic signatures on pointers | Thwarts pointer tampering, return address corruption |34| **BTI** | Branch Target Identification - validates indirect branch targets | Thwarts jumping to arbitrary gadget addresses |35| **PAN/PXN** | Privileged Access/Execute Never | Prevents kernel from accessing/executing user memory |36| **TBI** | Top Byte Ignore - allows pointer tagging | Enables memory tagging, metadata in pointers |37| **PPL/SPTM** | Page Protection Layer / Secure Page Table Monitor | Creates kernel-within-kernel protection boundary |38| **MTE/EMTE** | Memory Tagging Extension / Enhanced MTE | Detects UAF, OOB, invalid accesses via tag checking |3940### Pointer Authentication Codes (PAC)4142PAC is a hardware feature (ARMv8.3+) that embeds cryptographic signatures in pointer high bits.4344**Key Types:**45- `APIAKey` / `APIBKey` - Instruction pointer keys46- `APDAKey` / `APDBKey` - Data pointer keys 47- `APGAKey` - Generic key for non-pointer data4849**Instruction Families:**50- `PACxx` - Sign pointer and insert PAC51- `AUTxx` - Authenticate and strip PAC52- `XPACxx` - Strip PAC without validation5354**Common PAC Bypasses:**551. **dlsym()** - Returns already-signed function pointers562. **Shared Cache** - Pre-signed pointers in dyld shared cache573. **DYLD relocations** - Timing-based bypasses during dynamic linking584. **NSPredicate/NSExpression** - ObjC runtime methods for control flow5960### Branch Target Identification (BTI)6162BTI validates indirect branch targets must have BTI landing pads.6364| BTI Variant | Permits | Use Case |65|-------------|---------|----------|66| **BTI C** | Call-style indirect branches (BLR) | Function entry points |67| **BTI J** | Jump-style branches (BR) | Jump tables, tail-calls |68| **BTI JC** | Both C and J | General indirect targets |6970### Memory Tagging (MTE/EMTE)7172Apple's Enhanced MTE (EMTE) / Memory Integrity Enforcement (MIE):7374- **Synchronous mode** - Tag mismatches caught immediately75- **Tag assignment** - Secret tag assigned on allocation76- **Tag checking** - Hardware validates pointer tag matches allocation tag77- **Retagging on free** - Prevents use-after-free78- **Neighbor differentiation** - Catches buffer overflows79- **Tag confidentiality** - Prevents side-channel leakage8081## Kernel Heap Structures8283### Old Kernel Heap (Pre-iOS 15)8485**Zone Allocator (kalloc):**86- Fixed-size zones: `kalloc.16`, `kalloc.32`, `kalloc.64`, etc.87- Raw freelist pointers in freed chunks88- Predictable object placement via heap sprays89- Easy freelist poisoning via overflow/UAF9091**Freelist Structure:**92```93Zone page (64-byte chunks):94 [ A ] [ F ] [ F ] [ A ] [ F ] [ A ] [ F ]9596Freelist view:97 HEAD ──► [ F ] ──► [ F ] ──► [ F ] ──► [ F ] ──► NULL98```99100**Exploitation:**1011. Heap overflow into adjacent freed chunk → overwrite "next" pointer1022. Use-after-free write → overwrite "next" pointer1033. Next allocation returns attacker-controlled address104105### Modern Kernel Heap (iOS 15+/A12+)106107**kalloc_type System:**108- **Type-based zones** - Each object type has dedicated zone109- **Slabs and per-CPU caches** - Decentralized allocation110- **Encoded freelist pointers** - XOR-encoded with per-zone secret111- **Guarded allocations** - Guard pages around critical objects112- **PPL/SPTM protection** - Hardware-enforced page protection113- **PAC on pointers** - Function pointers, vtables protected114115**Allocation Flow:**1161. Type lookup → `kalloc_type_<object>` zone1172. Check per-CPU cache1183. If empty → global freelist1194. If empty → allocate new slab1205. Return chunk with encoded freelist pointer121122**Comparison:**123124| Feature | Old Heap | Modern Heap |125|---------|----------|-------------|126| Granularity | Size-based | Size + type-based |127| Predictability | High | Low |128| Freelist | Raw pointers | Encoded pointers |129| Adjacency control | Easy | Hard |130| Exploit reliability | High | Low |131132## Userland Heap (xzone malloc)133134**Modern iOS userland allocator (iOS 17+):**135136**Architecture:**137- **Segment groups** - Partition by usage (data, pointer_xzones, data_large, pointer_large)138- **Metadata slabs** - Out-of-line metadata separate from payloads139- **Chunks and blocks** - Chunks for size classes, blocks for allocations140- **Guard pages** - Unmapped slices between chunks141- **Type IDs** - `malloc_type_id_t` for type-aware allocation142143**Security Features:**144- Metadata decoupling from object payloads145- Guard pages catch out-of-bounds writes146- Type-based segregation prevents cross-type reuse147- EMTE/MIE integration for tag checking148- Delayed reuse, poisoning, quarantine for freed blocks149- Randomized placement within chunks150151## Exception Handling in XNU152153**Exception Flow:**1541. CPU triggers synchronous exception1552. Low-level trap handler (`trap.c`, `exception.c`)1563. `exception_triage()` routes exception1574. Delivers to: thread port → task port → host port1585. If unhandled → BSD signal or kernel panic159160**Exception Ports:**161```c162task_set_exception_ports()163thread_set_exception_ports()164host_set_exception_ports()165```166167**Mach Exception to Signal Mapping:**168169| Mach Exception | Signal |170|----------------|--------|171| EXC_BAD_ACCESS | SIGSEGV/SIGBUS |172| EXC_BAD_INSTRUCTION | SIGILL |173| EXC_ARITHMETIC | SIGFPE |174| EXC_SOFTWARE | SIGTRAP |175| EXC_BREAKPOINT | SIGTRAP |176| EXC_CRASH | SIGKILL |177| EXC_ARM_PAC | SIGILL (non-fatal) |178179**PAC Exceptions:**180- `EXC_ARM_PAC` raised on signature mismatch181- `TFRO_PAC_EXC_FATAL` flag makes PAC failures fatal (bypasses debugger)182- Platform binaries use fatal PAC exceptions183184## Exploitation Tools185186### Ghidra + BinDiff Setup187188**Installation:**1891. Download BinDiff DMG from https://www.zynamics.com/bindiff/manual1902. Install BinDiff1913. Open Ghidra, go to File → Install Extensions1924. Add `/Applications/BinDiff/Extra/Ghidra/BinExport`1935. Install even with version mismatch194195**Kernel Version Diffing:**1961. Download iOS IPSW files from https://ipsw.me/1972. Decompress to extract kernelcache binaries1983. Load both kernelcaches in Ghidra1994. Export as "Binary BinExport (v2) for BinDiff"2005. Open BinDiff, create workspace with primary (vulnerable) and secondary (patched)201202### Finding XNU Versions203204Check iOS version to XNU mapping at: https://www.theiphonewiki.com/wiki/kernel205206Example: iOS 15.1 RC/15.1/15.1.1 → Darwin Kernel Version 21.1.0 (xnu-8019.43.1~1)207208## Modern Exploit Chain Patterns209210### JSKit-Based Safari Chains211212**Pattern:**213```214WebKit renderer RCE → kernel IPC UAF → kernel arbitrary R/W → code-sign bypass → unsigned system stager215```216217**Key Components:**218- **JSKit framework** - Reusable JavaScript-level arbitrary read/write primitive219- **Version abstraction** - PAC bypass modules for different iOS releases220- **Manual Mach-O mapping** - In-memory payload loading without filesystem artifacts221- **Portfolio model** - Multiple interchangeable WebKit exploits222223### Kernel Bridge Pattern224225**CVE-2023-41992 (IPC UAF):**226- Kernel use-after-free in IPC code227- Re-allocate freed object from userland228- Abuse dangling pointers for arbitrary kernel R/W229230**CVE-2023-41991 (Code-sign bypass):**231- Patch trust cache / code-signing structures232- Unsigned payloads execute as `system`233- Expose lightweight kernel R/W service234235### PREYHUNTER Helper Modules236237**Watcher anti-analysis:**238- Checks `security.mac.amfi.developer_mode_status`239- Detects diagnosticd, jailbreak traces (Cydia, bash, tcpdump, frida, sshd)240- Detects AV apps (McAfee, Avast, Norton)241- Blocks on custom HTTP proxy or root CAs242243**Helper surveillance:**244- `/tmp/helper.sock` communication245- DMHooker/UMHooker hook sets246- VOIP audio capture (`/private/var/tmp/l/voip_%lu_%u_PART.m4a`)247- System-wide keylogger248- Photo capture without UI249- SpringBoard notification suppression250251**HiddenDot suppression:**252- Hooks `SBSensorActivityDataProvider._handleNewDomainData:`253- Zeroes Objective-C `self` pointer254- Drops camera/mic indicator updates255256## Research Workflow257258### Step 1: Identify Target iOS Version2592601. Check iOS version and corresponding XNU kernel version2612. Download IPSW files for vulnerable and patched versions2623. Extract kernelcache binaries263264### Step 2: Set Up Analysis Environment2652661. Install Ghidra and BinDiff2672. Load kernelcaches in Ghidra2683. Export BinExport format2694. Create BinDiff workspace270271### Step 3: Analyze Mitigations2722731. Identify which mitigations are active (PAC, BTI, KTRR, PPL, etc.)2742. Determine hardware generation (A12+, A15+, etc.)2753. Check for EMTE/MIE support2764. Map out kernel heap structure (kalloc_type zones)277278### Step 4: Identify Vulnerability Class2792801. Determine if userland or kernel vulnerability2812. Check for heap corruption, UAF, OOB, type confusion2823. Map to appropriate heap structure (kernel kalloc_type or userland xzone)2834. Identify available primitives (read/write, control flow)284285### Step 5: Plan Exploitation2862871. Assess mitigation bypass requirements (PAC, BTI, etc.)2882. Determine if info leak needed for ASLR/KASLR2893. Plan heap grooming strategy (if applicable)2904. Identify code-sign bypass path (if kernel)291292### Step 6: Execute and Validate2932941. Implement exploit chain2952. Test on target iOS version2963. Validate each stage (primitive → bypass → payload)2974. Document findings and patterns298299## Key References300301- **XNU Source:** `osfmk/kern/exception.c`, `osfmk/arm64/trap.c`, `bsd/kern/kern_sig.c`302- **PAC Research:** [bazad.github.io](https://bazad.github.io/presentations/BlackHat-USA-2020-iOS_Kernel_PAC_One_Year_Later.pdf)303- **PAC Bypasses:** [i.blackhat.com](https://i.blackhat.com/BH-US-23/Presentations/US-23-Zec-Apple-PAC-Four-Years-Later.pdf)304- **Project Zero:** [googleprojectzero.blogspot.com](https://googleprojectzero.blogspot.com/2020/01/remote-iphone-exploitation-part-3.html)305- **Synacktiv:** [synacktiv.com](https://www.synacktiv.com/en/publications/ios-184-dlsym-considered-harmful)306- **Epsilon:** [blog.epsilon-sec.com](https://blog.epsilon-sec.com/tag/pac.html)307- **Jamf Predator Analysis:** [jamf.com/blog](https://www.jamf.com/blog/predator-spyware-ios-recording-indicator-bypass-analysis/)308- **Google Threat Intel:** [cloud.google.com/blog](https://cloud.google.com/blog/topics/threat-intelligence/intellexa-zero-day-exploits-continue)309310## Quick Reference Commands311312```bash313# Install BinDiff extension in Ghidra314ghidraRun315# File → Install Extensions → Add /Applications/BinDiff/Extra/Ghidra/BinExport316317# Download iOS IPSW files318# Visit https://ipsw.me/ and download target versions319320# Decompress IPSW to extract kernelcache321# Use standard archive tools to extract .ipsw → .dmg → kernelcache322323# Check XNU version for iOS324# Visit https://www.theiphonewiki.com/wiki/kernel325```326327## Common Pitfalls3283291. **Assuming PAC is bypassable** - Kernel PAC is highly robust; focus on userland bypasses3302. **Ignoring type-based heap** - Modern kalloc_type separates object types; heap sprays less effective3313. **Overlooking EMTE** - Memory tagging catches UAF/OOB immediately on supported hardware3324. **Missing PPL/SPTM** - Page protection layers prevent arbitrary kernel memory modification3335. **Forgetting PAC exceptions** - `TFRO_PAC_EXC_FATAL` prevents debugger interception on platform binaries3346. **Assuming freelist poisoning works** - Encoded freelist pointers require key knowledge3357. **Ignoring PAN/PXN** - Kernel cannot access/execute user memory by default336337## When to Escalate338339If the user needs:340- Specific exploit code implementation341- Detailed binary analysis of a specific vulnerability342- Custom tool development for iOS exploitation343- Legal/ethical guidance on exploitation research344345Provide the conceptual framework and direct them to appropriate resources or suggest they consult with security professionals for implementation details.