Trigon: Exploiting coprocessors for fun and for profit (part 2)
The Trigon kernel exploit was extended to A9(X) and A11 devices by using coprocessor page tables and the Always-On Processor (AOP) to bypass KTRR and gain physical read/write. An attacker with the exploit could achieve deterministic kernel read/write on these devices.
alfiecg.uk
Published on alfiecg.uk
A few months ago, I released a kernel exploit called Trigon. It was significant in that it was deterministic - that is, it cannot fail.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the kernel's physical mapping primitive did not prevent mapping coprocessor page tables, allowing the AOP's memory to be accessed and its firmware hooked.
Impact
An attacker with the Trigon exploit could achieve deterministic kernel read/write on A9(X) and A11 devices, bypassing KTRR protections.
What the attacker needed
Physical access to device; iOS 13-15 on A9(X)/A11; Trigon exploit primitive
How it was found
- Locate the AOP firmware base via the iboot-handoff region.
- Dump and analyse the firmware to find a frequently called function.
- Overwrite the function to execute custom shellcode and confirm control.
- Read TTBR0 and TTBR1 from the AOP's system registers.
- Map shared pages into the AOP's address space and install a hook.
- Use the hook to perform arbitrary physical reads and writes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a technical write-up about improving a kernel exploit for iPhones. The author found a way to use a small secondary processor (the Always-On Processor) to read and write memory that the main processor normally protects. This lets the exploit work on more iPhone models.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.