3 ms·
The chain of trust on macOS is… complicated. Too complicated. Apple binaries are validated in at least three different ways: 1. By the kernel using a root ce
by comex 6y ago
The chain of trust on macOS is… complicated. Too complicated. Apple binaries are validated in at least three different ways:
1. By the kernel using a root certificate hardcoded into the CoreTrust kext;
2. On Apple Silicon only, by the kernel using a trust cache that's supplied to the kernel by the bootloader;
3. By userland (amfid) using a root certificate hardcoded into Security.framework.
You'd have to modify or intercept all of those things, and key components aren't open source (e.g. the AppleMobileFileIntegrity kext which is responsible for querying CoreTrust, the trust cache, and amfid). Probably best to do some targeted function hooking rather than recompiling anything.
Of course, you would still have to turn off Secure Boot in order to load a modified kernel in the first place. But that's largely orthogonal to SIP.
- saagarjha 6y agoIt might be easier to patch AMFI to allow the "alternate trusted keys" mechanism to work.