CPU缓存侧信道攻击综述-Survey of CPU Cache-Based Side-Channel Attacks

Survey of CPU Cache-Based Side-Channel Attacks: Systematic Analysis, Security Models, and Countermeasures

Chao Su, Qingkai Zeng, “Survey of CPU Cache-Based Side-Channel Attacks: Systematic Analysis, Security Models, and Countermeasures”, Security and Communication Networks, vol. 2021, Article ID 5559552, 15 pages, 2021. https://doi.org/10.1155/2021/5559552.


When the CPU tries to give access to data in the cache, it will first search in the L1 cache. If it cannot find it, it will switch to the L2 cache and so on. The hierarchy inheritance structure of the CPU cache has such a characteristic that if a certain data exists in the high-level cache (such as L1 cache), it must be found in the lower-level cache (such as L3 cache).

The inclusiveness of the CPU cache is defined as follows:

m m m denotes a piece of memory data. L 1 L1 L1, L 2 L2 L2, and L 3 L3 L3 denote the contents in the L1 cache, L2 cache, and L3 cache. Then,
m ∈ L 1 ⟶ m ∈ L 2 ⟶ m ∈ L 3 m \in L1 \longrightarrow m \in L2 \longrightarrow m \in L3 mL1mL2mL3
The inclusiveness of the CPU cache also ensures that the eviction in the L3 cache leads to the eviction in L2 and L1 cache, which means
m ∉ L 3 ⟶ m ∉ L 2 ⟶ m ∉ L 1 m \notin L3 \longrightarrow m \notin L2 \longrightarrow m\notin L1 m/L3m/L2m/L1


1. Attack Workflow.

To cause information leakage, side channel attacks need to complete the following four steps.

(1) Define the Connection between the Victim Program and the Attacker Program.

展开信道攻击的第一步是搜索可用的信道。受害者和攻击者程序之间的连接可以指示信道的载体。在基于CPU缓存的侧信道攻击中,通道的载体是CPU缓存,这意味着需要在缓存中搜索攻击者程序与受害程序之间的相关性。例如,Eckert等人的研究。

[19]利用了一个共享库(OpenSSL 0.9.8n),攻击者和受害者都调用了这个库。在完全公平的调度设置中,它们占用了完全相同的缓存。大页面机制也可引入“连接”。

VMware和Xen等虚拟化应用程序通常会部署大页面来管理客户虚拟机[20]中的物理内存。在这种情况下,攻击者利用大页面机制在虚拟页面和物理页面之间建立连接。这种连接允许攻击通过缓存窥探其他进程的盗版数据。

(2) Collect the Activities in the Cache of the Attacker’s Program While It Is Running.

根据受害者和攻击程序之间的连接,攻击者会使用适当的内存读写模式来检测自己的缓存状态。在这个阶段,攻击者通常预先设置缓存的状态。例如,通过连续的内存读写,攻击者可以确保他们的目标内存被加载到缓存中。他们还使用CLFLUSH指令或其他方法来确保内容被逐出缓存。当受害进程被执行时,攻击者将再次连续多次访问内存。缓存的状态可以通过访问延迟来记录。该步骤与受害程序同时执行。

(3) Speculate(推测) on the Cache Changes of the Victim Program.

There are usually two types of connections between cache states from the victim and attacker processes: consistency and exclusion.

The consistency connection:指攻击者和受害者进程共享相同的缓存状态(hit or miss),这在基于共享库的侧信道攻击中广泛存在[5,6,16,20 - 23]。它允许缓存外的内容由竞争对手加载,因此,它可以监视敏感信息。

Exclusion: 被攻击者进程和被攻击者进程相互独占使用缓存。当其中一个试图占用缓存时,它首先将竞争对手的内容逐出缓存,从而导致缓存状态的改变。

(4) Infer the Sensitive Information of the Victim’s Program.

这里考虑受害程序的缓存状态敏感信息之间的“连接”(connection)。在缓存侧信道攻击时,需要对受害者的程序进行先验分析(a priori analysis),使攻击者能够定义状态变化与受害者敏感信息之间的关联。

2. Example: RSA side channel attack.

当攻击者知道受害者程序的状态变化时,攻击者可以推测其敏感信息,并最终导致信息泄露。完整的攻击过程在图2中解释。

  • In step 1, attackers check if the attacker program and victim program co-reside(同时驻留,共存) in the same system. The co-residence ensures that there is a connection between them, and thus, they can use the same cache.

  • In step 2, define s s s as the sensitive information in the victim program.
    When the victim program is executed, specific state changes (defined as p p p ) displayed on the cache are related to the sensitive information s s s. That is, there is a mapping:
    p = f ( s ) p=f(s) p=

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值