Lune

USENIX Security2020Top-tier venue

CopyCat: Controlled Instruction-Level Attacks on Enclaves

Daniel Moghimi, Jo Van Bulck, Nadia Heninger, Frank Piessens, Berk Sunar

Abstract

The adversarial model presented by trusted execution environments (TEEs) has prompted researchers to investigate unusual attack vectors. One particularly powerful class of controlled-channel attacks abuses page-table modifications to reliably track enclave memory accesses at a page-level granularity. In contrast to noisy microarchitectural timing leakage, this line of deterministic controlled-channel attacks abuses indispensable architectural interfaces and hence cannot be mitigated by tweaking microarchitectural resources. We propose an innovative controlled-channel attack, named CopyCat, that deterministically counts the number of instructions executed within a single enclave code page. We show that combining the instruction counts harvested by CopyCat with traditional, coarse-grained page-level leakage allows the accurate reconstruction of enclave control flow at a maximal instruction-level granularity. CopyCat can identify intra-page and intra-cache line branch decisions that ultimately may only differ in a single instruction, underscoring that even extremely subtle control flow deviations can be deterministically leaked from secure enclaves. We demonstrate the improved resolution and practicality of CopyCat on Intel SGX in an extensive study of single-trace and deterministic attacks against cryptographic implementations, and give novel algorithmic attacks to perform single-trace key extraction that exploit subtle vulnerabilities in the latest versions of widely-used cryptographic libraries. Our findings highlight the importance of stricter verification of cryptographic implementations, especially in the context of TEEs.

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.

33 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

  • Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow Linearization cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow Linearization cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
  • SoK: SGX.Fail: How Stuff Gets eXposed cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • SoK: SGX.Fail: How Stuff Gets eXposed cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • 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
  • Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • HyperEnclave: An Open and Cross-platform Trusted Execution Environment cites Telling Your Secrets without Page Faults: Stealthy Page Table-Based Attacks on Enclaved Execution
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • 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
  • Frontal Attack: Leaking Control-Flow in SGX via the CPU Frontend cites Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
  • Frontal Attack: Leaking Control-Flow in SGX via the CPU Frontend cites T-SGX: Eradicating Controlled-Channel Attacks Against Enclave Programs
  • Frontal Attack: Leaking Control-Flow in SGX via the CPU Frontend 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 papers33

  1. Frontal Attack: Leaking Control-Flow in SGX via the CPU FrontendIvan Puddu, Moritz Schneider, Miro Haller, Srdjan CapkunUSENIX Security 2021 · 63 citations
  2. SoK: SGX.Fail: How Stuff Gets eXposedStephan van Schaik, Alexander Seto, Thomas Yurek, Adam Batori et al.S&P 2024 · 52 citations
  3. Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow LinearizationPietro Borrello, Daniele Cono D'Elia, Leonardo Querzoni, Cristiano GiuffridaCCS 2021 · 43 citations
  4. There's always a bigger fish: a clarifying analysis of a machine-learning-assisted side-channel attackJack Cook, Jules Drean, Jonathan Behrens, Mengjia YanISCA 2022 · 35 citations
  5. HyperEnclave: An Open and Cross-platform Trusted Execution EnvironmentYuekai Jia, Shuang Liu, Wenhao Wang, Yu Chen et al.USENIX ATC 2022 · 24 citations

Builds on16

  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. Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch ShadowingSangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim et al.USENIX Security 2017 · 536 citations
  3. ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations
  4. T-SGX: Eradicating Controlled-Channel Attacks Against Enclave ProgramsMing-Wei Shih, Sangho Lee, Taesoo Kim, Marcus PeinadoNDSS 2017 · 431 citations
  5. 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

Related papers

  1. SecPaging: Secure Enclave Paging with Hardware-Enforced Protection against Controlled-Channel AttacksYunkai Bai, Peinan Li, Yubiao Huang, Shiwen Wang et al.DAC 2024 · 1 citation
  2. Controlled Data Races in Enclaves: Attacks and DetectionSanchuan Chen, Zhiqiang Lin, Yinqian ZhangUSENIX Security 2023
  3. AEX-Notify: Thwarting Precise Single-Stepping Attacks through Interrupt Awareness for Intel SGX EnclavesScott Constable, Jo Van Bulck, Xiang Cheng, Yuan Xiao et al.USENIX Security 2023
  4. Autarky: closing controlled channels with self-paging enclavesMeni Orenbach, Andrew Baumann, Mark SilbersteinEuroSys 2020 · 29 citations
  5. TLBlur: Compiler-Assisted Automated Hardening against Controlled Channels on Off-the-Shelf Intel SGX PlatformsDaan Vanoverloop, Andrés Sánchez, Flavio Toffalini, Frank Piessens et al.USENIX Security 2025
Dusk over the sea between two cliffs drawn in fine vertical lines