论文标题
利用安全加密的虚拟机的接口
Exploiting Interfaces of Secure Encrypted Virtual Machines
论文作者
论文摘要
云计算是用于远程处理数据的方便模型。但是,用户必须通过存储和处理的数据的机密性和完整性来信任其云提供商。为了增加对虚拟机的保护,AMD引入了SEV,这是一个硬件功能,旨在保护虚拟机中的代码和数据。这允许在云环境中存储和处理敏感数据,而无需信任云提供商或基础软件。但是,虚拟机仍然取决于执行某些活动的管理程序,例如特殊CPU指令或设备的仿真。但是,在虚拟机中运行的大多数代码都不是用攻击者模型编写的,该模型认为该管理程序是恶意的。在这项工作中,我们引入了一类新的攻击类,其中恶意管理器操纵了SEV或SEV-ES虚拟机的外部接口,以使其符合其自身利益。我们首先展示如何利用虚拟设备来提取虚拟机的加密密钥和秘密数据。然后,我们展示如何通过仔细操纵CPUID和RDTSC指令的结果来减少虚拟机中概率内核防御的熵。我们继续展示一种基于MMIO地区在VM的地址空间上的伪造的秘密数据剥落和代码注入方法。最后,我们展示了另一项攻击,该攻击迫使VM的堆栈解密,并使用面向返回的编程在VM内执行任意代码。尽管我们的方法也适用于传统的虚拟化环境,但其严重性大大增加了SEV-ES的攻击者模型,该模型旨在保护虚拟机免受良性但易受伤害的Hyprovisor的侵害。
Cloud computing is a convenient model for processing data remotely. However, users must trust their cloud provider with the confidentiality and integrity of the stored and processed data. To increase the protection of virtual machines, AMD introduced SEV, a hardware feature which aims to protect code and data in a virtual machine. This allows to store and process sensitive data in cloud environments without the need to trust the cloud provider or the underlying software. However, the virtual machine still depends on the hypervisor for performing certain activities, such as the emulation of special CPU instructions, or the emulation of devices. Yet, most code that runs in virtual machines was not written with an attacker model which considers the hypervisor as malicious. In this work, we introduce a new class of attacks in which a malicious hypervisor manipulates external interfaces of an SEV or SEV-ES virtual machine to make it act against its own interests. We start by showing how we can make use of virtual devices to extract encryption keys and secret data of a virtual machine. We then show how we can reduce the entropy of probabilistic kernel defenses in the virtual machine by carefully manipulating the results of the CPUID and RDTSC instructions. We continue by showing an approach for secret data exfiltration and code injection based on the forgery of MMIO regions over the VM's address space. Finally, we show another attack which forces decryption of the VM's stack and uses Return Oriented Programming to execute arbitrary code inside the VM. While our approach is also applicable to traditional virtualization environments, its severity significantly increases with the attacker model of SEV-ES, which aims to protect a virtual machine from a benign but vulnerable hypervisor.