Boots an iPhone XS Max into badapple Linux from a Waveshare RP2350-USB-A, with no computer.
The board runs the usbliter8 bootrom exploit, then sends badapple's iBSS, device tree, trust cache, GPU and audio DMA (SIO) firmware and a small m1n1, which loads the rest from the phone's NVMe. The images are built into the firmware, xz packed.
A12 only fork of usbliter8 by Paradigm Shift. It adds:
- booting the phone after the exploit
- a payload pick on BOOT (boot, exploit only, passthrough), run with RESET
- the LED showing the pick and the result, then back to the pick for the next phone
Small code changes can make the exploit less reliable. How it works and debugging are in docs.
The bug is in the phone's USB controller, out of reach of a normal PC USB stack, so the exploit runs on a Waveshare RP2350-USB-A. Its USB-A port is wired to GP12 and GP13. Plug a Lightning to USB-A cable straight in and power the board from its USB-C port. USB-C to Lightning cables do not work.
R13 pulls D+ up, so the board keeps retrying with no phone. Removing it is optional.
Hold BOOT while plugging in the board and copy build/germin8.uf2 to the drive that shows up, or:
picotool load -x build/germin8.uf2
BOOT is the left button, RESET the right one.
- Put the phone in DFU mode while it is plugged into a PC. DFU from a broken LLB does not work.
- Move it to the board.
- Press BOOT to pick the payload. The pick is kept in the last flash sector.
- Boot: exploit, then boot the phone.
- Exploit only: leaves the phone in pwned DFU for badapple's
tools/iboot-boot.sh. - Passthrough: the phone shows up on the computer at the board's USB-C port, so
tools/iboot-boot.sh, irecovery and the rest work without moving the cable. Full speed only (12 Mbit/s). BOOT leaves it.
- Press RESET to run it.
- The result stays on the LED until BOOT (back to the pick) or RESET (run again).
| LED | meaning |
|---|---|
| white, fast blinking | starting, 2 s |
| yellow | Boot picked |
| magenta | Exploit only picked |
| cyan | Passthrough picked, or running with the phone there |
| cyan, blinking | passthrough waiting for the phone |
| blue | exploit running, or waiting for the phone |
| blue, fast blinking | sending the boot images |
| green | done |
| red, very fast blinking | failed |
The exploit takes about a second, the images about 2 minutes. Holding BOOT while plugging in the board, or while pressing RESET, starts its USB bootloader instead.
m1n1 boots the newest .bin on the phone's FAT partition; hold volume down for its menu. See badapple's docs for setting up the NVMe.
Needs CMake, Pico SDK with the lib/tinyusb submodule, picotool and the ARM toolchain. The exploit is timing sensitive (the RP2350 runs code from QSPI flash through a small cache), so use the tested versions:
- Pico SDK 2.2.0 (commit
a1438dff1d38bd9c65dbd693f0e5db4b9ae91779) - ARM toolchain 15.2.Rel1
cmake -S . -B build -DPICO_SDK_PATH=$PICO_SDK_PATH -DPICO_TOOLCHAIN_PATH=$PICO_TOOLCHAIN_PATH -DBADAPPLE_IBOOT=/path/to/badapple/build/iboot
cmake --build build
BADAPPLE_IBOOT is badapple's build/iboot after make images and make bootbin. SIO firmware is only there after make ticket. The images are Apple's and not in this repository. The board has 2 MB of flash, hence xz.
usbliter8 is by Paradigm Shift. Write-up in their blog post (try web.archive.org if it is down).
- @__gsch - bug & exploitation
- @hdesk@infosec.exchange - exploitation
- REDACTED - post-exploitation & development
Upstream's statement:
Neither Magnet Forensics nor any other corporation can stand in the way of disclosing vulnerabilities that affect millions of devices owned by ordinary citizens. Transparency and public awareness are fundamental to technical security and digital integrity.
SAY NO TO CENSORSHIP!
- sekigon-gonnoc - for the PIO USB library