现代 iOS 安全特性——深入剖析 SPTM、TXM 与 Exclaves
Modern iOS Security Features -- A Deep Dive into SPTM, TXM, and Exclaves
AI总结:
本文深入分析苹果新内核安全机制 SPTM、TXM 与 Exclaves,揭示其通过内存重类型化隔离功能、增强系统安全性,并首次全面阐述这些机制及其通信方式。
摘要:
XNU 内核是苹果操作系统的基础。尽管被标记为混合内核,但研究发现,通过定义一个包含所有系统功能的单一特权信任区域,XNU 通常以宏内核方式运行。这具有安全影响,因为内核一旦被攻破,会对整个系统产生直接且显著的影响。在过去几年中,苹果已采取措施向更分区化的内核架构和更接近微内核的设计迈进。迄今为止,尚无关于 SPTM 及相关安全机制的科学讨论。因此,对该系统及底层安全机制的理解非常有限。在本文中,我们对新的安全机制及其相互作用进行了全面分析,并首次撰写了考虑所有当前缓解措施的结论性报告。SPTM 作为内存重类型化的唯一权威。我们的分析揭示,通过基于帧重类型化和内存映射规则集的 SPTM 域,SPTM 将信任域引入系统,有效地将不同功能相互隔离。被隔离的功能包括负责代码签名和权利验证的 TXM。我们进一步展示了这一引入如何为最新的 Exclaves 安全特性奠定基础,并对其通信机制进行了深入分析。我们发现了多种通信方式,最值得注意的是作为安全世界请求处理器的 xnuproxy 以及 Tightbeam IPC 框架。研究发现,架构变更增强了系统安全性,关键和敏感组件被移出 XNU 的直接可达范围。这也为内核被攻破的情况提供了额外的安全保证,内核被攻破不再是对最高信任级别的即时威胁。
英文摘要:
The XNU kernel is the basis of Apple's operating systems. Although labeled as a hybrid kernel, it is found to generally operate in a monolithic manner by defining a single privileged trust zone in which all system functionality resides. This has security implications, as a kernel compromise has immediate and significant effects on the entire system. Over the past few years, Apple has taken steps towards a more compartmentalized kernel architecture and a more microkernel-like design. To date, there has been no scientific discussion of SPTM and related security mechanisms. Therefore, the understanding of the system and the underlying security mechanisms is minimal. In this paper, we provide a comprehensive analysis of new security mechanisms and their interplay, and create the first conclusive writeup considering all current mitigations. SPTM acts as the sole authority regarding memory retyping. Our analysis reveals that, through SPTM domains based on frame retyping and memory mapping rule sets, SPTM introduces domains of trust into the system, effectively gapping different functionalities from one another. Gapped functionality includes the TXM, responsible for code signing and entitlement verification. We further demonstrate how this introduction lays the groundwork for the most recent security feature of Exclaves, and conduct an in-depth analysis of its communication mechanisms. We discover multifold ways of communication, most notably xnuproxy as a secure world request handler, and the Tightbeam IPC framework. The architecture changes are found to increase system security, with key and sensitive components being moved out of XNU's direct reach. This also provides additional security guarantees in the event of a kernel compromise, which is no longer an immediate threat at the highest trust level.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。