Dynamic Binary Translation for SGX Enclaves

Jinhua Cui, Shweta Shinde, Satyaki Sen, Prateek Saxena, Pinghai Yuan
3/29/2021
cs.CR

Official code: ratel-enclave/ratel (25 stars, C, BSD-3-Clause, last commit 2022-12-14).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Ratel - a new framework for instruction-level interposition on enclaved applications

253C, PostScriptFeb 6, 20203 years agoBSD-3-Clause
compatibilitycomplete-interpositiondynamic-binary-translationdynamorioenclaves+3 more

Similar Papers

Cite this paper

@article{cui2021dynamic,
  title  = {Dynamic Binary Translation for SGX Enclaves},
  author = {Jinhua Cui and Shweta Shinde and Satyaki Sen and Prateek Saxena and Pinghai Yuan},
  year   = {2021},
  eprint = {2103.15289},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.15289}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.15289.svg)](https://codeofpaper.com/paper/2103.15289)

Discussion