diff --git a/26.3-vulnerability.md b/26.3-vulnerability.md index 2e7eeaa..9f7aa7a 100644 --- a/26.3-vulnerability.md +++ b/26.3-vulnerability.md @@ -1,385 +1,340 @@ -# iOS 26.3 Bypass Research: VU#346053 XML Payload Injection +# iOS 26.3 Bypass Research -**Status:** RESEARCH / FUTURE WORK -- Not implemented in current version. -tr4mpass v1 targets iOS <= 26.1 only. This document describes a potential -bypass vector for iOS 26.2+ that requires further testing and validation. +**Status:** ACTIVE RESEARCH -- Live device testing completed 2026-04-06. +Multiple attack vectors tested on iPad8,10 (A12Z) iOS 26.3. -**Last updated:** 2026-04-05 +**Last updated:** 2026-04-06 --- -## Background: Why Current Methods Fail at iOS 26.2+ +## Live Device Testing Results + +### Device Under Test +- Model: iPad Pro 11-inch (2nd gen, Cellular) -- iPad8,10 +- Chip: A12Z Bionic (CPID: 0x8027) +- iOS: 26.3 +- UDID: 00008027-001C484C3A62802E +- Serial: DMPC20KDPV13 +- IMEI: 356622100389197 + +--- + +## What Apple Changed in iOS 26.2+ + +### Factory Activation Commands REMOVED +The most critical change: Apple completely removed the factory activation +code path from `mobileactivationd` on iOS 26.2+. The following commands +existed on iOS 26.1 but return "Received unknown command" on iOS 26.3: + +- `CreateTunnel1FactoryActivationInfoRequest` +- `CreateFactoryActivationInfoRequest` +- `HandleFactoryActivationInfoRequest` +- `FactoryActivateRequest` +- `DeactivateRequest` + +This is what broke Checkm8.info and iRemoveTools. They used the factory +activation path (FActivation / `createFActivationInfo`), which no longer +exists. + +### Only 6 Commands Remain on iOS 26.3 +Brute-force enumeration of 1,800+ command names confirmed only these work: + +1. `GetActivationStateRequest` -- returns "Unactivated" +2. `CreateTunnel1SessionInfoRequest` -- returns CollectionBlob + HandshakeRequestMessage +3. `CreateActivationInfoRequest` -- fails (DRM session locked) +4. `HandleActivationInfoRequest` -- accepts Value, validates nonce +5. `HandleActivationInfoWithSessionRequest` -- accepts Value + headers, validates nonce +6. `DeactivateRequest` -- returns {} (already unactivated) + +### Activation Nonce Enforcement +Every activation attempt returns "Invalid activation nonce" (Error Code -1). +The nonce is generated by the FairPlay DRM engine inside `mobileactivationd`. +The DRM session refuses to establish on iCloud-locked devices because the +FairPlay engine checks the lock status LOCALLY before generating the nonce. + +--- + +## USB Attack Vectors Tested + +### Activation Protocol (all failed -- nonce barrier) +| Attempt | Result | +|---------|--------| +| HandleActivationInfoRequest with crafted record | Code -1: Invalid activation nonce | +| HandleActivationInfoWithSessionRequest + headers | Code -1: Invalid activation nonce | +| FDR-LOCAL signed activation record | Nonce check happens before cert validation | +| Host-key signed activation record | Same nonce error | +| Escrow bag as activation credential | Same nonce error | +| Personalization nonce as activation nonce | Wrong crypto domain | +| activate_with_session (pymobiledevice3) | Accepted silently, state unchanged | +| set_value ActivationState "Activated" | Accepted, overridden by mobileactivationd | +| drmHandshake with real Apple + session blob | Apple returns 200, device: "Invalid input" (DRM locked) | +| Full Apple proxy (handshake + activation) | Apple returns buddyml (iCloud login form) | + +### Filesystem Manipulation (AFC -- sandboxed) +| Attempt | Result | +|---------|--------| +| Write SkipSetup to /iTunes_Control/iTunes/ | Written, ignored after reboot | +| Write SetupDone to /iTunes_Control/iTunes/ | Written, ignored after reboot | +| Write .mobileconfig profiles | Written, not auto-installed | +| Write WiFi configuration plist | Written, not processed | +| Write crafted downloads.28.sqlitedb (bookassetd exploit) | Written, not processed on 26.3 | +| Write BLDatabaseManager.sqlite | Written, not processed on 26.3 | +| AFC path traversal (../, absolute, encoded) | Blocked (status 7/8) | +| Symlink creation to outside sandbox | Blocked (status 15) | + +### Lockdownd Flag Manipulation +25 out of 27 flags set and verified persistent across reboot: + +| Domain | Key | Value | Persists | +|--------|-----|-------|----------| +| default | allow-hactivation | True | Yes | +| default | DisableHactivation | True | Yes | +| default | IsProtoDevice | True | Yes | +| default | FactoryDevice | True | Yes | +| default | InternalBuild | True | Yes | +| default | FDRForceLegacySigning | True | Yes | +| default | FDRSkipSealing | True | Yes | +| default | TrustedHostAttached | True | Yes | +| com.apple.mobile.iTunes | SetupComplete | True | Yes | +| com.apple.mobile.iTunes | BuddySetupComplete | True | Yes | +| com.apple.purplebuddy | SetupState | Finished | Yes | +| com.apple.purplebuddy | buddyComplete | True | Yes | +| com.apple.purplebuddy | SkipSetup | True | Yes | +| com.apple.mobile.data_sync | BuddyComplete | True | Yes | +| com.apple.MobileActivation | allow-hactivation | True | Yes | + +**None of these flags affect the activation state.** `mobileactivationd` +reads the SEP state, not lockdownd key-value pairs. The hactivation and +factory flags are only read by `restored_external` during DFU restore flows. + +### Recovery Mode +| Attempt | Result | +|---------|--------| +| setenv activation-related NVRAM vars | Accepted, don't survive A12+ boot | +| setenv boot-args skip-activation=1 | Accepted, no effect | +| Capture NONC/SNON nonces | Successful | +| Roll personalization nonce | Successful (different crypto domain) | + +### Other Vectors +| Attempt | Result | +|---------|--------| +| Boot timing race (200 rapid activations) | All rejected atomically | +| mobileactivationd fuzzing (500KB payloads) | No crashes, graceful error handling | +| Notification proxy activation signals | Accepted, no state change | +| Device pairing + trust tap | Paired, no new services unlocked | +| Escrow bag keybag unlock | No useful keybag on first-boot device | +| Developer mode enable | Blocked on locked device | +| mobile_image_mounter queries | Service available, no images mountable | + +--- + +## Firmware Analysis Discoveries + +### FDR-LOCAL Private Keys (Extractable from IPSW) +Apple's FairPlay Data Recovery local signing keys are embedded in +`libFDR.dylib` on the restore ramdisk. Extractable with `strings` command +from any publicly downloadable IPSW. + +- **RSA-2048 Private Key** -- CN=FDR-LOCAL-V1, O=Apple Inc., OU=CoreOS + - Self-signed, valid 2022-2032, SHA1 signature (deprecated) + - Email: fdr-dev@group.apple.com (development artifact) +- **ECDSA P-256 Private Key** -- CN=FDR-LOCAL, O=Apple Inc., OU=Devices + - Signed by FDR-CA1-ROOT-LOCAL, valid 2022-2032 + +Both keys verified valid with OpenSSL. Identical across both ramdisks in +the same IPSW (universal, not per-device). + +Functions using these keys: `AMFDRCryptoCreateLocalSignedCertificateData`, +`AMFDRCryptoCreateLocalSignedFDRCertificateData`, +`AMFDRCryptoCreateLocalSignedDataSignature`. + +**Impact:** Records signed with these keys are accepted by the activation +daemon (no format error), but the activation nonce check happens BEFORE +certificate chain validation, so the nonce barrier must be overcome first. + +### Hactivation Flags in restored_external +The restore daemon (`restored_external` on the ramdisk) contains: +- `DisableHactivation` -- disable hacktivation checks +- `allow-hactivation` -- allow hacktivation +- `[TEST] Apple iPhone Activation` -- test activation certificate +- `FDRForceLegacySigning` -- force legacy signing path +- `FDRSkipSealing` -- skip FDR sealing +- `FillmoreBypassOTDataPersist` -- bypass flag + +These are only read during DFU restore flows, not by the normal +`mobileactivationd` on the running iOS system. + +### Kernel Analysis (59MB Mach-O arm64e extracted from IPSW) +- `AppleKeyStoreTestUserClient` exists in kernel (test IOKit interface) +- IOCommandGate race condition surface (CVE-2026-20687 target) +- `mobileactivationd` paths referenced in kernel +- Kernel exploit cannot be triggered over USB (needs code execution first) + +--- + +## WiFi Captive Portal Attack (Partially Successful) + +### What Worked +1. **DNS interception** -- Python DNS server on port 53 intercepts all Apple + domain queries from the iPad. `captive.apple.com`, `albert.apple.com`, + `mesu.apple.com` all resolve to our server IP (192.168.2.106). + +2. **HTTP captive portal** -- iPad probes `http://captive.apple.com/hotspot-detect.html` + over plain HTTP. Our server returns a non-"Success" response. iOS WebSheet + opens automatically on the activation lock screen. + +3. **JavaScript execution in WebSheet** -- Our HTML page with embedded JavaScript + executes inside WebSheet on the activation-locked iPad. Confirmed by XHR + callback to our server containing device info: + ```json + { + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15", + "url": "http://captive.apple.com/hotspot-detect.html", + "screen": "834x1194" + } + ``` + JavaScript runs on EVERY reboot when the iPad reconnects to the WiFi network. + +4. **HTTPS connection attempts** -- After captive portal check, the iPad + attempts HTTPS connections to `albert.apple.com:443` (our server). TCP + handshake completes, TLS ClientHello sent, ~1.5KB of data exchanged. + +### What Failed +5. **HTTPS certificate validation** -- iOS rejects our self-signed certificate + for `albert.apple.com`. The iPad sends RST after TLS handshake, closing + the connection. Apple uses certificate pinning on activation endpoints. + +6. **Profile installation from WebSheet** -- Clicking the profile download + link in WebSheet returns "fout bij laden pagina" (page loading error). + WebSheet on the activation lock screen cannot install configuration profiles + despite having the `com.apple.managedconfiguration.profiled-access` + entitlement. + +7. **JavaScript URL scheme escape** -- URL schemes (prefs:, App-prefs:, + diags://, legacy-diagnostics://) attempted via iframe injection. No + observable effect on the device (schemes likely blocked in WebSheet sandbox). + +### The Remaining Barrier: HTTPS Certificate Pinning +The iPad makes activation requests over HTTPS to `albert.apple.com:443`. +iOS certificate-pins this endpoint. Our self-signed certificate (even signed +by our Root CA) is rejected during TLS handshake. Without being able to MITM +the HTTPS connection, we cannot serve fake activation responses. + +To overcome this, one of the following would be needed: +- A WebKit RCE exploit to escape WebSheet and install the Root CA programmatically +- An HTTP (non-HTTPS) activation endpoint +- A way to disable certificate pinning from within WebSheet's JavaScript context +- A vulnerability in iOS's TLS implementation + +--- + +## Services Available on Activation-Locked iPad8,10 iOS 26.3 + +| Service | Available | Notes | +|---------|-----------|-------| +| com.apple.mobileactivationd | Yes | 6 commands only | +| com.apple.afc | Yes | Read/write to /var/mobile/Media/ | +| com.apple.mobile.diagnostics_relay | Yes | Reboot, shutdown, sleep | +| com.apple.syslog_relay | Yes | Live system logs | +| com.apple.pcapd | Yes | Network packet capture | +| com.apple.crashreportcopymobile | Yes | Crash log access | +| com.apple.mobile.mobile_image_mounter | Yes | No images mountable | +| com.apple.mobile.notification_proxy | Yes | Send/receive notifications | +| com.apple.os_trace_relay | Yes | OS trace logs | +| com.apple.mobile.heartbeat | Yes | Keepalive | +| com.apple.afc2 | No | Root filesystem blocked | +| com.apple.mobile.MCInstall | No | Profile installer blocked | +| com.apple.webinspector | No | Web inspector blocked | +| com.apple.mobile.installation_proxy | No | App installer blocked | +| com.apple.misagent | No | Blocked | + +--- + +## Captured Data + +All saved in `captive_portal/server/requests/`: +- Apple's real drmHandshake response (serverKP, FDRBlob, SUInfo, HandshakeResponseMessage) +- Device session blobs (CollectionBlob 26KB, HandshakeRequestMessage 21B) +- Device nonces from recovery mode (NONC, SNON) +- JavaScript callback data from WebSheet (user agent, screen size, URL) +- IngestBody JSON (serial, IMEI, UDID, productType, scrt-part2, pcrt crypto blobs) + +--- + +## Potential Paths Forward + +### Path 1: WebKit RCE via Captive Portal (Highest Potential) +We have JavaScript execution in WebSheet. If a WebKit vulnerability exists +on iOS 26.3 that can be triggered from JavaScript, we could achieve code +execution in the WebSheet process. From there: +1. Use WebSheet's `profiled-access` entitlement to install Root CA +2. With Root CA trusted, MITM albert.apple.com HTTPS +3. Serve crafted activation response +4. Or: use `opensensitiveurl` entitlement to launch unsandboxed diagnostics app + +CVEs to investigate: CVE-2026-20698 (kernel, patched 26.4), CVE-2026-20687 +(kernel IOCommandGate UAF, patched 26.4) -- both exist on 26.3 but need +WebKit entry point first. + +### Path 2: HTTP Activation Endpoint Discovery +If Apple has ANY activation-related endpoint that accepts HTTP (not HTTPS), +we can inject responses without the certificate pinning barrier. The captive +portal detection itself uses HTTP -- there may be other setup-phase endpoints +that haven't been upgraded to HTTPS-only. + +### Path 3: TLS Downgrade Attack +During the captive portal phase, iOS may temporarily relax TLS validation +to allow authentication with arbitrary hotspot login pages. If this relaxation +window can be extended or exploited, HTTPS MITM might be possible during +the transition from captive portal to activation. + +### Path 4: Firmware Diff (iOS 26.1 vs 26.3) +Obtain the iOS 26.1 IPSW and diff `mobileactivationd` against 26.3. The +exact nonce check Apple added would be visible in the binary diff. This +might reveal a bypass condition or code path that skips the nonce. + +--- + +## Background: Why Current Methods Fail tr4mpass implements two bypass paths for iCloud activation lock removal: -- **Path A (A5-A11):** DFU mode -> checkm8 BootROM exploit -> checkra1n - jailbreak -> NVRAM unlock -> local activation record injection. -- **Path B (A12+):** DFU mode -> device identity/serial descriptor - manipulation -> drmHandshake session mode activation protocol. +- **Path A (A5-A11):** DFU -> checkm8 BootROM exploit -> jailbreak -> NVRAM + unlock -> local activation record injection. +- **Path B (A12+):** DFU -> identity manipulation -> drmHandshake session + mode activation protocol. -Both paths stop working at iOS 26.2 because Apple hardened four independent -security layers that these methods depend on subverting: +Both fail on iOS 26.2+ due to four hardened security layers: -### Layer 1: Server-Mandatory Activation - -Apple moved the source of truth for device activation entirely to their -servers at `https://humb.apple.com/humbug/baa`. The device cannot -self-activate without a valid server-signed activation certificate. Local -activation record injection -- the core technique used in both Path A and -Path B for iOS <= 26.1 -- gets rejected because the device demands a -server-issued cryptographic signature that cannot be forged locally. - -### Layer 2: MEID-Based Activation Record Signing - -Starting with iOS 17, Apple requires activation records to be -cryptographically signed using device-specific MEID data. The device -validates this signature at boot time. Records that are unsigned or signed -with incorrect MEID data are rejected by the bootloader before iOS even -begins loading. This prevents generic or re-used activation records from -working across devices. - -### Layer 3: Secure Enclave (SEP) Activation State - -On A12+ devices, the activation state is stored inside the Secure Enclave -Processor (SEP). The SEP is a physically separate processor running its own -firmware (SEPOS), isolated from the main application processor. Even with -full root access to iOS, the SEP state cannot be modified. The communication -protocol between iOS and SEP changes between iOS versions, breaking any -existing handshake implementations. No public exploit exists for A12+ SEP -as of April 2026. The 2020 "unpatchable" SEP exploit only affects A7-A11 -chips and does not apply here. - -### Layer 4: Code Signing Persistence (CoreTrust/AMFI) - -Any on-device binary modification (such as patching mobileactivationd) causes -the binary to lose its Apple code signature. AMFI (Apple Mobile File Integrity) -terminates unsigned processes. TrollStore previously exploited a CoreTrust -vulnerability (CVE-2023-41991) to bypass this enforcement, but Apple patched -it in iOS 17.0.1. No replacement bypass exists for iOS 18+. This means any -bypass that modifies on-device binaries is inherently tethered -- all changes -revert on reboot. +1. **Server-mandatory activation** -- device requires server-signed cert +2. **MEID-based record signing** -- records must be signed with device MEID +3. **Secure Enclave activation state** -- stored in SEP, not modifiable +4. **Code signing persistence** -- AMFI kills unsigned binaries --- -## VU#346053: XML Payload Injection (Primary Vector) +## VU#346053: XML Payload Injection -### Discovery and Disclosure Timeline +### Status +Unpatched as of April 2026. The vulnerability in `humb.apple.com/humbug/baa` +accepts unauthenticated XML payloads without signature validation. -A critical vulnerability in Apple's iOS activation backend was discovered by -security researcher JGoyd. The vulnerability allows unauthenticated XML -payload injection into Apple's device provisioning system during the -activation phase. - -| Date | Event | -|-------------------|---------------------------------------------------------| -| May 19, 2025 | Reported to Apple and US-CERT (assigned VU#346053) | -| June 26, 2025 | Public disclosure via Full Disclosure mailing list | -| April 2026 | Still UNPATCHED -- nearly 11 months after report | - -### Technical Details - -**Vulnerable Endpoint:** `https://humb.apple.com/humbug/baa` - -This is the same activation endpoint that Apple relies on for server-mandatory -activation (Layer 1 above). The vulnerability exists in how this endpoint -processes incoming requests: - -1. **No sender authentication.** The endpoint accepts XML .plist payloads - from any source without verifying the identity of the sender. There is no - client certificate requirement, no API key validation, and no session token - enforcement for incoming provisioning requests. - -2. **No signature validation on payloads.** The XML payloads themselves are - not required to carry a cryptographic signature. The endpoint parses and - processes arbitrary plist structures without verifying their integrity or - origin. - -3. **DOCTYPE declarations accepted.** The XML parser does not restrict or - strip DOCTYPE declarations from incoming payloads. This opens the door to - XML External Entity (XXE) attacks, potentially allowing the attacker to - read server-side files, make outbound network requests from the server, or - cause denial-of-service conditions. - -4. **Arbitrary provisioning changes.** Because the endpoint processes - unauthenticated payloads, an attacker can inject crafted XML that triggers - provisioning state changes for a target device during the setup phase. - -5. **Pre-activation attack surface.** The vulnerability is exploitable during - the Setup Assistant phase -- before the device has completed activation. - This is the exact window where iCloud activation lock enforcement occurs. - -### Tested Environment - -The vulnerability was confirmed on iOS 18.5. Given that Apple has not patched -the endpoint and the flaw is server-side (not device-side), it likely affects -all iOS versions that use this activation endpoint, including iOS 26.3. - -### Delivery Method - -The payload can be delivered via a **captive portal / rogue access point** -setup: - -- No jailbreak required on the target device. -- No physical manipulation of the device hardware. -- No BootROM exploit needed. -- Works entirely over the network during the WiFi setup phase. - ---- - -## Proposed Attack Chain for iOS 26.3 - -The following describes a theoretical bypass flow using VU#346053. This has -NOT been tested against iOS 26.3 and requires validation. - -### Step 1: Set Up Local Captive Portal - -Deploy a rogue WiFi access point with the following components: - -- **DHCP server:** Assigns IP addresses to connecting devices and advertises - the local DNS server. -- **DNS server:** Intercepts DNS queries and redirects Apple's activation - endpoints to the local HTTP server. Key domains to intercept: - - `humb.apple.com` (activation endpoint) - - `albert.apple.com` (device services) - - `captive.apple.com` (captive portal detection) -- **HTTP server:** Serves crafted responses to activation requests. Handles - the captive portal detection flow to ensure the device connects through the - rogue AP rather than prompting the user to authenticate. - -### Step 2: Device Connects During Setup Assistant - -When a locked iOS device is being set up: - -1. User reaches the WiFi selection screen in Setup Assistant. -2. Device connects to the rogue AP (presented as an open or known network). -3. iOS detects captive portal and routes activation traffic through it. - -### Step 3: DNS Redirect Activation Requests - -The local DNS server intercepts the device's DNS query for -`humb.apple.com` and resolves it to the local HTTP server's IP address. -All subsequent activation requests from the device are routed to the -attacker-controlled server. - -### Step 4: Inject Crafted XML Payload - -When the device sends its activation request to what it believes is -`humb.apple.com/humbug/baa`, the local server responds with a crafted XML -.plist payload. This payload exploits VU#346053 to inject provisioning -changes into the activation flow. - -The exact payload structure requires further research based on the PoC at -https://github.com/JGoyd/iOS-Activation-Flaw. - -### Step 5: Provisioning Changes Bypass Activation Lock - -The injected payload delivers provisioning state changes that cause the -device to accept a bypass activation state. Because the injection targets -the server endpoint's processing logic, the device receives what appears -to be a legitimate server response. - -### Step 6: Device Completes Setup - -If the injection succeeds, the device proceeds past the activation lock -screen and completes Setup Assistant normally. No on-device binary -modification occurs. No jailbreak is installed. - ---- - -## How VU#346053 Bypasses Each Security Layer - -### Layer 1: Server-Mandatory Activation - -**Status: DIRECTLY BYPASSED** - -The vulnerability exists in the server endpoint itself -(`humb.apple.com/humbug/baa`). Server-mandatory activation is only as -strong as the server's input validation. Because the endpoint accepts -unauthenticated XML payloads without signature verification, an attacker -who can intercept the network traffic (via captive portal) can inject -arbitrary provisioning data. The server-mandatory requirement becomes -irrelevant because the attack operates at the server communication layer. - -### Layer 2: MEID-Based Record Signing - -**Status: POTENTIALLY BYPASSED** - -The injection happens at the provisioning level, before the device constructs -its locally-signed activation record. If the provisioning changes are applied -at the server layer before MEID-based record signing validation occurs, the -device may never reach the point where it checks for a signed record. The -provisioning state change could preempt the signing requirement entirely. - -This requires validation: it is possible that the device performs MEID -signing checks independently of the server provisioning state. - -### Layer 3: Secure Enclave (SEP) - -**Status: CONDITIONALLY BYPASSED** - -If the activation endpoint returns a response that appears to be a valid, -server-authorized activation, the SEP may accept this state as legitimate. -The SEP's activation state storage is designed to trust server-issued -activation certificates. If the injected response mimics the format of a -genuine server response closely enough, the SEP could store the activation -state without raising an error. - -This is the highest-risk assumption in the attack chain. SEP validation -behavior against spoofed server responses has not been publicly documented. - -### Layer 4: Code Signing (CoreTrust/AMFI) - -**Status: FULLY BYPASSED** - -No on-device binary modification occurs at any point in this attack chain. -The bypass operates entirely at the network/server communication layer. -mobileactivationd, lockdownd, and all other system binaries remain -unmodified and retain their Apple code signatures. AMFI enforcement is -never triggered because no unsigned code is executed. - ---- - -## Open Research Questions - -### Persistence Across Reboots - -Does the bypass survive a device reboot? If the activation state is stored -in SEP and the SEP accepted the spoofed response, it may persist. If the -device re-validates against Apple's real servers on boot, the bypass may -be tethered -- requiring re-injection on each power cycle. - -### SEP Re-Validation Behavior - -Does the Secure Enclave re-check activation state against the server on -every boot, or only during the initial activation? If it only checks once, -a successful injection during Setup Assistant would be permanent. If it -checks periodically, the bypass would need to persist the network -interception or find a way to prevent re-validation. - -### XXE Escalation Potential - -The endpoint accepts DOCTYPE declarations, which theoretically enables XXE -attacks. Can XML External Entity injection be used to: -- Read server-side files containing signing keys or certificates? -- Trigger server-side requests to internal Apple infrastructure? -- Retrieve a legitimately signed activation response for the target device? - -If XXE can be escalated to extract signing material, the bypass could -produce genuinely signed activation records that the device would accept -permanently. - -### Certificate Pinning on Activation Endpoint - -Does iOS implement TLS certificate pinning for `humb.apple.com`? If so, -the captive portal approach may need to operate at a layer below TLS -- -perhaps during the initial HTTP captive portal detection phase before the -device establishes a pinned TLS connection. The captive portal detection -flow (via `captive.apple.com`) typically uses plain HTTP, which could -provide a window for injection before pinned connections are established. - -Alternatively, if the captive portal flow causes iOS to relax certificate -validation temporarily (to allow authentication with arbitrary hotspot -login pages), this relaxation window could be exploited. - -### Exact Payload Format - -The specific XML .plist structure needed to trigger a successful activation -bypass has not been determined. The PoC demonstrates the injection -capability, but crafting a payload that results in the device accepting an -activation state requires understanding: - -- The expected response schema from the baa endpoint. -- Which provisioning fields control activation lock state. -- Whether device-specific data (ECID, serial, IMEI) must be present in the - injected response for the device to accept it. - ---- - -## Connection to Existing Infrastructure - -The parent `icloud_lock` project already contains a `captive_portal/` -directory with prototyped components directly applicable to this attack: - -| Component | File | Status | -|------------------|-------------------------|------------| -| DNS server | `dns_server.py` | Prototype | -| DHCP server | `dhcp_server.py` | Prototype | -| HTTP server | `server.py, server_v2.py` | Prototype | -| Beacon logger | `beacon.py` | Prototype | - -These Python prototypes handle the core captive portal mechanics: DNS -interception, DHCP assignment, HTTP response serving, and device connection -tracking. They were built for earlier research but provide a functional -foundation. - -For tr4mpass integration, these would be reimplemented in C (per project -standards) and extended with: - -- Apple activation endpoint emulation (response crafting for the baa endpoint). -- XML .plist payload generation (using libplist). -- TLS handling if certificate pinning can be circumvented. -- Device-specific payload templating based on ECID/serial/IMEI. - -This would become **Path C** in tr4mpass's bypass architecture, alongside -Path A (A5-A11 checkm8) and Path B (A12+ session mode). - ---- - -## Implementation Roadmap (Future) - -The following steps would be executed when research validates the approach -and we are ready to implement Path C. - -1. **Study VU#346053 PoC in detail.** - Clone and analyze https://github.com/JGoyd/iOS-Activation-Flaw. - Understand the exact injection mechanism, payload format, and server - response behavior. - -2. **Set up test environment with iOS 26.3 device.** - Obtain a test device running iOS 26.3 with iCloud activation lock - enabled. Configure isolated network environment for safe testing. - -3. **Implement C-based captive portal.** - Rewrite the existing Python DNS/DHCP/HTTP prototypes in C. Use raw - sockets for DNS and DHCP, libcurl or raw sockets for HTTP serving. - Must handle Apple's captive portal detection flow correctly. - -4. **Craft activation XML payload.** - Based on PoC analysis, build a .plist payload that targets the - provisioning state changes needed to bypass activation lock. Use - libplist for XML generation. Test with progressively complex payloads. - -5. **Test injection during Setup Assistant.** - Connect test device to rogue AP during Setup Assistant WiFi selection. - Monitor whether the device accepts the injected response and proceeds - past activation lock. - -6. **Verify persistence.** - If injection succeeds, reboot the device and check whether the bypass - persists. Document SEP behavior. If tethered, evaluate whether - automatic re-injection on boot (via persistent rogue AP) is viable. - -7. **Integrate as Path C in tr4mpass.** - If the bypass is validated: - - Add `src/captive_portal/` module with DNS, DHCP, HTTP components. - - Add `src/payload/` module for XML .plist generation. - - Extend `start.sh` to offer Path C for iOS 26.2+ devices. - - Build iOS-version-specific payload templates if needed. - - Add persistence handling (re-injection on boot if tethered). - ---- - -## References +### Our Testing +The captive portal + DNS interception works. The iPad resolves +`humb.apple.com` to our server. However, the endpoint uses HTTPS with +certificate pinning, so we cannot currently inject payloads. The VU#346053 +PoC likely worked on iOS 18.5 because the researcher had a way to bypass +the TLS layer (possibly via proxy with installed certificate on an unlocked +device). +### References | Source | URL | |--------|-----| | VU#346053 PoC | https://github.com/JGoyd/iOS-Activation-Flaw | -| Full Disclosure posting | https://seclists.org/fulldisclosure/2025/Jun/27 | +| Full Disclosure | https://seclists.org/fulldisclosure/2025/Jun/27 | | GBHackers analysis | https://gbhackers.com/apple-ios-activation-flaw-enables-injection/ | -| CyberSecurity News analysis | https://cybersecuritynews.com/apples-ios-activation-vulnerability/ | | Apple activation endpoint | https://humb.apple.com/humbug/baa | | DRM handshake endpoint | https://albert.apple.com/deviceservices/drmHandshake | -| CoreTrust CVE | CVE-2023-41991 (patched iOS 17.0.1) | -| SEP exploit scope | A7-A11 only (2020 disclosure, does not affect A12+) | -| tr4mpass design notes | notes/tr4mpass.md | -| iOS 26.2+ bypass notes | notes/future/ios_26_2_plus_bypass.md | +| gaster (checkm8 in C) | https://github.com/0x7ff/gaster | +| go-ios (activation protocol) | https://github.com/danielpaulus/go-ios | +| pymobiledevice3 | https://github.com/doronz88/pymobiledevice3 |