某些 x86 CPU 中的硬件后门
Hardware backdoors in some x86 CPUs

原始链接: https://github.com/xoreaxeaxeax/rosenbridge

由研究人员克里斯托弗·多马斯(Christopher Domas)领导的“罗森布里奇”(Rosenbridge)项目,在部分 VIA C3 x86 处理器中发现了一个严重的硬件后门。该漏洞存在于 CPU 内部一个隐藏且深度嵌入的协处理器中,它能够绕过内存保护和权限检查,进而修改内核级数据。 虽然激活该后门通常需要内核级访问权限,但在某些系统中它是默认启用的,这使得非特权用户(Ring 3)能够提升权限并操纵内核。与管理引擎(Management Engine)等已知组件不同,这个隐藏的核心拥有对 CPU 寄存器文件和执行流水线的完全访问权。 尽管此漏洞主要存在于工业和旧款消费级硬件所使用的 VIA C3 处理器中,但这一案例凸显了日益复杂的处理器架构所带来的安全风险。该项目提供了用于检测后门的开源工具,以及在引导过程中将其禁用的说明。多马斯指出,此功能很可能是为嵌入式市场设计的实用工具,而非恶意植入,但它的存在确实引发了重大的安全隐患。建议用户注意,所提供的工具目前处于 Alpha 测试阶段,仅供研究使用。

这份 Hacker News 讨论聚焦于一项(2018 年的)研究项目,该项目涉及在旧款 VIA C3 CPU 中发现的硬件后门。虽然最初的帖子标题称这对 x86 处理器构成了普遍威胁,但评论者澄清说,该问题仅限于较旧且冷门的 VIA 硬件中的调试功能,而非现代 Intel 或 AMD 芯片。 这场辩论突出了几个核心主题: * **“后门”的定义:** 用户争论,如果一项未经记录、由制造商预留的调试功能并非用于恶意目的,那么即便在保持开启状态下存在安全风险,它是否仍构成“后门”。 * **系统性担忧:** 许多评论者认为,现代处理器(如 Intel ME、AMD PSP)包含类似的、不透明且独立的核心,这些核心在用户控制之外运行,构成了对硬件主权的持续性顾虑。 * **供应链与安全性:** 该讨论帖是对依赖硬件中专有二进制代码块(binary blobs)的一个警示。参与者指出,随着芯片变得越来越复杂,它们正成为“黑盒”,使得用户难以验证自身系统的完整性。 * **缓解措施:** 实现硬件安全性的建议包括对操作技术进行物理隔离(air-gapping),以及使用开源硬件或模拟技术。
相关文章

原文

: hardware backdoors in x86 CPUs

github.com/xoreaxeaxeax/rosenbridge // domas // @xoreaxeaxeax

project:rosenbridge reveals a hardware backdoor in some desktop, laptop, and embedded x86 processors.

The backdoor allows ring 3 (userland) code to circumvent processor protections to freely read and write ring 0 (kernel) data. While the backdoor is typically disabled (requiring ring 0 execution to enable it), we have found that it is enabled by default on some systems.

This repository contains utilities to check if your processor is affected, close the backdoor if it is present, and the research and tools used to discover and analyze the backdoor.

The rosenbridge backdoor is a small, non-x86 core embedded alongside the main x86 core in the CPU. It is enabled by a model-specific-register control bit, and then toggled with a launch-instruction. The embedded core is then fed commands, wrapped in a specially formatted x86 instruction. The core executes these commands (which we call the 'deeply embedded instruction set'), bypassing all memory protections and privilege checks.

While the backdoor should require kernel level access to activate, it has been observed to be enabled by default on some systems, allowing any unprivileged code to modify the kernel.

The rosenbridge backdoor is entirely distinct from other publicly known coprocessors on x86 CPUs, such as the Management Engine or Platform Security Processor; it is more deeply embedded than any known coprocessor, having access to not only all of the CPU's memory, but its register file and execution pipeline as well.

It is thought that only VIA C3 CPUs are affected by this issue. The C-series processors are marketed towards industrial automation, point-of-sale, ATM, and healthcare hardware, as well as a variety of consumer desktop and laptop computers.

The scope of this vulnerability is limited; generations of CPUs after the C3 no longer contain this feature.

This work is released as a case study and thought experiment, illustrating how backdoors might arise in increasingly complex processors, and how researchers and end-users might identify such features. The tools and research offered here provide the starting point for ever-deeper processor vulnerability research.

To check if your CPU is affected:

git clone https://github.com/xoreaxeaxeax/rosenbridge
cd rosenbridge/util
make
sudo modprobe msr
sudo ./bin/check

The provided utility must be run on baremetal (not in a virtual-machine), and is in an alpha state. It may crash, panic, or hang systems not containing the backdoor.

The utilities provided here are designed around a specific processor family and core; unfortunately, the tools will miss the backdoor if it has been even slightly modified from the researched form.

Some systems have the backdoor enabled by default, allowing unprivileged code to gain kernel level access without permission. If the steps in 'Checking your CPU' indicate that your CPU is vulnerable, you can install a script to close the backdoor early in the boot process:

cd fix
make
sudo make install
reboot

Note that, even with this, an attacker with kernel level access can still re-enable the backdoor. This script is provided as an outline for correcting the issue during the boot process, but will require adaptation for different systems.

The sandsifter utility is used extensively in this research for uncovering unknown instructions.

  • asm

    An assembler for the Deeply Embedded Instruction Set (DEIS). It converts programs written in the custom rosenbridge assembly into x86 instructions, which, when executed following the launch-instruction, will send the commands to the hidden CPU core.

  • esc

    A proof-of-concept of using the rosenbridge backdoor for privilege escalation.

  • fix

    A rough outline for closing the vulnerability on affected systems, to the extent possible through model-specific-register updates.

  • fuzz

    A collection of utilities used to fuzz both the x86 and rosenbridge cores, in order to isolate the unknown launch-instruction and bridge-instruction, and resolve the instruction format of the rosenbridge core.

    • deis

      The fuzzer used to explore the effects and capabilities of the hidden CPU core.

    • exit

      It is thought that, on some processors, an exit sequence is needed to switch back to the x86 core at the end of a DEIS sequence. This directory contains the utilities used to search for the exit sequence in early stages of the research, but was abandoned when a processor was found not requiring any such sequence.

    • manager

      A collection of python utilities designed to monitor and manage fuzzing tasks distributed across a network of workers.

    • wrap

      A stripped down version of the sandsifter fuzzer, used to identify the bridge-instruction that will send commands from the x86 core to the hidden rosenbridge core.

  • kern

    A collection of helper utilities used to monitor kernel memory and registers for changes caused by fuzzed DEIS instructions.

  • lock

    Utilities to lock or unlock the rosenbridge backdoor.

  • proc

    A tool to identify patterns from the fuzzing logs to identify classes of DEIS instruction behaviors.

  • test

    A tool used early in the research, to attempt to identify the hidden core's architecture by executing known RISC instructions.

  • util

    An alpha-state tool to detect whether or not a processor is affected by rosenbridge.

(TODO: link to whitepaper)

(TODO: link to slides)

The details and implications presented in this work are the authors’ inferences and opinions, derived from the research described. The research is performed and provided with the goal of identifying and fixing a perceived security vulnerability on the described CPUs. VIA processors are renowned for their low power usage and excellence in embedded designs; we believe that the functionality described was created in good faith as a useful feature for the embedded market, and was unintentionally left enabled on some early generations of the processor. No malicious intent is implied.

project:rosenbridge is a research effort from Christopher Domas (@xoreaxeaxeax).

联系我们 contact @ memedata.com