arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.15289cs.CR
收藏

SGX飞地的动态二进制翻译

Dynamic Binary Translation for SGX Enclaves

Jinhua Cui, Shweta Shinde, Satyaki Sen, Prateek Saxena, Pinghai Yuan

摘要:

安全区(如英特尔SGX支持的安全区)提供了一种硬件原语,用于将用户级应用程序与操作系统屏蔽开来。虽然安全区是一个有用的起点,但每当向/从不受信任的操作系统传输控制或数据时,在安全区中运行的代码都需要进行额外的检查。但是,如果我们希望在安全区中运行现有的未修改的二进制文件,SGX上的安全区操作系统接口可能会非常大。本文介绍了Ratel,一个运行在Linux上SGX飞地内的动态二进制翻译引擎。Ratel提供完整的插入,能够在安全区中执行所有指令并监控与操作系统的所有交互。指令级插入为将来实现各种内联安全监控器提供了一般基础。我们采取原则性的方法来解释为什么完全干预新交所是具有挑战性的。我们提请注意SGX中的5个设计决策,这些决策在性能和确保完全插入之间产生了根本的权衡,我们解释了如何解决这些问题,以利于完全插入。为了说明Ratel框架的实用性,我们提出了第一次尝试提供与SGX上现有软件的二进制兼容性。我们报告说,Ratel提供了二进制兼容性,我们测试了200多个程序,包括微基准测试和实际应用程序,如Linux shell实用程序。两种程序设计语言的运行时,即Python和R,使用标准基准测试,在Ratel上开箱即用,无需任何专门的处理。

英文摘要:

Enclaves, such as those enabled by Intel SGX, offer a hardware primitive for shielding user-level applications from the OS. While enclaves are a useful starting point, code running in the enclave requires additional checks whenever control or data is transferred to/from the untrusted OS. The enclave-OS interface on SGX, however, can be extremely large if we wish to run existing unmodified binaries inside enclaves. This paper presents Ratel, a dynamic binary translation engine running inside SGX enclaves on Linux. Ratel offers complete interposition, the ability to interpose on all executed instructions in the enclave and monitor all interactions with the OS. Instruction-level interposition offers a general foundation for implementing a large variety of inline security monitors in the future. We take a principled approach in explaining why complete interposition on SGX is challenging. We draw attention to 5 design decisions in SGX that create fundamental trade-offs between performance and ensuring complete interposition, and we explain how to resolve them in the favor of complete interposition. To illustrate the utility of the Ratel framework, we present the first attempt to offer binary compatibility with existing software on SGX. We report that Ratel offers binary compatibility with over 200 programs we tested, including micro-benchmarks and real applications such as Linux shell utilities. Runtimes for two programming languages, namely Python and R, tested with standard benchmarks work out-of-the-box on Ratel without any specialized handling.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑