Demystifying the Secure Enclave Processor
The secure enclave processor (SEP) was introduced by Apple as part of the A7 SOC with the release of the iPhone 5S, most notably to support their fingerprint technology, Touch ID. SEP is designed as a security circuit configured to perform secure services for the rest of the SOC, with no direct access from the main processor. In fact, the secure enclave processor runs its own fully functional operating system dubbed SEPOS with its own kernel, drivers, services, and applications. This isolated hardware design prevents an attacker from easily recovering sensitive data (such as fingerprint information and cryptographic keys) from an otherwise fully compromised device. In this paper, we aim to shed some light the secure enclave processor and delve into the internals of SEPOS. In particular, we look at the SEPOS architecture itself and detail how the iOS kernel and the SEP exchange data using an elaborate mailbox mechanism. Furthermore, we show how this data is handled by SEPOS and relayed to its services and applications in order to allow iOS to interact with endpoints exposed by the SEP. Finally, we evaluate the SEP attack surface, its attack robustness, and highlight potential attack vectors.