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

基于分支跟踪的SGX飞地内细粒度控制流推断

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

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

摘要:

在本文中,我们将探讨一种针对英特尔软件防护扩展(SGX)的新的但关键的侧信道攻击,称为分支阴影攻击,它可以揭示细粒度的控制流(即,每个分支)在真实的SGX硬件上运行的飞地程序。此次攻击的根本原因是英特尔SGX在从飞地模式切换到非飞地模式时没有清除分支历史记录,从而通过分支预测侧通道将细粒度的痕迹留给了外界。然而,利用通道在实践中并不那么简单,因为1)基于定时来测量分支预测/误预测惩罚太不准确而不能区分细粒度的控制流改变,以及2)它需要对飞地执行的复杂控制以将其执行强制到感兴趣的代码块。为了克服这些挑战,我们开发了两种新的开发技术:1)基于英特尔PT和LBR的历史推断技术和2)基于APIC的技术,以细粒度的方式控制飞地程序的执行。因此,我们可以通过破坏最近的安全结构来证明我们的攻击,包括ORAM方案,Sanctum,SGX-Shield和T-SGX。我们的工作并不局限于攻击本身,我们彻底研究了基于硬件的解决方案的可行性(例如,分支历史清除),并提出了一种基于软件的对策,称为Zigzagger,以减轻分支阴影攻击在实践中。

英文摘要:

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.

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

↑