Lune

USENIX Security2020Top-tier venue

TeeRex: Discovery and Exploitation of Memory Corruption Vulnerabilities in SGX Enclaves

Tobias Cloosters, Michael Rodler, Lucas Davi

Abstract

Intel's Software Guard Extensions (SGX) introduced new instructions to switch the processor to enclave mode which protects it from introspection. While the enclave mode strongly protects the memory and the state of the processor, it cannot withstand memory corruption errors inside the enclave code. In this paper, we show that the attack surface of SGX enclaves provides new challenges for enclave developers as exploitable memory corruption vulnerabilities are easily introduced into enclave code. We develop TeeRex to automatically analyze enclave binary code for vulnerabilities introduced at the host-to-enclave boundary by means of symbolic execution. Our evaluation on public enclave binaries reveal that many of them suffer from memory corruption errors allowing an attacker to corrupt function pointers or perform arbitrary memory writes. As we will show, TeeRex features a specifically tailored framework for SGX enclaves that allows simple proof-of-concept exploit construction to assess the discovered vulnerabilities. Our findings reveal vulnerabilities in multiple enclaves, including enclaves developed by Intel, Baidu, and WolfSSL, as well as biometric fingerprint software deployed on popular laptop brands.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SmashEx: Smashing SGX Enclaves Using Exceptions cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
  • SmashEx: Smashing SGX Enclaves Using Exceptions cites Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
  • Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites SmashEx: Smashing SGX Enclaves Using Exceptions
  • Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution
  • Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites SmashEx: Smashing SGX Enclaves Using Exceptions
  • SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • SoK: SGX.Fail: How Stuff Gets eXposed cites SmashEx: Smashing SGX Enclaves Using Exceptions
  • SoK: SGX.Fail: How Stuff Gets eXposed cites SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
  • SoK: SGX.Fail: How Stuff Gets eXposed cites Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
  • SoK: SGX.Fail: How Stuff Gets eXposed cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. SoK: SGX.Fail: How Stuff Gets eXposedStephan van Schaik, Alexander Seto, Thomas Yurek, Adam Batori et al.S&P 2024 · 52 citations
  2. SmashEx: Smashing SGX Enclaves Using ExceptionsJinhua Cui, Jason Zhijingcheng Yu, Shweta Shinde, Prateek Saxena et al.CCS 2021 · 32 citations
  3. Pandora: Principled Symbolic Validation of Intel SGX Enclave RuntimesFritz Alder, Lesly-Ann Daniel, David F. Oswald, Frank Piessens et al.S&P 2024 · 12 citations
  4. SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic ExecutionYuanpeng Wang, Ziqi Zhang, Ningyu He, Zhineng Zhong et al.CCS 2023 · 8 citations
  5. IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel IsolationYingjie Cao, Xiaogang Zhu, Dean Sullivan, Haowei Yang et al.NDSS 2026 · 1 citation

Builds on15

  1. Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin et al.USENIX Security 2018 · 1,175 citations
  2. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
  3. Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua et al.S&P 2016 · 420 citations
  4. Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved ExecutionJo Van Bulck, Nico Weichbrodt, Rüdiger Kapitza, Frank Piessens et al.USENIX Security 2017 · 316 citations
  5. SGX-Shield: Enabling Address Space Layout Randomization for SGX ProgramsJaebaek Seo, Byoungyoung Lee, Seong-Min Kim, Ming-Wei Shih et al.NDSS 2017 · 227 citations

Related papers

  1. SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave FuzzingTobias Cloosters, Johannes Willbold, Thorsten Holz, Lucas DaviUSENIX Security 2022
  2. Towards Memory Safe Enclave Programming with Rust-SGXHuibo Wang, Pei Wang, Yu Ding, Mingshen Sun et al.CCS 2019 · 86 citations
  3. The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGXAndrea Biondo, Mauro Conti, Lucas Davi, Tommaso Frassetto et al.USENIX Security 2018 · 126 citations
  4. EnclaveFuzz: Finding Vulnerabilities in SGX ApplicationsLiheng Chen, Zheming Li, Zheyu Ma, Yuan Li et al.NDSS 2024
  5. Hacking in Darkness: Return-oriented Programming against Secure EnclavesJae-Hyuk Lee, Jin Soo Jang, Yeongjin Jang, Nohyun Kwak et al.USENIX Security 2017 · 191 citations
Dusk over the sea between two cliffs drawn in fine vertical lines