TeeRex: Discovery and Exploitation of Memory Corruption Vulnerabilities in SGX Enclaves
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SmashEx: Smashing SGX Enclaves Using Exceptions 引用了 SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
- SmashEx: Smashing SGX Enclaves Using Exceptions 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- SmashEx: Smashing SGX Enclaves Using Exceptions 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes 引用了 SmashEx: Smashing SGX Enclaves Using Exceptions
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes 引用了 SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes 引用了 Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- Pandora: Principled Symbolic Validation of Intel SGX Enclave Runtimes 引用了 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 引用了 SmashEx: Smashing SGX Enclaves Using Exceptions
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution 引用了 SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic Execution 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
- SoK: SGX.Fail: How Stuff Gets eXposed 引用了 SmashEx: Smashing SGX Enclaves Using Exceptions
- SoK: SGX.Fail: How Stuff Gets eXposed 引用了 SGX-Shield: Enabling Address Space Layout Randomization for SGX Programs
- SoK: SGX.Fail: How Stuff Gets eXposed 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
- SoK: SGX.Fail: How Stuff Gets eXposed 引用了 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 引用了 Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
引用它的顶会 Paper16
- SoK: SGX.Fail: How Stuff Gets eXposedStephan van Schaik, Alexander Seto, Thomas Yurek, Adam Batori 等S&P 2024 · 52 次引用
- SmashEx: Smashing SGX Enclaves Using ExceptionsJinhua Cui, Jason Zhijingcheng Yu, Shweta Shinde, Prateek Saxena 等CCS 2021 · 32 次引用
- Pandora: Principled Symbolic Validation of Intel SGX Enclave RuntimesFritz Alder, Lesly-Ann Daniel, David F. Oswald, Frank Piessens 等S&P 2024 · 12 次引用
- SymGX: Detecting Cross-boundary Pointer Vulnerabilities of SGX Applications via Static Symbolic ExecutionYuanpeng Wang, Ziqi Zhang, Ningyu He, Zhineng Zhong 等CCS 2023 · 8 次引用
- IsolatOS: Detecting Double Fetch Bugs in COTS RTOS by Re-enabling Kernel IsolationYingjie Cao, Xiaogang Zhu, Dean Sullivan, Haowei Yang 等NDSS 2026 · 1 次引用
它引用的 Paper15
- Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin 等USENIX Security 2018 · 1,175 次引用
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
- Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua 等S&P 2016 · 420 次引用
- Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved ExecutionJo Van Bulck, Nico Weichbrodt, Rüdiger Kapitza, Frank Piessens 等USENIX Security 2017 · 316 次引用
- SGX-Shield: Enabling Address Space Layout Randomization for SGX ProgramsJaebaek Seo, Byoungyoung Lee, Seong-Min Kim, Ming-Wei Shih 等NDSS 2017 · 227 次引用
相关 Paper
- SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave FuzzingTobias Cloosters, Johannes Willbold, Thorsten Holz, Lucas DaviUSENIX Security 2022
- Towards Memory Safe Enclave Programming with Rust-SGXHuibo Wang, Pei Wang, Yu Ding, Mingshen Sun 等CCS 2019 · 86 次引用
- The Guard's Dilemma: Efficient Code-Reuse Attacks Against Intel SGXAndrea Biondo, Mauro Conti, Lucas Davi, Tommaso Frassetto 等USENIX Security 2018 · 126 次引用
- EnclaveFuzz: Finding Vulnerabilities in SGX ApplicationsLiheng Chen, Zheming Li, Zheyu Ma, Yuan Li 等NDSS 2024
- Hacking in Darkness: Return-oriented Programming against Secure EnclavesJae-Hyuk Lee, Jin Soo Jang, Yeongjin Jang, Nohyun Kwak 等USENIX Security 2017 · 191 次引用
