中文

利用分支阴影推断 SGX 飞地内部的细粒度控制流

密码学与安全 2017-06-05 v3

摘要

在本文中,我们探索了一种针对 Intel Software Guard Extension (SGX) 的全新且关键的侧信道攻击,称为分支阴影攻击,该攻击能够揭示在真实 SGX 硬件上运行的飞地程序的细粒度控制流(即每个分支)。该攻击的根本原因在于 Intel SGX 在从飞地模式切换到非飞地模式时不会清除分支历史,从而通过分支预测侧信道将细粒度痕迹留给了外部世界。然而,在实践中利用该信道并非易事,因为:1) 基于时间测量分支预测/误预测惩罚过于不精确,无法区分细粒度的控制流变化;2) 需要对飞地执行进行复杂的控制,以强制其执行到感兴趣的代码块。为了克服这些挑战,我们开发了两种新颖的利用技术:1) 基于 Intel PT 和 LBR 的历史推断技术;2) 基于 APIC 的技术,以细粒度方式控制飞地程序的执行。结果,我们通过攻破近期包括 ORAM 方案、Sanctum、SGX-Shield 和 T-SGX 在内的安全构造展示了我们的攻击。我们不仅限于攻击本身,还深入研究了基于硬件的解决方案(例如清除分支历史)的可行性,并提出了一种名为 Zigzagger 的基于软件的对策,以在实践中缓解分支阴影攻击。

关键词

引用

@article{arxiv.1611.06952,
  title  = {Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing},
  author = {Sangho Lee and Ming-Wei Shih and Prasun Gera and Taesoo Kim and Hyesoon Kim and Marcus Peinado},
  journal= {arXiv preprint arXiv:1611.06952},
  year   = {2017}
}

备注

A revised version of this paper will be presented at USENIX Security Symposium 2017. Please cite this paper as Sangho Lee, Ming-Wei Shih, Prasun Gera, Taesoo Kim, Hyesoon Kim, and Marcus Peinado, "Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing," in Proceedings of the 26th USENIX Security Symposium (Security), Vancouver, Canada, August 2017