Title
Dynamic Binary Translation for SGX Enclaves
Abstract
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 article 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 thefuture. We take a principled approach in explaining why complete interposition on SGX is challenging. We draw attention to five 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.
Year
DOI
Venue
2022
10.1145/3532862
ACM TRANSACTIONS ON PRIVACY AND SECURITY
Keywords
DocType
Volume
Trusted execution environments, trusted computing, TEEs, enclaves, SGX design restrictions, complete interposition, dynamic binary translation, dynamorio, compatibility, instrumentation, porting, lift and shift
Journal
25
Issue
ISSN
Citations 
4
2471-2566
0
PageRank 
References 
Authors
0.34
0
5
Name
Order
Citations
PageRank
Jinhua Cui100.68
Shweta Shinde21739.15
Satyaki Sen300.34
Prateek Saxena4191597.73
Pinghai Yuan500.34