Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2021, Vol. 47 ›› Issue (8): 177-182. doi: 10.19678/j.issn.1000-3428.0058582

• Cyberspace Security • Previous Articles     Next Articles

Method of Timing Attack for Linux Against KASLR

CONG Mou1, ZHANG Ping2, WANG NING3   

  1. 1. Institute of Computer Science and Technology, Changchun University of Science and Technology, Changchun 130022, China;
    2. Army Academy of Armored Forces, Beijing 100072, China;
    3. The Third Research Institute of Ministry of Public Security, Beijing 100142, China
  • Received:2020-06-19 Revised:2020-08-15 Published:2020-07-22

针对KASLR的Linux计时攻击方法

丛眸1, 张平2, 王宁3   

  1. 1. 长春理工大学 计算机科学技术学院, 长春 130022;
    2. 陆军装甲兵学院 北京 100072;
    3. 公安部第三研究所, 北京 100142
  • 作者简介:丛眸(1999-),女,硕士研究生,主研方向为网络安全、计算机视觉;张平,副教授;王宁,助理研究员。
  • 基金资助:
    装备预研领域基金(61400010301)。

Abstract: For Linux systems with Kernel Address Space Layout Randomization(KASLR) protection, this paper proposes a Cache instant attack method based on CPU prefetch instruction. When the prefetch instructions of Intel CPU prefetch data that is not mapped to physical address, a Cache failure will occur, resulting in the consumption of CPU clock cycles longer than the data mapped to physical address. According to this feature, the CPU clock cycle consumption is obtained by using the rdtscp instruction, and the protection of KASLR technology is bypassed by using timing attacks, so as to accurately obtain the Offset of kernel address mapping. Experimental results show that this attack method can bypass the KASLR protection of Linux operating system to obtain the accurate mapping location of kernel address, and avoid causing a large number of Cache failures.

Key words: Kernel Address Space Layout Randomization (KASLR), prefetch instruction, timing attack, kernel, Cache miss

摘要: 针对开启内核地址空间布局随机化(KASLR)防护的Linux系统,提出一种基于CPU预取指令的Cache计时攻击方法。Intel CPU的预取指令在预取未映射到物理地址的数据时会发生Cache失效,导致消耗的CPU时钟周期比已映射到物理地址的数据要长。根据这一特点,通过rdtscp指令获取CPU时钟周期消耗,利用计时攻击绕过KASLR技术防护,从而准确获取内核地址映射的Offset。实验结果表明,该攻击方法能够绕过Linux操作系统的KASLR防护,获得准确的内核地址映射位置,并且避免引起大量Cache失效。

关键词: 内核地址空间布局随机化, 预取指令, 计时攻击, 内核, Cache失效

CLC Number: