Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
Not on the map. Why?
Abstract (arXiv)
In this paper, we explore a new, yet critical, side-channel attack against Intel Software Guard Extension (SGX), called a branch shadowing attack, which can reveal fine-grained control flows (i.e., each branch) of an enclave program running on real SGX hardware. The root cause of this attack is that Intel SGX does not clear the branch history when switching from enclave mode to non-enclave mode, leaving the fine-grained traces to the outside world through a branch-prediction side channel. However, exploiting the channel is not so straightforward in practice because 1) measuring branch prediction/misprediction penalties based on timing is too inaccurate to distinguish fine-grained control-flow changes and 2) it requires sophisticated control over the enclave execution to force its execution to the interesting code blocks. To overcome these challenges, we developed two novel exploitation techniques: 1) Intel PT- and LBR-based history-inferring techniques and 2) APIC-based technique to control the execution of enclave programs in a fine-grained manner. As a result, we could demonstrate our attack by breaking recent security constructs, including ORAM schemes, Sanctum, SGX-Shield, and T-SGX. Not limiting our work to the attack itself, we thoroughly studied the feasibility of hardware-based solutions (e.g., branch history clearing) and also proposed a software-based countermeasure, called Zigzagger, to mitigate the branch shadowing attack in practice.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). First posted on arXiv 21 Nov 2016.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 1; 2023: 1; 2024: 3; 2025: 1; 2026: 3.
10 papers.
- 2023No Privacy Left Outside: On the (In-)Security of TEE-Shielded DNN Partition for On-Device MLcited by 21
- 2021Confidential Machine Learning Computation in Untrusted Environments: A Systems Security Perspectivecited by 4
- 2022OLIVE: Oblivious Federated Learning on Trusted Execution Environment against the risk of sparsificationcited by 4
- 2024TEESlice: Protecting Sensitive Neural Network Models in Trusted Execution Environments When Attackers have Pre-Trained Modelscited by 3
- 2025AttestLLM: Efficient Attestation Framework for Billion-scale On-device LLMscited by 1
- 2026Opal: Private Memory for Personal AIcited by 1
- 2024Protecting Confidentiality, Privacy and Integrity in Collaborative Learningcited by 0
- 2024How To Think About End-To-End Encryption and AI: Training, Processing, Disclosure, and Consentcited by 0
- 2026Red-Teaming Claude Opus and ChatGPT-based Security Advisors for Trusted Execution Environmentscited by 0
- 2026TrEEStealer: Stealing Decision Trees via Enclave Side Channelscited by 0
- 2026TrEEStealer: Stealing Decision Trees via Enclave Side Channels20 Apr 2026
- 2026Opal: Private Memory for Personal AI2 Apr 2026
- 2026Red-Teaming Claude Opus and ChatGPT-based Security Advisors for Trusted Execution Environments23 Feb 2026
- 2025AttestLLM: Efficient Attestation Framework for Billion-scale On-device LLMs8 Sep 2025
- 2024How To Think About End-To-End Encryption and AI: Training, Processing, Disclosure, and Consent28 Dec 2024
- 2024Protecting Confidentiality, Privacy and Integrity in Collaborative Learning11 Dec 2024
- 2024TEESlice: Protecting Sensitive Neural Network Models in Trusted Execution Environments When Attackers have Pre-Trained Models15 Nov 2024
- 2023No Privacy Left Outside: On the (In-)Security of TEE-Shielded DNN Partition for On-Device ML11 Oct 2023
- 2022OLIVE: Oblivious Federated Learning on Trusted Execution Environment against the risk of sparsification15 Feb 2022
- 2021Confidential Machine Learning Computation in Untrusted Environments: A Systems Security Perspective5 Nov 2021