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.4metadata:5 source: https://skillmd.com/skills/abelrguezr/ios-exploitation6---78# iOS Exploitation Research910A comprehensive skill for iOS security research, exploit analysis, and understanding iOS hardening mechanisms.1112## When to Use This Skill1314Use this skill when the user needs help with:15- Understanding iOS exploit mitigations (PAC, BTI, ASLR, DEP, KASLR, KPP, KTRR, PAN/PXN, TBI, PPL, MTE/EMTE)16- Analyzing iOS kernel or userland heap structures17- Working with iOS exploitation tools (Ghidra, BinDiff, kernelcache analysis)18- Understanding iOS exploit chains and patterns19- Researching iOS security architecture and XNU kernel internals20- Analyzing iOS vulnerability mitigations and bypass techniques2122## iOS Exploit Mitigations Reference2324### Core Mitigations2526| Mitigation | Purpose | Key Details |27|------------|---------|-------------|28| **Code Signing** | All executable code must be cryptographically signed | Thwarts payload drop + execute; checks at runtime before loading binaries |29| **CoreTrust** | Runtime signature validation against Apple's root certificate | Thwarts post-install tampering, jailbreak persistence |30| **DEP/NX/W^X** | Writable pages are non-executable, executable pages are non-writable | Thwarts direct shellcode execution |31| **ASLR** | Randomizes base addresses of libraries, heap, stack | Thwarts hardcoded gadget addresses for ROP/JOP |32| **KASLR** | Randomizes kernel base address at boot | Thwarts kernel-level exploits relying on fixed locations |33| **KPP/AMCC** | Monitors kernel text integrity via hash/checksum | Thwarts persistent kernel patching, inline hooks |34| **KTRR** | Hardware-enforced read-only kernel text after boot | Thwarts any kernel code modification at EL1 |35| **PAC** | Pointer Authentication Codes - cryptographic signatures on pointers | Thwarts pointer tampering, return address corruption |36| **BTI** | Branch Target Identification - validates indirect branch targets | Thwarts jumping to arbitrary gadget addresses |37| **PAN/PXN** | Privileged Access/Execute Never | Prevents kernel from accessing/executing user memory |38| **TBI** | Top Byte Ignore - allows pointer tagging | Enables memory tagging, metadata in pointers |39| **PPL/SPTM** | Page Protection Layer / Secure Page Table Monitor | Creates kernel-within-kernel protection boundary |40| **MTE/EMTE** | Memory Tagging Extension / Enhanced MTE | Detects UAF, OOB, invalid accesses via tag checking |4142### Pointer Authentication Codes (PAC)4344PAC is a hardware feature (ARMv8.3+) that embeds cryptographic signatures in pointer high bits.4546**Key Types:**47- `APIAKey` / `APIBKey` - Instruction pointer keys48- `APDAKey` / `APDBKey` - Data pointer keys 49- `APGAKey` - Generic key for non-pointer data5051**Instruction Families:**52- `PACxx` - Sign pointer and insert PAC53- `AUTxx` - Authenticate and strip PAC54- `XPACxx` - Strip PAC without validation5556**Common PAC Bypasses:**571. **dlsym()** - Returns already-signed function pointers582. **Shared Cache** - Pre-signed pointers in dyld shared cache593. **DYLD relocations** - Timing-based bypasses during dynamic linking604. **NSPredicate/NSExpression** - ObjC runtime methods for control flow6162### Branch Target Identification (BTI)6364BTI validates indirect branch targets must have BTI landing pads.6566| BTI Variant | Permits | Use Case |67|-------------|---------|----------|68| **BTI C** | Call-style indirect branches (BLR) | Function entry points |69| **BTI J** | Jump-style branches (BR) | Jump tables, tail-calls |70| **BTI JC** | Both C and J | General indirect targets |7172### Memory Tagging (MTE/EMTE)7374Apple's Enhanced MTE (EMTE) / Memory Integrity Enforcement (MIE):7576- **Synchronous mode** - Tag mismatches caught immediately77- **Tag assignment** - Secret tag assigned on allocation78- **Tag checking** - Hardware validates pointer tag matches allocation tag79- **Retagging on free** - Prevents use-after-free80- **Neighbor differentiation** - Catches buffer overflows81- **Tag confidentiality** - Prevents side-channel leakage8283## Kernel Heap Structures8485### Old Kernel Heap (Pre-iOS 15)8687**Zone Allocator (kalloc):**88- Fixed-size zones: `kalloc.16`, `kalloc.32`, `kalloc.64`, etc.89- Raw freelist pointers in freed chunks90- Predictable object placement via heap sprays91- Easy freelist poisoning via overflow/UAF9293**Freelist Structure:**94```95Zone page (64-byte chunks):96 [ A ] [ F ] [ F ] [ A ] [ F ] [ A ] [ F ]9798Freelist view:99 HEAD ──► [ F ] ──► [ F ] ──► [ F ] ──► [ F ] ──► NULL100```101102**Exploitation:**1031. Heap overflow into adjacent freed chunk → overwrite "next" pointer1042. Use-after-free write → overwrite "next" pointer1053. Next allocation returns attacker-controlled address106107### Modern Kernel Heap (iOS 15+/A12+)108109**kalloc_type System:**110- **Type-based zones** - Each object type has dedicated zone111- **Slabs and per-CPU caches** - Decentralized allocation112- **Encoded freelist pointers** - XOR-encoded with per-zone secret113- **Guarded allocations** - Guard pages around critical objects114- **PPL/SPTM protection** - Hardware-enforced page protection115- **PAC on pointers** - Function pointers, vtables protected116117**Allocation Flow:**1181. Type lookup → `kalloc_type_<object>` zone1192. Check per-CPU cache1203. If empty → global freelist1214. If empty → allocate new slab1225. Return chunk with encoded freelist pointer123124**Comparison:**125126| Feature | Old Heap | Modern Heap |127|---------|----------|-------------|128| Granularity | Size-based | Size + type-based |129| Predictability | High | Low |130| Freelist | Raw pointers | Encoded pointers |131| Adjacency control | Easy | Hard |132| Exploit reliability | High | Low |133134## Userland Heap (xzone malloc)135136**Modern iOS userland allocator (iOS 17+):**137138**Architecture:**139- **Segment groups** - Partition by usage (data, pointer_xzones, data_large, pointer_large)140- **Metadata slabs** - Out-of-line metadata separate from payloads141- **Chunks and blocks** - Chunks for size classes, blocks for allocations142- **Guard pages** - Unmapped slices between chunks143- **Type IDs** - `malloc_type_id_t` for type-aware allocation144145**Security Features:**146- Metadata decoupling from object payloads147- Guard pages catch out-of-bounds writes148- Type-based segregation prevents cross-type reuse149- EMTE/MIE integration for tag checking150- Delayed reuse, poisoning, quarantine for freed blocks151- Randomized placement within chunks152153## Exception Handling in XNU154155**Exception Flow:**1561. CPU triggers synchronous exception1572. Low-level trap handler (`trap.c`, `exception.c`)1583. `exception_triage()` routes exception1594. Delivers to: thread port → task port → host port1605. If unhandled → BSD signal or kernel panic161162**Exception Ports:**163```c164task_set_exception_ports()165thread_set_exception_ports()166host_set_exception_ports()167```168169**Mach Exception to Signal Mapping:**170171| Mach Exception | Signal |172|----------------|--------|173| EXC_BAD_ACCESS | SIGSEGV/SIGBUS |174| EXC_BAD_INSTRUCTION | SIGILL |175| EXC_ARITHMETIC | SIGFPE |176| EXC_SOFTWARE | SIGTRAP |177| EXC_BREAKPOINT | SIGTRAP |178| EXC_CRASH | SIGKILL |179| EXC_ARM_PAC | SIGILL (non-fatal) |180181**PAC Exceptions:**182- `EXC_ARM_PAC` raised on signature mismatch183- `TFRO_PAC_EXC_FATAL` flag makes PAC failures fatal (bypasses debugger)184- Platform binaries use fatal PAC exceptions185186## Exploitation Tools187188### Ghidra + BinDiff Setup189190**Installation:**1911. Download BinDiff DMG from https://www.zynamics.com/bindiff/manual1922. Install BinDiff1933. Open Ghidra, go to File → Install Extensions1944. Add `/Applications/BinDiff/Extra/Ghidra/BinExport`1955. Install even with version mismatch196197**Kernel Version Diffing:**1981. Download iOS IPSW files from https://ipsw.me/1992. Decompress to extract kernelcache binaries2003. Load both kernelcaches in Ghidra2014. Export as "Binary BinExport (v2) for BinDiff"2025. Open BinDiff, create workspace with primary (vulnerable) and secondary (patched)203204### Finding XNU Versions205206Check iOS version to XNU mapping at: https://www.theiphonewiki.com/wiki/kernel207208Example: iOS 15.1 RC/15.1/15.1.1 → Darwin Kernel Version 21.1.0 (xnu-8019.43.1~1)209210## Modern Exploit Chain Patterns211212### JSKit-Based Safari Chains213214**Pattern:**215```216WebKit renderer RCE → kernel IPC UAF → kernel arbitrary R/W → code-sign bypass → unsigned system stager217```218219**Key Components:**220- **JSKit framework** - Reusable JavaScript-level arbitrary read/write primitive221- **Version abstraction** - PAC bypass modules for different iOS releases222- **Manual Mach-O mapping** - In-memory payload loading without filesystem artifacts223- **Portfolio model** - Multiple interchangeable WebKit exploits224225### Kernel Bridge Pattern226227**CVE-2023-41992 (IPC UAF):**228- Kernel use-after-free in IPC code229- Re-allocate freed object from userland230- Abuse dangling pointers for arbitrary kernel R/W231232**CVE-2023-41991 (Code-sign bypass):**233- Patch trust cache / code-signing structures234- Unsigned payloads execute as `system`235- Expose lightweight kernel R/W service236237### PREYHUNTER Helper Modules238239**Watcher anti-analysis:**240- Checks `security.mac.amfi.developer_mode_status`241- Detects diagnosticd, jailbreak traces (Cydia, bash, tcpdump, frida, sshd)242- Detects AV apps (McAfee, Avast, Norton)243- Blocks on custom HTTP proxy or root CAs244245**Helper surveillance:**246- `/tmp/helper.sock` communication247- DMHooker/UMHooker hook sets248- VOIP audio capture (`/private/var/tmp/l/voip_%lu_%u_PART.m4a`)249- System-wide keylogger250- Photo capture without UI251- SpringBoard notification suppression252253**HiddenDot suppression:**254- Hooks `SBSensorActivityDataProvider._handleNewDomainData:`255- Zeroes Objective-C `self` pointer256- Drops camera/mic indicator updates257258## Research Workflow259260### Step 1: Identify Target iOS Version2612621. Check iOS version and corresponding XNU kernel version2632. Download IPSW files for vulnerable and patched versions2643. Extract kernelcache binaries265266### Step 2: Set Up Analysis Environment2672681. Install Ghidra and BinDiff2692. Load kernelcaches in Ghidra2703. Export BinExport format2714. Create BinDiff workspace272273### Step 3: Analyze Mitigations2742751. Identify which mitigations are active (PAC, BTI, KTRR, PPL, etc.)2762. Determine hardware generation (A12+, A15+, etc.)2773. Check for EMTE/MIE support2784. Map out kernel heap structure (kalloc_type zones)279280### Step 4: Identify Vulnerability Class2812821. Determine if userland or kernel vulnerability2832. Check for heap corruption, UAF, OOB, type confusion2843. Map to appropriate heap structure (kernel kalloc_type or userland xzone)2854. Identify available primitives (read/write, control flow)286287### Step 5: Plan Exploitation2882891. Assess mitigation bypass requirements (PAC, BTI, etc.)2902. Determine if info leak needed for ASLR/KASLR2913. Plan heap grooming strategy (if applicable)2924. Identify code-sign bypass path (if kernel)293294### Step 6: Execute and Validate2952961. Implement exploit chain2972. Test on target iOS version2983. Validate each stage (primitive → bypass → payload)2994. Document findings and patterns300301## Key References302303- **XNU Source:** `osfmk/kern/exception.c`, `osfmk/arm64/trap.c`, `bsd/kern/kern_sig.c`304- **PAC Research:** [bazad.github.io](https://bazad.github.io/presentations/BlackHat-USA-2020-iOS_Kernel_PAC_One_Year_Later.pdf)305- **PAC Bypasses:** [i.blackhat.com](https://i.blackhat.com/BH-US-23/Presentations/US-23-Zec-Apple-PAC-Four-Years-Later.pdf)306- **Project Zero:** [googleprojectzero.blogspot.com](https://googleprojectzero.blogspot.com/2020/01/remote-iphone-exploitation-part-3.html)307- **Synacktiv:** [synacktiv.com](https://www.synacktiv.com/en/publications/ios-184-dlsym-considered-harmful)308- **Epsilon:** [blog.epsilon-sec.com](https://blog.epsilon-sec.com/tag/pac.html)309- **Jamf Predator Analysis:** [jamf.com/blog](https://www.jamf.com/blog/predator-spyware-ios-recording-indicator-bypass-analysis/)310- **Google Threat Intel:** [cloud.google.com/blog](https://cloud.google.com/blog/topics/threat-intelligence/intellexa-zero-day-exploits-continue)311312## Quick Reference Commands313314```bash315# Install BinDiff extension in Ghidra316ghidraRun317# File → Install Extensions → Add /Applications/BinDiff/Extra/Ghidra/BinExport318319# Download iOS IPSW files320# Visit https://ipsw.me/ and download target versions321322# Decompress IPSW to extract kernelcache323# Use standard archive tools to extract .ipsw → .dmg → kernelcache324325# Check XNU version for iOS326# Visit https://www.theiphonewiki.com/wiki/kernel327```328329## Common Pitfalls3303311. **Assuming PAC is bypassable** - Kernel PAC is highly robust; focus on userland bypasses3322. **Ignoring type-based heap** - Modern kalloc_type separates object types; heap sprays less effective3333. **Overlooking EMTE** - Memory tagging catches UAF/OOB immediately on supported hardware3344. **Missing PPL/SPTM** - Page protection layers prevent arbitrary kernel memory modification3355. **Forgetting PAC exceptions** - `TFRO_PAC_EXC_FATAL` prevents debugger interception on platform binaries3366. **Assuming freelist poisoning works** - Encoded freelist pointers require key knowledge3377. **Ignoring PAN/PXN** - Kernel cannot access/execute user memory by default338339## When to Escalate340341If the user needs:342- Specific exploit code implementation343- Detailed binary analysis of a specific vulnerability344- Custom tool development for iOS exploitation345- Legal/ethical guidance on exploitation research346347Provide the conceptual framework and direct them to appropriate resources or suggest they consult with security professionals for implementation details.