Skip to main content
QUICK REVIEW

[论文解读] PThammer: Cross-User-Kernel-Boundary Rowhammer through Implicit Accesses

Zhi Zhang, Yueqiang Cheng|arXiv (Cornell University)|Jul 17, 2020
Security and Verification in Computing参考文献 31被引用 6
一句话总结

本文提出PThammer,一种跨用户-内核边界边界的Rowhammer攻击,通过利用隐式内存访问绕过纯软件防御。通过使用最小的TLB和LLC驱逐集来清除转换旁视缓冲器(TLB)和最后一级缓存(LLC),该攻击通过页表中的位翻转实现权限提升,在多种系统上仅用15分钟内成功获取root权限,即使存在CTA和CATT等防御机制。

ABSTRACT

Rowhammer is a hardware vulnerability in DRAM memory, where repeated access to memory can induce bit flips in neighboring memory locations. Being a hardware vulnerability, rowhammer bypasses all of the system memory protection, allowing adversaries to compromise the integrity and confidentiality of data. Rowhammer attacks have shown to enable privilege escalation, sandbox escape, and cryptographic key disclosures. Recently, several proposals suggest exploiting the spatial proximity between the accessed memory location and the location of the bit flip for a defense against rowhammer. These all aim to deny the attacker's permission to access memory locations near sensitive data. In this paper, we question the core assumption underlying these defenses. We present PThammer, a confused-deputy attack that causes accesses to memory locations that the attacker is not allowed to access. Specifically, PThammer exploits the address translation process of modern processors, inducing the processor to generate frequent accesses to protected memory locations. We implement PThammer, demonstrating that it is a viable attack, resulting in a system compromise (e.g., kernel privilege escalation). We further evaluate the effectiveness of proposed software-only defenses showing that PThammer can overcome those.

研究动机与目标

  • 开发一种基于Rowhammer的权限提升技术,可在用户空间与内核空间内存边界之间运作。
  • 克服仅依赖软件的防御机制(如CATT、RIP-RH和CTA)对内核数据与用户空间攻击的隔离防护。
  • 通过使用高效、极小的TLB和LLC驱逐集,最小化攻击面,降低检测概率与资源开销。
  • 证明页表遍历中的隐式访问模式可被利用,以在无直接内存访问的情况下触发内核数据结构中的位翻转。
  • 评估现有软件防御机制对这种新型间接攻击向量的有效性。

提出的方法

  • 通过逆向分析虚拟地址与TLB集合之间的映射关系,构建无误报的最小且精确的TLB驱逐集。
  • 采用基于性能分析的算法,通过测量访问延迟识别LLC驱逐集,对大于缓存关联度的集合成功率超过94%。
  • 选择比缓存关联度大1个条目的驱逐集(12路为13,16路为17),在保证最大驱逐成功率的同时最小化集合大小。
  • 通过页表遍历的隐式访问对选定目标行进行双向hammering,触发内核页表中的位翻转。
  • 利用buddy分配器将L1PTE集中存储在内存中,提高在受保护区域中成功触发位翻转的概率。
  • 通过在L1PTE位翻转后针对struct cred结构进行模拟攻击,实现对CTA保护系统的攻击,从而通过用户凭证操纵实现权限提升。

实验结果

研究问题

  • RQ1能否仅通过隐式内存访问在用户与内核内存边界之间实施Rowhammer攻击?
  • RQ2极小尺寸的TLB与LLC驱逐集在实现一致的缓存与TLB清除方面有多高效?
  • RQ3对利用页表遍历的攻击,仅依赖软件的防御机制(如CTA、CATT和RIP-RH)在多大程度上仍具有效性?
  • RQ4在不同内存配置(如超级页与普通页)下,该攻击的性能开销与成功率如何?
  • RQ5即使L1PTE被隔离或保护,能否利用内核页表中的位翻转实现权限提升?

主要发现

  • 当使用大小为12或以上的驱逐集时,TLB未命中率显著下降,表明TLB清除有效。
  • 当驱逐集大小超过缓存关联度时,LLC未命中率超过95%,证实缓存驱逐有效。
  • PThammer在所有测试机器(Lenovo T420、X230、Dell E6420)上均于15分钟内完成权限提升,采用双向hammering。
  • 启用超级页后,TLB池准备时间低于10 ms,LLC准备时间低于0.5分钟,表明准备开销极低。
  • 该攻击通过在L1PTE位翻转后针对struct cred条目进行攻击,成功绕过CTA的第二层防御,在模拟中仅需七次位翻转即可实现root访问。
  • LLC驱逐集选择算法的误报率不超过6%,表明在真实环境中具有高度可靠性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。