论文标题
微码作为系统防御的基础的探索性分析
An Exploratory Analysis of Microcode as a Building Block for System Defenses
论文作者
论文摘要
Microcode是现代X86处理器使用的抽象层,将用户可见的CISC指令解释为硬件内部RISC指令。更新X86微型模块的功能使供应商可以在现场修改CPU行为,从而修改错误的微体系结构过程,甚至实现新功能。最突出的是,Intel通过Microcode更新减轻了最近的幽灵和崩溃漏洞。不幸的是,Microcode是专有和封闭的来源,并且几乎没有关于其内部工作的公开信息。 在本文中,我们提出了新的逆向工程结果,以扩展和补充公众对专有微型码的知识。基于这些新颖的见解,我们展示了现代系统防御和工具如何在商业,现成的AMD X86 CPU上实现。我们演示了建立良好的系统安全防御措施,例如时间攻击缓解,硬件辅助地址消毒以及指令集随机化的随机化如何在微码中实现。我们还提出了概念验证的实施,该实施是微代码辅助仪器框架。最后,我们展示了如何在Microcode中实现安全的微型更新机制和飞地功能,以实现一个较小的受信任的执行环境。公开可用的所有复制和扩展我们的结果所需的所有微码程序和整个基础架构。
Microcode is an abstraction layer used by modern x86 processors that interprets user-visible CISC instructions to hardware-internal RISC instructions. The capability to update x86 microcode enables a vendor to modify CPU behavior in-field, and thus patch erroneous microarchitectural processes or even implement new features. Most prominently, the recent Spectre and Meltdown vulnerabilities were mitigated by Intel via microcode updates. Unfortunately, microcode is proprietary and closed source, and there is little publicly available information on its inner workings. In this paper, we present new reverse engineering results that extend and complement the public knowledge of proprietary microcode. Based on these novel insights, we show how modern system defenses and tools can be realized in microcode on a commercial, off-the-shelf AMD x86 CPU. We demonstrate how well-established system security defenses such as timing attack mitigations, hardware-assisted address sanitization, and instruction set randomization can be realized in microcode. We also present a proof-of-concept implementation of a microcode-assisted instrumentation framework. Finally, we show how a secure microcode update mechanism and enclave functionality can be implemented in microcode to realize a small trusted execution environment. All microcode programs and the whole infrastructure needed to reproduce and extend our results are publicly available.