SgxPectre Attacks: Stealing Intel Secrets from SGX Enclaves via Speculative Execution
arXiv:1802.09085 · doi:10.1109/EuroSP.2019.00020
Abstract
This paper presents SgxPectre Attacks that exploit the recently disclosed CPU bugs to subvert the confidentiality and integrity of SGX enclaves. Particularly, we show that when branch prediction of the enclave code can be influenced by programs outside the enclave, the control flow of the enclave program can be temporarily altered to execute instructions that lead to observable cache-state changes. An adversary observing such changes can learn secrets inside the enclave memory or its internal registers, thus completely defeating the confidentiality guarantee offered by SGX. To demonstrate the practicality of our SgxPectre Attacks, we have systematically explored the possible attack vectors of branch target injection, approaches to win the race condition during enclave's speculative execution, and techniques to automatically search for code patterns required for launching the attacks. Our study suggests that any enclave program could be vulnerable to SgxPectre Attacks since the desired code patterns are available in most SGX runtimes (e.g., Intel SGX SDK, Rust-SGX, and Graphene-SGX). Most importantly, we have applied SgxPectre Attacks to steal seal keys and attestation keys from Intel signed quoting enclaves. The seal key can be used to decrypt sealed storage outside the enclaves and forge valid sealed data; the attestation key can be used to forge attestation signatures. For these reasons, SgxPectre Attacks practically defeat SGX's security protection. This paper also systematically evaluates Intel's existing countermeasures against SgxPectre Attacks and discusses the security implications.
References in corpus (7)
- Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX
- Software Grand Exposure: SGX Cache Attacks Are Practical
- Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
- ret2spec: Speculative Execution Using Return Stack Buffers
- SGXIO: Generic Trusted I/O Path for Intel SGX
- Malware Guard Extension: Using SGX to Conceal Cache Attacks
- The Circle Game: Scalable Private Membership Test Using Trusted Hardware
Cited by in corpus (59)
- Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware
- A Systematic Evaluation of Transient Execution Attacks and Defenses
- S-FaaS: Trustworthy and Accountable Function-as-a-Service using Intel SGX
- ZombieLoad: Cross-Privilege-Boundary Data Sampling
- SPOILER: Speculative Load Hazards Boost Rowhammer and Cache Attacks
- secureTF: A Secure TensorFlow Framework
- FortuneTeller: Predicting Microarchitectural Attacks via Unsupervised Deep Learning
- A survey and analysis of TLS interception mechanisms and motivations
- CURE: A Security Architecture with CUstomizable and Resilient Enclaves
- Privacy-Preserving Inference in Machine Learning Services Using Trusted Execution Environments
- Aurora: Providing Trusted System Services for Enclaves On an Untrusted System
- PerSpectron: Detecting Invariant Footprints of Microarchitectural Attacks with Perceptron
- ConTExT: Leakage-Free Transient Execution
- Survey of Transient Execution Attacks
- Towards the AlexNet Moment for Homomorphic Encryption: HCNN, theFirst Homomorphic CNN on Encrypted Data with GPUs
- Toward Scalable Fully Homomorphic Encryption Through Light Trusted Computing Assistance
- ObliDB: Oblivious Query Processing for Secure Databases
- Timing Cache Accesses to Eliminate Side Channels in Shared Software
- Lessons Learned from Blockchain Applications of Trusted Execution Environments and Implications for Future Research
- MISO: Legacy-compatible Privacy-preserving Single Sign-on using Trusted Execution Environments
- A Survey of Microarchitectural Side-channel Vulnerabilities, Attacks and Defenses in Cryptography
- Visor: Privacy-Preserving Video Analytics as a Cloud Service
- Reflections on trusting distributed trust
- Don't Mine, Wait in Line: Fair and Efficient Blockchain Consensus with Robust Round Robin
- Cache Refinement Type for Side-Channel Detection of Cryptographic Software
- Privacy preserving Neural Network Inference on Encrypted Data with GPUs
- Store-to-Leak Forwarding: Leaking Data on Meltdown-resistant CPUs (Updated and Extended Version)
- CryptoSPN: Privacy-preserving Sum-Product Network Inference
- Attestable Builds: Compiling Verifiable Binaries on Untrusted Systems using Trusted Execution Environments
- BliMe: Verifiably Secure Outsourced Computation with Hardware-Enforced Taint Tracking
- AGAPECert: An Auditable, Generalized, Automated, Privacy-Enabling Certification Framework with Oblivious Smart Contracts
- Enclave-Aware Compartmentalization and Secure Sharing with Sirius
- Perun: Secure Multi-Stakeholder Machine Learning Framework with GPU Support
- SPEECHMINER: A Framework for Investigating and Measuring Speculative Execution Vulnerabilities
- Dynamic Process Isolation
- TEE-based Key-Value Stores: a Survey
- BasicBlocker: ISA Redesign to Make Spectre-Immune CPUs Faster
- Cross-Chain Sealed-Bid Auctions Using Confidential Compute Blockchains
- It Takes Two to #MeToo - Using Enclaves to Build Autonomous Trusted Systems
- GhostKnight: Breaching Data Integrity via Speculative Execution
- Speculative Dereferencing of Registers:Reviving Foreshadow
- RouTEE: A Secure Payment Network Routing Hub using Trusted Execution Environments
- Reaching Data Confidentiality and Model Accountability on the CalTrain
- Confidential Attestation: Efficient in-Enclave Verification of Privacy Policy Compliance
- SMaCk: Efficient Instruction Cache Attacks via Self-Modifying Code Conflicts
- Data Privacy in Trigger-Action Systems
- S3ML: A Secure Serving System for Machine Learning Inference
- SafetyPin: Encrypted Backups with Human-Memorable Secrets
- Revisiting and Evaluating Software Side-channel Vulnerabilities and Countermeasures in Cryptographic Applications
- Distributed systems and trusted execution environments: Trade-offs and challenges
- Secure Collaborative Training and Inference for XGBoost
- Lightning-Fast and Privacy-Preserving Outsourced Computation in the Cloud
- SoK: Hardware Security Support for Trustworthy Execution
- Real Life Is Uncertain. Consensus Should Be Too!
- Hector: Using Untrusted Browsers to Provision Web Applications
- Guardian: symbolic validation of orderliness in SGX enclaves
- SoK: How Not to Architect Your Next-Generation TEE Malware?
- Secure and Efficient Trajectory-Based Contact Tracing using Trusted Hardware
- Hollow-LLM Attack: Computationally Trivial Weights in Zero-Knowledge Verification of LLM Inference