Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing

By Sangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim, Hyesoon Kim, Marcus Peinado. 2016

548 citations recorded by the source corpus.

Intel has introduced a hardware-based trusted execution environment, Intel Software Guard Extensions (SGX), that provides a secure, isolated execution environment, or enclave, for a user program without trusting any underlying software (e.g., an operating system) or firmware. Researchers have demonstrated that SGX is vulnerable to a page-fault-based attack. However, the attack only reveals page-level memory accesses within an enclave. In this paper, we explore a new, yet critical, side-channel attack, branch shadowing, that reveals fine-grained control flows (branch granularity) in an enclave. The root cause of this attack is that SGX does not clear branch history when switching from enclave to nonenclave mode, leaving fine-grained traces for the outside world to observe, which gives rise to a branch-prediction side channel. However, exploiting this channel in practice is challenging because 1) measuring branch execution time is too noisy for distinguishing fine-grained controlflow changes and 2) pausing an enclave right after it has executed the code block we target requires sophisticated control. To overcome these challenges, we develop two novel exploitation techniques: 1) a last branch record (LBR)-based history-inferring technique and 2) an advanced programmable interrupt controller (APIC)-based technique to control the execution of an enclave in a finegrained manner. An evaluation against RSA shows that our attack infers each private key bit with 99.8% accuracy. Finally, we thoroughly study the feasibility of hardware-based solutions (i.e., branch history flushing) and propose a software-based approach that mitigates the attack.

Subfields: Artificial Intelligence, Hardware and Architecture, Materials Chemistry

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Florian Tramèr
  2. Vitaly Shmatikov
  3. Dan Boneh
  4. Reza Shokri
  5. Congzheng Song
  6. Dawn Song
  7. Nicholas Carlini
  8. Ú. Erlingsson

In Hardware and Architecture

  1. Srini Devadas
  2. Victor Costan
  3. Farinaz Koushanfar
  4. Murali Annavaram
  5. Yongqin Wang
  6. Dan Boneh
  7. Marcus Peinado
  8. Hanieh Hashemi

In Materials Chemistry

  1. Daniel Gruss
  2. Michael Schwarz
  3. Petros Maniatis

Citations in the corpus