arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1802.09085cs.CR
收藏

SgxPectre攻击:通过推测执行从SGX飞地窃取英特尔机密

SgxPectre Attacks: Stealing Intel Secrets from SGX Enclaves via Speculative Execution

Guoxing Chen, Sanchuan Chen, Yuan Xiao, Yinqian Zhang, Zhiqiang Lin, Ten H. Lai

摘要:

本文介绍了SgxPectre攻击,利用最近披露的CPU漏洞来破坏SGX安全区的机密性和完整性。特别地,我们表明,当飞地代码的分支预测可以受到飞地外部的程序的影响时,飞地程序的控制流可以被临时改变以执行导致可观察到的高速缓存状态变化的指令。观察到这种变化的攻击者可以了解安全区内存或其内部寄存器中的秘密,从而完全击败SGX提供的机密性保证。为了证明我们的SgxPectre攻击的实用性,我们系统地探讨了分支目标注入的可能攻击向量,在飞地的投机执行过程中赢得竞争条件的方法,以及自动搜索发动攻击所需的代码模式的技术。我们的研究表明,任何飞地程序都可能容易受到SgxPectre攻击,因为所需的代码模式在大多数SGX运行时(例如,英特尔SGX SDK、Rust-SGX和Graphene-SGX)。最重要的是,我们已经应用了SgxPectre攻击来从英特尔签名的引用飞地中窃取密封密钥和证明密钥。密封密钥可用于解密安全区外部的密封存储并伪造有效的密封数据;证明密钥可用于伪造证明签名。由于这些原因,SgxPectre攻击实际上击败了SGX的安全保护。本文还系统地评估了英特尔现有的对抗SgxPectre攻击的措施,并讨论了安全影响。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑