CN110502933A - A method and system for implementing a soft-hard co-timer capable of resisting cache attacks based on flush operations - Google Patents
A method and system for implementing a soft-hard co-timer capable of resisting cache attacks based on flush operations Download PDFInfo
- Publication number
- CN110502933A CN110502933A CN201910604224.6A CN201910604224A CN110502933A CN 110502933 A CN110502933 A CN 110502933A CN 201910604224 A CN201910604224 A CN 201910604224A CN 110502933 A CN110502933 A CN 110502933A
- Authority
- CN
- China
- Prior art keywords
- resolution
- hardware module
- timer
- initialization
- attack
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000012360 testing method Methods 0.000 claims abstract description 6
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 6
- 230000026676 system process Effects 0.000 claims description 5
- 238000013461 design Methods 0.000 abstract description 5
- 230000007246 mechanism Effects 0.000 abstract description 2
- 208000009115 Anorectal Malformations Diseases 0.000 description 11
- 239000008186 active pharmaceutical agent Substances 0.000 description 10
- 230000007123 defense Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 241000288105 Grus Species 0.000 description 1
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000005067 remediation Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/75—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation
- G06F21/755—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation with measures against power attack
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/76—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in application-specific integrated circuits [ASIC] or field-programmable devices, e.g. field-programmable gate arrays [FPGA] or programmable logic devices [PLD]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Storage Device Security (AREA)
Abstract
本发明涉及一种可抵抗基于flush操作的cache攻击的软硬协同计时器实现方法和系统。该系统包括初始化软件模块、硬件模块以及运行时软件模块。在初始化阶段,初始化软件模块与硬件模块之间相互协同,以测试安全范围内最高的时间分辨率,并把硬件模块中的安全低分辨率计时器调整到该时间分辨率;在运行时阶段,在出现flush操作时,可以短暂降低自身分辨率,而当没有flush操作时,恢复自身的高分辨率。通过这种flush操作和计时器分辨率的协同机制,可以有效的抵御基于flush操作的cache攻击。同时,本发明通过优化设计,保证了高安全性的同时,其自身的性能损失非常低,因此是一种高效、安全的计时器实现方法。
The invention relates to a method and system for realizing a software-hardware coordination timer capable of resisting cache attacks based on flush operations. The system includes an initialization software module, a hardware module and a runtime software module. In the initialization phase, the initialization software module and the hardware module cooperate with each other to test the highest time resolution within the safety range, and adjust the safe low-resolution timer in the hardware module to this time resolution; in the runtime phase, When there is a flush operation, it can temporarily reduce its own resolution, and when there is no flush operation, restore its own high resolution. Through this coordination mechanism of flush operation and timer resolution, cache attacks based on flush operation can be effectively resisted. At the same time, the present invention guarantees high safety through optimized design, and at the same time, its own performance loss is very low, so it is an efficient and safe timer implementation method.
Description
技术领域technical field
本发明属于信息安全软硬件协同设计技术领域,具体为基于ARM-FPGA嵌入式SoC的软硬协同计时器的实现方法和系统。本发明在保证了高安全性和低性能损失的情况下,可抵御基于flush操作的cache攻击,是一种高效、安全的计时器实现方法。The invention belongs to the technical field of information security software-hardware collaborative design, in particular to an implementation method and system of a software-hardware collaborative timer based on an ARM-FPGA embedded SoC. Under the condition of ensuring high security and low performance loss, the invention can resist the cache attack based on the flush operation, and is an efficient and safe timer realization method.
背景技术Background technique
近年来,随着市场对高性能小型电子设备的需求越来越大,SoC(System on Chip,片上系统)商品的功能也变得越来越强大、复杂并且个性化。其中,把ARM和FPGA(Field-Programmable Gate Array,现场可编程门阵列)结合到一起的ARM-FPGA嵌入式SoC,为系统架构师和ARM开发工程师提供了一个弹性的平台以满足消费者的个性化需求。该类型SoC以Xilinx公司的Zynq系列为代表,已经被广泛应用到无人机以及高性能嵌入式和物联网设备中。但是,与Intel和AMD的芯片产品一样,ARM-FPGA嵌入式SoC同样面临着多种多样的安全威胁,以cache攻击为代表的微体系架构攻击就是其中不可忽略的一种类型。In recent years, with the market's increasing demand for high-performance small electronic devices, the functions of SoC (System on Chip, System on Chip) products have become more and more powerful, complex and personalized. Among them, the ARM-FPGA embedded SoC, which combines ARM and FPGA (Field-Programmable Gate Array, Field Programmable Gate Array), provides a flexible platform for system architects and ARM development engineers to meet the individuality of consumers. demand. This type of SoC is represented by Xilinx's Zynq series, which has been widely used in drones and high-performance embedded and Internet of Things devices. However, like Intel and AMD's chip products, ARM-FPGA embedded SoCs also face a variety of security threats, and microarchitecture attacks represented by cache attacks are one of the types that cannot be ignored.
在过去的十几年里,越来越多的研究人员以cache(高速缓冲存储器)为突破口成功的实现了微体系架构攻击。Cache攻击已经成为了现代处理器和操作系统的重要安全威胁。更吸引人注意的是,2018年初,Meltdown(见M.Lipp,M.Schwarz,D.Gruss,T.Prescher,W.Haas, A.Fogh,J.Horn,S.Mangard,P.Kocher,D.Genkin,Y.Yarom,M.Hamburg.Meltdown:Reading Kernel Memory from User Space.In 27th USENIX Security Symposium,2018)和Spectre攻击(见 P.Kocher,J.Horn,A.Fogh,D.Genkin,D.Gruss,W.Haas,M.Hamburg,M.Lipp,S.Mangard,T. Prescher,M.Schwarz,Y.Yarom.Spectre Attacks:ExploitingSpeculative Execution.In 40th IEEE Symposium on Security and Privacy,2019)被公布在互联网上。它们把cache攻击技术与乱序执行和分支预测技术结合在一起,大大扩展了cache攻击的数据窃取能力。最近几年,为了降低cache攻击中的噪声并且增加攻击的分辨率,许多研究者已经开始在cache攻击中运用 flush操作(清理操作),如Flush+Reload,Flush+Flush以及基于flush操作的Spectre攻击(利用Flush+Reload原理的Spectre攻击)。我们把这种类型的cache攻击称为“基于flush操作的 cache攻击”。In the past ten years, more and more researchers have successfully implemented micro-architecture attacks using cache (high-speed cache memory) as a breakthrough. Cache attacks have become an important security threat to modern processors and operating systems. Even more strikingly, in early 2018, Meltdown (see M. Lipp, M. Schwarz, D. Gruss, T. Presser, W. Haas, A. Fogh, J. Horn, S. Mangard, P. Kocher, D .Genkin, Y.Yarom, M.Hamburg.Meltdown: Reading Kernel Memory from User Space.In 27th USENIX Security Symposium, 2018) and Specter attacks (see P.Kocher, J.Horn, A.Fogh, D.Genkin, D .Gruss, W.Haas, M.Hamburg, M.Lipp, S.Mangard, T. Prescher, M.Schwarz, Y.Yarom. Specter Attacks: Exploiting Speculative Execution.In 40th IEEE Symposium on Security and Privacy, 2019) was published On the Internet. They combine cache attack technology with out-of-order execution and branch prediction technology, which greatly expands the data stealing ability of cache attack. In recent years, in order to reduce the noise in cache attacks and increase the resolution of attacks, many researchers have begun to use flush operations (cleaning operations) in cache attacks, such as Flush+Reload, Flush+Flush and Specter attacks based on flush operations (Specter attack using the Flush+Reload principle). We call this type of cache attack "flush-based cache attack".
大多数类型的现代处理器拥有现成的指令或者与cache相关的控制寄存器,可以执行 cache行的flush操作,这也是清理cache行的最高效的方法。由于cache的flush操作在系统中非常有用甚至不可或缺,因此直接关闭flush操作是不可行的。例如,DMA数据传输通常需要一个flush操作来确保cache数据中的一致性。另一个例子是没有硬件cache一致性机制的对称多处理器(SMP)体系结构是很可能存在的。在这种情况下,一个快速的cache行flush 操作是非常有用的。因此,怎样保证快速flush操作可用的同时避免其引起的安全漏洞,已经成为一个工业界和学术界亟待解决的问题。Most types of modern processors have ready-made instructions or cache-related control registers that can perform cache line flush operations, which is also the most efficient way to clear cache lines. Since the flush operation of the cache is very useful and even indispensable in the system, it is not feasible to directly disable the flush operation. For example, DMA data transfers usually require a flush operation to ensure coherency in cached data. Another example is that symmetric multiprocessor (SMP) architectures without hardware cache coherency mechanisms are quite possible. In this case, a fast cache line flush operation is very useful. Therefore, how to ensure the availability of the fast flush operation while avoiding the security holes caused by it has become an urgent problem to be solved in the industry and academia.
当前学术界和工业界已经提出了许多检测和防御基于flush操作的cache攻击的方法。这些方法主要分为两个大类,静态代码分析/修复方法以及运行时防御方法。静态代码分析/修复对探测基于flush操作的cache攻击非常有效。但是,混淆和打包技术可以使恶意代码有效躲避静态代码分析技术的探测。而且,使用静态代码修复技术会大大增加系统的性能损失。另一大防御类型使运行时防御策略。大部分已提出的运行时防御方案是利用硬件性能计数器来实时的持续的监控恶意程序。但是,这种实时监控策略经常会带来很高的漏报率。另外,这种防御方案由于需要收集一定时间的记录数据,经常无法足够快速的探测恶意进程,因此无法及时杀死它们。还有一点,Flush+Flush攻击由于其自身的特点,无法被利用性能计数器的防御方案探测到。Currently, academia and industry have proposed many methods to detect and defend against cache attacks based on flush operations. These methods are mainly divided into two broad categories, static code analysis/repair methods and runtime defense methods. Static code analysis/remediation is very effective in detecting flush-based cache attacks. However, obfuscation and packaging techniques can make malicious code effectively evade the detection of static code analysis techniques. Moreover, the use of static code repair technology will greatly increase the performance loss of the system. Another large type of defense is the runtime defense strategy. Most of the proposed runtime defense schemes utilize hardware performance counters to continuously monitor malicious programs in real time. However, this real-time monitoring strategy often results in a high false negative rate. In addition, due to the need to collect recorded data for a certain period of time, this defense solution often cannot detect malicious processes fast enough, so it cannot kill them in time. Another point is that due to its own characteristics, the Flush+Flush attack cannot be detected by the defense scheme using performance counters.
还有另一种运行时防御策略——永久降低时间接口的分辨率。很多浏览器厂商以及W3C 组织已经在这方面做了改进工作。在Oren等人成功的在浏览器上实施了cache攻击(见Y.Oren, V.P.Kemerlis,S.Sethumadhavan,A.D.Keromytis.The Spy in the Sandbox:Practical Cache Attacks in JavaScript and their Implications.In Proceedingsof the 22nd ACM SIGSAC Conference on Computer and Communications Security,2015)之后,浏览器厂商和W3C把performance.now 的分辨率从纳秒级修改为5μs以上。但是,由于高分辨率时间在操作系统的本地应用中非常有用,大部分操作系统厂商没有在用户空间禁用高分辨率时间接口。在Intel x86处理器上, rdtsc指令可以在用户空间直接得到高分辨率时间戳,而运行在ARM-FPGA嵌入式SoC上的系统通常会提供高分辨率APIs,例如perf_event_open系统调用以及POSIX函数 clock_gettime()。即便高分辨率时间接口在用户空间被禁止,拥有root权限以及计时器物理地址的攻击者仍然可以访问高分辨率计时器。There is another runtime defense strategy - permanently reducing the resolution of the time interface. Many browser vendors and W3C organizations have made improvements in this area. Oren et al. successfully implemented cache attacks on browsers (see Y.Oren, V.P.Kemerlis, S.Sethumadhavan, A.D.Keromytis. The Spy in the Sandbox: Practical Cache Attacks in JavaScript and their Implications.In Proceedings of the 22nd ACM After SIGSAC Conference on Computer and Communications Security, 2015), browser vendors and W3C changed the resolution of performance.now from nanoseconds to more than 5μs. However, most operating system vendors do not disable the high-resolution time interface in user space because high-resolution time is useful in native applications of the operating system. On Intel x86 processors, the rdtsc instruction can directly get high-resolution timestamps in user space, and systems running on ARM-FPGA embedded SoCs usually provide high-resolution APIs, such as the perf_event_open system call and the POSIX function clock_gettime( ). Even if the high-resolution time interface is disabled in user space, an attacker with root privileges and the physical address of the timer can still access the high-resolution timer.
发明内容Contents of the invention
本发明的目的在于,利用软硬协同技术,在ARM-FPGA嵌入式SoC上设计一个更安全的高分辨率计时器。软硬协同计时器可以根据系统中是否出现flush操作,自适应的调整自己的分辨率。软硬协同计时器不仅可以抵御拥有该计时器访问权限的攻击者发起的基于flush操作的cache攻击,而且保证了系统在flush操作没有出现时,高分辨率时间的可用性。The purpose of the invention is to design a safer high-resolution timer on the ARM-FPGA embedded SoC by using the software-hardware coordination technology. The soft-hardware cooperative timer can adaptively adjust its own resolution according to whether there is a flush operation in the system. The soft-hard co-timer can not only resist the cache attack based on the flush operation launched by the attacker who has access to the timer, but also guarantee the availability of high-resolution time when the flush operation does not appear in the system.
本发明的软硬协同计时器按阶段分为两个阶段,分别为初始化阶段和运行时阶段。按功能模块分,本发明软硬协同计时器又可分为三个模块,分别为初始化软件模块、运行时软件模块和硬件模块。图1展示了软硬协同计时器的整体工作原理图。硬件模块的主要部件是两个计时器,分别为安全低分辨率计时器和高分辨率计时器。根据软硬协同计时器所处阶段的不同,以及系统运行时是否调用了flush操作,硬件模块自适应的使这两个计时器在系统中可访问或不可访问。当进程中出现了flush操作时,安全低分辨率计时器可通过硬件模块首地址访问,而高分辨率计时器不可访问,我们称这种状态为安全低分辨率状态。相对应的,当进程中没有出现flush操作时,高分辨率计时器可通过硬件模块首地址进行访问,而安全低分辨率计时器不可访问,我们称这种状态为高分辨率状态。The soft-hardware cooperative timer of the present invention is divided into two stages according to stages, which are respectively an initialization stage and a runtime stage. According to the functional modules, the soft-hardware cooperative timer of the present invention can be further divided into three modules, which are respectively an initialization software module, a runtime software module and a hardware module. Figure 1 shows the overall working principle of the soft-hardware cooperative timer. The main components of the hardware module are two timers, a safe low-resolution timer and a high-resolution timer. According to the different phases of the soft-hardware cooperative timer and whether the flush operation is called when the system is running, the hardware module adaptively makes these two timers accessible or inaccessible in the system. When a flush operation occurs in the process, the safe low-resolution timer can be accessed through the first address of the hardware module, but the high-resolution timer cannot be accessed. We call this state a safe low-resolution state. Correspondingly, when there is no flush operation in the process, the high-resolution timer can be accessed through the first address of the hardware module, but the safe low-resolution timer cannot be accessed. We call this state the high-resolution state.
本发明软硬协同计时器的硬件模块用到的参数如表1所示:The parameters used by the hardware module of the soft-hard coordinated timer of the present invention are as shown in Table 1:
表1:硬件模块的参数及解释Table 1: Parameters and explanations of hardware modules
本发明的硬件模块和软件模块之间通过信号进行通信和协同工作,各信号及解释如下表 2所示:The hardware module and the software module of the present invention communicate and work together through signals, and each signal and its explanation are shown in Table 2 below:
表2:软件模块与硬件模块之间的信号及解释Table 2: Signals and explanations between software modules and hardware modules
在初始化阶段中,硬件模块的安全低分辨率计时器始终是可访问的,即高分辨率计时器始终不可访问。初始化软件模块利用软硬协同计时器的硬件模块提供的安全低分辨率时间,循环运行已选定的基于flush操作的cache攻击。根据每次循环的结果,初始化软件模块向硬件模块发送信号,以调节安全低分辨率计时器的分辨率safe_resolution。当攻击失败时,初始化软件模块向硬件模块发送升高分辨率信号,以提高安全低分辨率计时器1个比特的分辨率,即safe_relosution-1。当攻击成功时,初始化软件模块向硬件模块发送降低分辨率信号,以降低安全分辨率计时器1个比特的分辨率,即safe_resolution+1。与此同时,初始化软件模块向硬件模块发送初始化完成信号,完成初始化阶段。硬件模块接收到初始化完成信号之后,软硬协同计时器进入运行时阶段。During the initialization phase, the safe low-resolution timer of the hardware module is always accessible, ie the high-resolution timer is always inaccessible. The initialization software module uses the safe low-resolution time provided by the hardware module of the soft-hard co-timer to run the selected cache attack based on the flush operation in a loop. Depending on the result of each loop, the initialization software module sends a signal to the hardware module to adjust the resolution safe_resolution of the safe low resolution timer. When the attack fails, the initialization software module sends an increase resolution signal to the hardware module to increase the resolution of the safe low resolution timer by 1 bit, namely safe_relosution-1. When the attack is successful, the initialization software module sends a resolution reduction signal to the hardware module to reduce the resolution of the safe resolution timer by 1 bit, that is, safe_resolution+1. At the same time, the initialization software module sends an initialization completion signal to the hardware module to complete the initialization phase. After the hardware module receives the initialization completion signal, the soft-hardware cooperative timer enters the runtime phase.
在运行时阶段,软硬协同计时器的硬件模块根据系统是否出现flush操作,自适应的转换分辨率,以达到抵御基于flush操作的cache攻击的目的。当flush操作出现时,软硬协同计时器转换成安全低分辨率计时器状态,持续safe_time个CPU时钟周期后,再恢复到高分辨率状态。当flush操作未出现时,软硬协同计时器则始终为高分辨率状态。In the runtime stage, the hardware module of the soft-hardware cooperative timer adaptively converts the resolution according to whether there is a flush operation in the system, so as to resist the cache attack based on the flush operation. When the flush operation occurs, the soft-hardware co-timer switches to the safe low-resolution timer state, lasts for safe_time CPU clock cycles, and then returns to the high-resolution state. When the flush operation does not occur, the soft-hard co-timer is always in the high-resolution state.
具体来说,本发明提供的一种可抵抗基于flush操作的cache攻击的软硬协同计时器实现方法,分为两个工作阶段,分别为初始化阶段和运行时阶段。其中:Specifically, the implementation method of a software-hardware cooperative timer that can resist the cache attack based on the flush operation provided by the present invention is divided into two working stages, namely the initialization stage and the runtime stage. in:
(1)在初始化阶段,初始化软件模块与硬件模块之间相互协作以测试安全范围内最高的时间分辨率,并把硬件模块中的安全低分辨率计时器调整到该时间分辨率;(1) In the initialization phase, the initialization software module and the hardware module cooperate with each other to test the highest time resolution within the safe range, and adjust the safe low-resolution timer in the hardware module to the time resolution;
(2)在运行时阶段,运行时软件模块和硬件模块根据系统进程是否调用了flush操作来自适应的转换时间分辨率。(2) In the run-time stage, the run-time software module and hardware module adapt the conversion time resolution according to whether the system process calls the flush operation.
进一步的,所述的(1)初始化阶段,步骤如下:Further, in the (1) initialization stage, the steps are as follows:
步骤1:循环发起选定的基于flush操作的cache攻击,根据每次循环的攻击结果调节软硬协同计时器硬件模块的安全分辨率safe_resolution。Step 1: Initiate the selected cache attack based on the flush operation in a loop, and adjust the safe resolution safe_resolution of the soft-hardware cooperative timer hardware module according to the attack result of each loop.
步骤2:当循环攻击成功时,软硬协同计时器的初始化软件模块向硬件模块发送初始化完成信号,软硬协同计时器开始进入运行时阶段。Step 2: When the cycle attack is successful, the initialization software module of the soft-hardware cooperative timer sends an initialization completion signal to the hardware module, and the soft-hardware cooperative timer enters the runtime phase.
进一步地,所述步骤1中,选定的基于flush操作的cache攻击的操作如下:Further, in the step 1, the operation of the selected cache attack based on the flush operation is as follows:
第一步:分别对在cache内和不在cache内的数据进行多次的访问并记录时间,然后分别计算出两种数据的平均访问时间。Step 1: Access the data in the cache and the data not in the cache multiple times and record the time, and then calculate the average access time of the two kinds of data respectively.
第二步:计算两种平均访问时间的差值,当差值小于1个比特时,判定为攻击失败,当差值大于等于1时,判定为攻击成功。Step 2: Calculate the difference between the two average access times. When the difference is less than 1 bit, it is determined that the attack has failed, and when the difference is greater than or equal to 1, it is determined that the attack is successful.
进一步地,所述步骤1中,根据每次循环结果调节硬件模块的安全分辨率的操作如下:Further, in step 1, the operation of adjusting the security resolution of the hardware module according to the results of each cycle is as follows:
攻击失败时:初始化软件模块向硬件模块发送升高分辨率信号,使硬件模块的安全低分辨率增大1个比特,然后重新开始攻击。When the attack fails: the initialization software module sends an increase resolution signal to the hardware module to increase the safe low resolution of the hardware module by 1 bit, and then restarts the attack.
攻击成功时:初始化软件模块向硬件模块发送降低分辨率信号,使硬件模块的安全分辨率降低1个比特。When the attack is successful: the initialization software module sends a resolution reduction signal to the hardware module, reducing the security resolution of the hardware module by 1 bit.
进一步地,所述步骤2中,攻击成功后,初始化软件模块和硬件模块的操作如下:Further, in the step 2, after the attack is successful, the operation of initializing the software module and the hardware module is as follows:
第一步,初始化软件模块向硬件模块发送降低分辨率信号,使硬件模块的安全分辨率降低1个比特。In the first step, the initialization software module sends a resolution reduction signal to the hardware module, so that the security resolution of the hardware module is reduced by 1 bit.
第二步:初始化软件模块向硬件模块发送初始化完成信号。Step 2: The initialization software module sends an initialization completion signal to the hardware module.
第三步,硬件模块接收初始化完成信号,对信号进行认证。In the third step, the hardware module receives the initialization completion signal and authenticates the signal.
第四步,认证通过后,硬件模块接收初始化完成命令,硬件模块自动的调整为高分辨率计时器状态。Step 4: After passing the authentication, the hardware module receives the initialization completion command, and the hardware module automatically adjusts to the state of the high-resolution timer.
进一步地,所述的(2)运行时阶段,步骤如下:Further, in the (2) runtime stage, the steps are as follows:
步骤1:当fush操作被调用时,运行时软件模块会发送调用flush操作信号给硬件模块。Step 1: When the flush operation is called, the runtime software module will send a call flush operation signal to the hardware module.
步骤2:硬件模块接收到调用flush操作信号后,从高分辨率计时器状态转换成安全的低分辨率计时器状态,即安全的低分辨率计时器在首地址可访问。Step 2: After receiving the flush operation signal, the hardware module switches from the state of the high-resolution timer to the state of the safe low-resolution timer, that is, the safe low-resolution timer is accessible at the first address.
步骤3:硬件模块在安全低分辨率计时器状态下持续一定数量的CPU时钟周期之后,自动恢复为高分辨率计时器状态。Step 3: After the hardware module has been in the safe low-resolution timer state for a certain number of CPU clock cycles, it automatically returns to the high-resolution timer state.
与上面方法对应地,本发明还提供一种可抵抗基于flush操作的cache攻击的软硬协同计时器系统,包括初始化软件模块、运行时软件模块和硬件模块;硬件模块包含安全低分辨率计时器和高分辨率计时器;在初始化阶段,初始化软件模块与硬件模块之间相互协同,以测试安全范围内最高的时间分辨率,并把硬件模块中的安全低分辨率计时器调整到该时间分辨率;在运行时阶段,运行时软件模块和硬件模块根据系统进程是否调用了flush操作来自适应的转换时间分辨率。Corresponding to the above method, the present invention also provides a soft-hardware cooperative timer system that can resist cache attacks based on flush operations, including an initialization software module, a runtime software module and a hardware module; the hardware module includes a safe low-resolution timer and high-resolution timer; in the initialization phase, the initialization software module and the hardware module cooperate with each other to test the highest time resolution within the safety range, and adjust the safe low-resolution timer in the hardware module to the time resolution rate; in the run-time stage, the run-time software module and hardware module adapt the conversion time resolution according to whether the system process calls the flush operation.
本发明还提供一种ARM-FPGA嵌入式SoC,其包含上面所述的可抵抗基于flush操作的 cache攻击的软硬协同计时器系统。The present invention also provides an ARM-FPGA embedded SoC, which includes the above-mentioned soft-hardware cooperative timer system that can resist the cache attack based on the flush operation.
本发明与现有技术相比,具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
第一,在抵御基于flush操作的cache攻击方面,本发明比现有的高分辨率计时器设计方法更安全。由于该软硬协同计时器的分辨率转换过程是在硬件中实现的,因此攻击者即便拥有root权限和该计时器实际的物理地址,仍然无法获得高分辨率时间。First, the present invention is more secure than existing high-resolution timer design methods in resisting cache attacks based on flush operations. Since the resolution conversion process of the soft-hardware cooperative timer is implemented in hardware, even if an attacker has root privileges and the actual physical address of the timer, he still cannot obtain high-resolution time.
第二,由于软硬协同计时器仅在flush操作出现时才会短暂降低其分辨率,因此本发明在确保了使用flush操作的cache攻击者无法得到其攻击时所必须的高分辨率时间的同时,又使得系统在大部分运行时间里(无flush操作出现)其高分辨率计时器时可用的。Second, since the soft-hard co-timer will only briefly reduce its resolution when the flush operation occurs, the present invention ensures that the cache attacker using the flush operation cannot obtain the necessary high-resolution time for its attack , which in turn makes the system's high-resolution timer available for most of the runtime (no flush operation occurs).
第三,本发明优化了计时器的设计,在大大提高了高分辨率计时器安全性的同时,仅增加了微小的访问延时,从而把性能损失降低到了可接受的范围内。Thirdly, the present invention optimizes the design of the timer. While greatly improving the security of the high-resolution timer, it only adds a small access delay, thereby reducing the performance loss to an acceptable range.
附图说明Description of drawings
图1为软硬协同计时器的整体工作原理图;Fig. 1 is the overall working principle diagram of soft-hardware cooperative timer;
图2为初始化软件模块的工作流程图;Fig. 2 is the work flowchart of initialization software module;
图3为运行时软件模块的工作流程图;Fig. 3 is the working flowchart of software module when running;
图4为硬件模块的工作流程图;Fig. 4 is the work flowchart of hardware module;
图5为Flush+Reload攻击的对比结果图;其中(a)图是利用全局计时器进行Flush+Reload 攻击的结果,(b)图是利用PMCCNTR(性能监控循环计数寄存器)进行Flush+Reload攻击的结果,(c)图是利用本发明的软硬协同计时器进行Flush+Reload攻击的结果;Figure 5 is a comparison result diagram of Flush+Reload attack; where (a) is the result of Flush+Reload attack using the global timer, and (b) is the result of Flush+Reload attack using PMCCNTR (performance monitoring cycle count register) Result, (c) figure is the result that utilizes soft-hard cooperative timer of the present invention to carry out Flush+Reload attack;
图6为基于flush操作的Spectre攻击成功率与软硬协同计时器安全分辨率safe_resolution 的关系图;Figure 6 is a relationship diagram between the success rate of a Specter attack based on the flush operation and the safe resolution of the soft-hardware synergy timer safe_resolution;
图7为修改的flush操作与原始flush操作时间消耗对比图。Fig. 7 is a comparison diagram of time consumption between the modified flush operation and the original flush operation.
具体实施方式:Detailed ways:
下面结合附图,对本发明做进一步的说明。Below in conjunction with accompanying drawing, the present invention will be further described.
本发明包含两个软件模块和一个硬件模块,分别为初始化软件模块、运行时软件模块和硬件模块。The present invention includes two software modules and one hardware module, which are initialization software module, runtime software module and hardware module respectively.
图2是本发明的初始化软件模块的工作流程。下面详细说明初始化软件模块的操作步骤:Fig. 2 is the workflow of the initialization software module of the present invention. The following describes the operation steps of initializing the software module in detail:
步骤1:分别对在cache内和不在cache内的数据进行100次访问,并利用软硬协同计时器提供的安全低分辨率时间记录下每次的访问时间,然后计算出cache内数据的平均访问时间T1和不在cache内数据的平均访问时间T2。Step 1: Make 100 accesses to the data in the cache and the data not in the cache respectively, and use the safe low-resolution time provided by the soft-hardware co-timer to record each access time, and then calculate the average access of the data in the cache Time T1 and the average access time T2 of data not in the cache.
步骤2:当T1与T2的差值小于1个比特时,判定为攻击失败,初始化软件模块向硬件模块发送升高分辨率信号,使硬件模块的安全低分辨率增大1个比特,然后从步骤1开始重新运行。当T1和T2的差值大于等于1个比特时,判定为攻击成功,初始化软件模块向硬件模块发送降低分辨率信号,使硬件模块的安全分辨率降低1个比特。Step 2: When the difference between T1 and T2 is less than 1 bit, it is determined that the attack has failed, and the initialization software module sends an increase resolution signal to the hardware module to increase the safe low resolution of the hardware module by 1 bit, and then from Step 1 starts rerun. When the difference between T1 and T2 is greater than or equal to 1 bit, it is determined that the attack is successful, and the initialization software module sends a resolution reduction signal to the hardware module to reduce the security resolution of the hardware module by 1 bit.
步骤3:攻击成功发送降低分辨率信号后,初始化软件阶段向硬件模块发送初始化完成信号,结束初始化阶段。Step 3: After the attack successfully sends a signal to reduce the resolution, the initialization software phase sends an initialization completion signal to the hardware module, and the initialization phase ends.
图3是本发明硬件模块的详细工作流程。下面详细说明硬件部分的操作步骤:Fig. 3 is a detailed workflow of the hardware module of the present invention. The operation steps of the hardware part are described in detail below:
步骤1:在没有收到初始化完成信号之前,硬件模块一直处于安全低分辨率状态,首地址可访问安全低分辨率计时器。在上电之后,安全低分辨率计时器的安全分辨率safe_resolution=16,即最低有效比特位是第16位。此时,硬件模块的分辨率处于绝对安全的范围。Step 1: Before receiving the initialization completion signal, the hardware module is always in the safe low-resolution state, and the first address can access the safe low-resolution timer. After power-on, the safe resolution of the safe low-resolution timer is safe_resolution=16, that is, the least significant bit is the 16th bit. At this time, the resolution of the hardware module is in an absolutely safe range.
步骤2:硬件模块接收来自两个软件模块的32位信号,信号的前8个比特位代表信号的内容,后24个比特位是认证码。Step 2: The hardware module receives 32-bit signals from two software modules, the first 8 bits of the signal represent the content of the signal, and the last 24 bits are the authentication code.
步骤3:对后24位认证码进行认证。如果认证失败,则不做任何操作,即忽略信号前8 个比特位包含的内容。如果认证成功,则读取前8位信号的内容。Step 3: Verify the last 24 digits of the verification code. If the authentication fails, do nothing, that is, ignore the content contained in the first 8 bits of the signal. If the authentication is successful, read the content of the first 8-bit signal.
步骤4:根据前8个比特位信号内容的不同,硬件模块实现不同的功能。当信号内容是减低分辨率时,硬件模块把安全低分辨率计时器的分辨率降低1个比特;当信号内容是升高分辨率时,硬件模块把安全分辨率计时器的分辨率升高一个比特;当信号内容时初始化完成时,硬件模块使高分辨率计时器对系统可见,即在首地址可访问;当信号内容是调用flush操作时,硬件模块转换成安全低分辨率计时器状态,持续safe_time个CPU时钟周期之后,再恢复高分辨率计时器状态。Step 4: According to the different signal contents of the first 8 bits, the hardware module realizes different functions. When the signal content is to reduce the resolution, the hardware module reduces the resolution of the safe low resolution timer by 1 bit; when the signal content is to increase the resolution, the hardware module increases the resolution of the safe resolution timer by one Bit; when the initialization of the signal content is completed, the hardware module makes the high-resolution timer visible to the system, that is, it is accessible at the first address; when the signal content is to call the flush operation, the hardware module switches to the safe low-resolution timer state, After a duration of safe_time CPU clock cycles, the high-resolution timer state is restored.
图4是本发明的运行时软件模块的工作流程,主要完成flush操作的功能,即把对应的L1 和L2cache行的数据清除。下面详细说明一下运行时软件模块的操作步骤:Fig. 4 is the workflow of the runtime software module of the present invention, which mainly completes the function of the flush operation, that is, clears the data of the corresponding L1 and L2 cache lines. The following is a detailed description of the operation steps of the runtime software module:
步骤1:关闭IRQ和FIQ中断——把CPSR(程序状态寄存器)的第7位和第8位比特置1,以关闭IRQ和FIQ中断。Step 1: Turn off IRQ and FIQ interrupts - Set bits 7 and 8 of CPSR (Program Status Register) to 1 to turn off IRQ and FIQ interrupts.
步骤2:清理对应的L1cache行的数据——首先设置CSSELR(cache尺寸选择寄存器) 的第2、3、4位为0,以选择L1cache;然后,把虚拟地址写入DCCIMVAC(基于MVA的数据cache清理和失效)以清理对应的L1cache行。Step 2: Clear the data of the corresponding L1cache row——first set the 2nd, 3rd, and 4th bits of CSSELR (cache size selection register) to 0 to select L1cache; then, write the virtual address into DCCIMVAC (MVA-based data cache Flush and Invalidate) to flush the corresponding L1cache line.
步骤3:把虚拟地址转换为物理地址——用virt_to_phys()把虚拟地址转换成物理地址。Step 3: Convert virtual address to physical address - use virt_to_phys() to convert virtual address to physical address.
步骤4:清除对应的L2cache行的数据——首先,向PL310控制器里的Register 15(调试控制寄存器)写入3,以物理地址写入PL310里的Register 7(通过PA清理cache行)以清除L2cache行的数据;最后,向PL310控制器的Register 15写入0,以使能cache的write-back (写回)模式并且打开linefills(缓存行填充)功能。Step 4: Clear the data of the corresponding L2cache line - first, write 3 to Register 15 (debug control register) in the PL310 controller, and write Register 7 in the PL310 with the physical address (clear the cache line through PA) to clear The data of the L2cache line; finally, write 0 to Register 15 of the PL310 controller to enable the write-back (write back) mode of the cache and open the linefills (cache line filling) function.
步骤5:打开IRQ和FIQ中断——向CPSR(程序状态寄存器)的第7位和第8位比特置0,以关闭IRQ和FIQ中断。Step 5: Turn on IRQ and FIQ interrupts - Set 0 to bits 7 and 8 of the CPSR (Program Status Register) to turn off IRQ and FIQ interrupts.
步骤6:向硬件模块发送调用flush操作信号——每次flush操作结束时,都要向硬件模块发送调用flush操作信号,以此来触发硬件模块的分辨率转换。Step 6: Send a call flush operation signal to the hardware module——when each flush operation ends, a call flush operation signal must be sent to the hardware module to trigger resolution conversion of the hardware module.
为了说明本发明的可抵抗基于flush操作的cache攻击的效果,首先给出利用不同计时器的Flush+Reload攻击的对比结果,然后给出基于flush操作的Spectre攻击的成功率与软硬协同计时器安全分辨率(safe_resolution)的关系图。In order to illustrate the effect of the present invention that can resist the cache attack based on the flush operation, the comparison results of the Flush+Reload attack using different timers are first given, and then the success rate of the Specter attack based on the flush operation and the soft-hard synergy timer are given. Diagram of safe resolution (safe_resolution).
在ARM处理器上,全局计时器和PMCCNTR(性能监控循环技术寄存器)是两种常用的高分辨率计时器,高分辨率时间API常常利用这两种底层硬件计时器实现。为了对比软硬协同计时器的防御效果,我们分别为全局计时器、PMCCNTR以及本发明的软硬协同计时器设计了内核驱动来实现高分辨率时间API,并分别用来运行Flush+Reload攻击。图5是利用不同的计时器运行Flush+Reload攻击的对比结果。我们选定的攻击对象是OpenSSL中的AES 加密T表实现。在图5中,(a)图是利用全局计时器进行Flush+Reload攻击的结果,(b)图是利用PMCCNTR(性能监控循环计数寄存器)进行Flush+Reload攻击的结果,(c)图是利用本发明的软硬协同计时器进行Flush+Reload攻击的结果。三幅图的横坐标表示cache行flush 操作的索引,纵坐标表示AES加密T表实现中的相对于Te0表首地址的偏移地址(/4)。我们在每个cache行索引中的每个偏移地址上都加密了1000次。图中颜色的深浅代表了cache 命中的次数。On the ARM processor, the global timer and PMCCNTR (performance monitoring cycle technology register) are two commonly used high-resolution timers, and the high-resolution time API is often implemented using these two underlying hardware timers. In order to compare the defense effect of the soft-hard cooperative timer, we designed kernel drivers for the global timer, PMCCNTR, and the soft-hard cooperative timer of the present invention to implement high-resolution time APIs, and used them to run Flush+Reload attacks respectively. Figure 5 is the comparison result of running the Flush+Reload attack with different timers. Our chosen attack object is the AES encrypted T-list implementation in OpenSSL. In Figure 5, (a) is the result of the Flush+Reload attack using the global timer, (b) is the result of the Flush+Reload attack using the PMCCNTR (performance monitoring cycle count register), (c) is the result of using The result of the Flush+Reload attack performed by the soft-hard coordinated timer of the present invention. The abscissa of the three figures represents the index of the cache line flush operation, and the ordinate represents the offset address (/4) relative to the head address of the Te0 table in the implementation of the AES encrypted T table. We encrypt 1000 times at each offset in each cache line index. The shades of the colors in the figure represent the number of cache hits.
由于密钥key的第一字节k0我们设定为0x00,因此,纵坐标的偏移地址也对应着我们令明文第一字节以16为步长从0增长到255,因此当Flush+Reload攻击成功时,在主对角线上的cache命中次数应该明显高于其他地方。换句话说,主对角线应该是一条浅色的直线。从图5的三幅图中我们可以看到,使用PMCCNTR和全局计时器的Flush+Reload攻击。主对角线是一条非常明显的浅色直线,说明攻击成功。但是,使用软硬协同计时器进行Flush+Reload攻击,主对角线的颜色分布近似于随机,说明攻击失败。Flush+Reload攻击的对比结果证明,软硬协同计时器相较于其他两个高分辨率计时器,可非常有效的防御Flush+Reload攻击。Since the first byte k 0 of the key key is set to 0x00, the offset address of the ordinate also corresponds to We make the first byte of the plaintext increase from 0 to 255 in steps of 16, so when the Flush+Reload attack is successful, the number of cache hits on the main diagonal should be significantly higher than other places. In other words, the main diagonal should be a light colored straight line. From the three diagrams in Figure 5, we can see the Flush+Reload attack using PMCCNTR and the global timer. The main diagonal is a very obvious light-colored straight line, indicating a successful attack. However, when the Flush+Reload attack is performed using the soft-hard synergy timer, the color distribution of the main diagonal is approximately random, indicating that the attack fails. The comparison results of the Flush+Reload attack prove that the soft-hardware synergy timer can effectively defend against the Flush+Reload attack compared with the other two high-resolution timers.
图6是基于flush操作的Spectre攻击与软硬协同计时器的安全分辨率safe_resolution的关系图。横坐标代表safe_resolution的取值,纵坐标代表Spectre攻击的成功率。我们把原始的 Spectre攻击源代码(见P.Kocher,J.Horn,A.Fogh,D.Genkin,D.Gruss,W.Haas,M.Hamburg, M.Lipp,S.Mangard,T.Prescher,M.Schwarz,Y.Yarom.Spectre Attacks:Exploiting Speculative Execution.In 40th IEEESymposium on Security and Privacy,2019)移植到ARM-FPGA嵌入式 SoC平台上,并简单的修改其为每次攻击一个字节,破解出正确的字节就代表攻击成功。Figure 6 is a relationship diagram of the Specter attack based on the flush operation and the safe resolution safe_resolution of the soft-hard co-timer. The abscissa represents the value of safe_resolution, and the ordinate represents the success rate of the Specter attack. We put the original Specter attack source code (see P.Kocher, J.Horn, A.Fogh, D.Genkin, D.Gruss, W.Haas, M.Hamburg, M.Lipp, S.Mangard, T.Prescher, M.Schwarz, Y.Yarom. Specter Attacks: Exploiting Speculative Execution.In 40th IEEE Symposium on Security and Privacy, 2019) transplanted to the ARM-FPGA embedded SoC platform, and simply modify it to attack one byte at a time, crack If the correct byte is produced, the attack is successful.
从图6中可以看到,攻击成功率整体来说是随着safe_resolution的增大而减小的。横坐标的最左边是1,即最低的有效比特位是第1位。它代表着当系统中没有flush操作发生时,软硬协同计时器的高分辨率状态。当横坐标的数值增加到10,即最低的有效比特位位第10位时,攻击成功率降低到接近0。这个数值也就是初始化结束时,safe_resolution参数所在的位置,图6中用红色虚线做了标记。横坐标的最右边是16,即最低有效比特位是第16位,代表初始化之前safe_resolution的状态。从图6中我们可以明显的看到,初始化后的软硬协同计时器可以把攻击成功率降低到接近于0的水平,可以有效的抵御基于flush操作的Spectre攻击。It can be seen from Figure 6 that the overall attack success rate decreases with the increase of safe_resolution. The leftmost of the abscissa is 1, that is, the lowest significant bit is the first bit. It represents the high-resolution state of the hard-software co-timer when no flush operation is taking place in the system. When the value of the abscissa increases to 10, that is, the lowest effective bit is the 10th, the attack success rate decreases to close to 0. This value is also the location of the safe_resolution parameter at the end of initialization, marked with a red dotted line in Figure 6. The far right of the abscissa is 16, that is, the least significant bit is the 16th bit, which represents the state of safe_resolution before initialization. From Figure 6, we can clearly see that the initialized soft-hardware synergy timer can reduce the attack success rate to a level close to 0, which can effectively resist the Specter attack based on the flush operation.
为了说明本发明的性能,首先给出上述三种计时器访问时间的对比表格,然后给出原始的和修改后的flush操作的时间消耗对比图。In order to illustrate the performance of the present invention, a comparison table of the access time of the above three timers is first given, and then a comparison chart of the time consumption of the original and modified flush operations is given.
下面的表3是不同计时器的平均访问延时对比,所有的延时都归一化为667MHz的CPU 时钟。Table 3 below compares the average access latencies of different timers, all latencies are normalized to the 667MHz CPU clock.
表3:不同计时器的平均访问延时Table 3: Average access latency for different timers
从表3可以看出,本发明的软硬协同计时器访问延时比PMCCNTR慢了9.5%,但是比全局计时器快了5%。这说明软硬协同计时器的访问延时与全局计时器和PMCCNTR相比,并没有明显的增加。It can be seen from Table 3 that the access delay of the soft-hard cooperative timer of the present invention is 9.5% slower than the PMCCNTR, but faster than the global timer by 5%. This shows that the access delay of the soft-hard co-timer is not significantly increased compared with the global timer and PMCCNTR.
图7是两种flush操作API的时间消耗的分布。三角代表了原始的flush操作API,黑色方块代表了专为本发明的软硬协同计时器修改的flush操作API。整体来说,修改后的flush 操作API比原始的flush操作API的时间消耗多了12%。这主要是因为本发明的flush操作 API比原始的flush操作API多了一个iowrite32()的函数,以实现与硬件模块的通信。Figure 7 is the distribution of the time consumption of the two flush operation APIs. The triangle represents the original flush operation API, and the black square represents the flush operation API specially modified for the soft-hardware cooperative timer of the present invention. Overall, the modified flush operation API consumes 12% more time than the original flush operation API. This is mainly because the flush operation API of the present invention has one more function of iowrite32 () than the original flush operation API, so as to realize the communication with the hardware module.
本发明另一实施例提供一种ARM-FPGA嵌入式SoC,其包含上面所述的可抵抗基于flush 操作的cache攻击的软硬协同计时器系统。该软硬协同计时器系统,包括初始化软件模块、运行时软件模块和硬件模块;硬件模块包含安全低分辨率计时器和高分辨率计时器;在初始化阶段,初始化软件模块与硬件模块之间相互协同,以测试安全范围内最高的时间分辨率,并把硬件模块中的安全低分辨率计时器调整到该时间分辨率;在运行时阶段,运行时软件模块和硬件模块根据系统进程是否调用了flush操作来自适应的转换时间分辨率。Another embodiment of the present invention provides an ARM-FPGA embedded SoC, which includes the above-mentioned soft-hardware cooperative timer system that can resist cache attacks based on flush operations. The soft-hardware cooperative timer system includes an initialization software module, a runtime software module and a hardware module; the hardware module includes a safe low-resolution timer and a high-resolution timer; in the initialization phase, the initialization software module and the hardware module interact with each other Cooperate to test the highest time resolution within the safe range, and adjust the safe low-resolution timer in the hardware module to this time resolution; in the runtime phase, the runtime software module and hardware module are called according to whether the system process calls The flush operation comes from adaptive transformation time resolution.
以上实施例仅用以说明本发明的技术方案而非对其进行限制,本领域的普通技术人员可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明的精神和范围,本发明的保护范围应以权利要求书所述为准。The above embodiments are only used to illustrate the technical solution of the present invention and not to limit it. Those of ordinary skill in the art can modify or equivalently replace the technical solution of the present invention without departing from the spirit and scope of the present invention. The scope of protection should be determined by the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910604224.6A CN110502933B (en) | 2019-07-05 | 2019-07-05 | A soft-hard cooperative timer implementation method and system capable of resisting cache attack based on flush operation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910604224.6A CN110502933B (en) | 2019-07-05 | 2019-07-05 | A soft-hard cooperative timer implementation method and system capable of resisting cache attack based on flush operation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110502933A true CN110502933A (en) | 2019-11-26 |
CN110502933B CN110502933B (en) | 2021-07-13 |
Family
ID=68585955
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910604224.6A Active CN110502933B (en) | 2019-07-05 | 2019-07-05 | A soft-hard cooperative timer implementation method and system capable of resisting cache attack based on flush operation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110502933B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111898127A (en) * | 2020-07-02 | 2020-11-06 | 中国科学院信息工程研究所 | A method and system for resisting Spectre attack based on flush operation |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090089564A1 (en) * | 2006-12-06 | 2009-04-02 | Brickell Ernie F | Protecting a Branch Instruction from Side Channel Vulnerabilities |
EP2521412A1 (en) * | 2008-10-31 | 2012-11-07 | HTC Corporation | Method fro improving random access procedure in wireless communications system and related communication device |
CN104144165A (en) * | 2014-08-11 | 2014-11-12 | 互联网域名系统北京市工程研究中心有限公司 | Caching method and system for resisting DNS dead domain attacks |
CN105022956A (en) * | 2015-08-14 | 2015-11-04 | 中国科学院计算技术研究所 | Method for protecting against code reuse attack |
US20150381357A1 (en) * | 2014-06-25 | 2015-12-31 | Robert Bosch Gmbh | Method and Apparatus for Generating a Secret Key |
CN107085545A (en) * | 2017-06-01 | 2017-08-22 | 北京智慧云测科技有限公司 | The safety evaluation method and system of aes algorithm based on Cache |
CN107820605A (en) * | 2017-03-27 | 2018-03-20 | 香港应用科技研究院有限公司 | System and method for dynamic low-latency optimization |
CN108650075A (en) * | 2018-05-11 | 2018-10-12 | 中国科学院信息工程研究所 | A kind of quick encryption implementation methods of soft or hard combination AES and system of preventing side-channel attack |
CN109213301A (en) * | 2017-06-29 | 2019-01-15 | 美商安迈科技股份有限公司 | Support the UEFI shell program technic and its computer system of battery saving mode |
CN109918928A (en) * | 2019-03-05 | 2019-06-21 | 中国人民解放军32082部队 | A kind of password chronometric analysis method of cache access collision |
-
2019
- 2019-07-05 CN CN201910604224.6A patent/CN110502933B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090089564A1 (en) * | 2006-12-06 | 2009-04-02 | Brickell Ernie F | Protecting a Branch Instruction from Side Channel Vulnerabilities |
EP2521412A1 (en) * | 2008-10-31 | 2012-11-07 | HTC Corporation | Method fro improving random access procedure in wireless communications system and related communication device |
US20150381357A1 (en) * | 2014-06-25 | 2015-12-31 | Robert Bosch Gmbh | Method and Apparatus for Generating a Secret Key |
CN104144165A (en) * | 2014-08-11 | 2014-11-12 | 互联网域名系统北京市工程研究中心有限公司 | Caching method and system for resisting DNS dead domain attacks |
CN105022956A (en) * | 2015-08-14 | 2015-11-04 | 中国科学院计算技术研究所 | Method for protecting against code reuse attack |
CN107820605A (en) * | 2017-03-27 | 2018-03-20 | 香港应用科技研究院有限公司 | System and method for dynamic low-latency optimization |
CN107085545A (en) * | 2017-06-01 | 2017-08-22 | 北京智慧云测科技有限公司 | The safety evaluation method and system of aes algorithm based on Cache |
CN109213301A (en) * | 2017-06-29 | 2019-01-15 | 美商安迈科技股份有限公司 | Support the UEFI shell program technic and its computer system of battery saving mode |
CN108650075A (en) * | 2018-05-11 | 2018-10-12 | 中国科学院信息工程研究所 | A kind of quick encryption implementation methods of soft or hard combination AES and system of preventing side-channel attack |
CN109918928A (en) * | 2019-03-05 | 2019-06-21 | 中国人民解放军32082部队 | A kind of password chronometric analysis method of cache access collision |
Non-Patent Citations (3)
Title |
---|
MARCO CHIAPPETTA 等: "Real time detection of cache-based side-channel attacks using hardware performance counters", 《APPLIED SOFT COMPUTING》 * |
MICHAEL SCHWARZ 等: "Fantastic Timers and Where to Find Them: High-Resolution Microarchitectural Attacks in JavaScript", 《FC 2017: FINANCIAL CRYPTOGRAPHY AND DATA SECURITY》 * |
刘维杰: "云计算环境下跨虚拟机侧信道的攻击、检测与防御", 《中国博士学位论文全文数据库 信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111898127A (en) * | 2020-07-02 | 2020-11-06 | 中国科学院信息工程研究所 | A method and system for resisting Spectre attack based on flush operation |
Also Published As
Publication number | Publication date |
---|---|
CN110502933B (en) | 2021-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Schwarz et al. | ZombieLoad: Cross-privilege-boundary data sampling | |
Taram et al. | Context-sensitive fencing: Securing speculative execution via microcode customization | |
Lipp et al. | Meltdown | |
Costan et al. | Sanctum: Minimal hardware extensions for strong software isolation | |
Guanciale et al. | Cache storage channels: Alias-driven attacks and verified countermeasures | |
US8909967B1 (en) | Technique for secure computation | |
US10095862B2 (en) | System for executing code with blind hypervision mechanism | |
US20070226795A1 (en) | Virtual cores and hardware-supported hypervisor integrated circuits, systems, methods and processes of manufacture | |
Zhu et al. | Understanding the security of discrete GPUs | |
US20070180269A1 (en) | I/O address translation blocking in a secure system during power-on-reset | |
CN113228024B (en) | Secure predictor for speculative execution | |
Strackx et al. | The Heisenberg defense: Proactively defending SGX enclaves against page-table-based side-channel attacks | |
Xiong et al. | Survey of transient execution attacks | |
He et al. | Sgxlinger: A new side-channel attack vector based on interrupt latency against enclave execution | |
Taram et al. | Mobilizing the micro-ops: Exploiting context sensitive decoding for security and energy efficiency | |
US10171500B2 (en) | Systems, apparatuses, and methods for enforcing security on a platform | |
US20100138616A1 (en) | Input-output virtualization technique | |
Zhou et al. | Smartnic security isolation in the cloud with s-nic | |
CN111898127A (en) | A method and system for resisting Spectre attack based on flush operation | |
Schwarzl et al. | Dynamic process isolation | |
CN110502933B (en) | A soft-hard cooperative timer implementation method and system capable of resisting cache attack based on flush operation | |
Schwarz | Software-based side-channel attacks and defenses in restricted environments | |
Guo et al. | Research on arm TrustZone and understanding the security vulnerability in its cache architecture | |
Lee et al. | Extrax: Security extension to extract cache resident information for snoop-based external monitors | |
Ge et al. | AdapTimer: Hardware/software collaborative timer resistant to flush-based cache attacks on ARM-FPGA embedded SoC |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |