CAPEC-665: Exploitation of Thunderbolt Protection Flaws

Detailed Stable 严重程度: Very High 攻击可能性: Low

CAPEC版本: 3.9

更新日期: 2023-01-24

攻击模式描述

执行流程

步骤 1 Explore

[Survey physical victim environment and potential Thunderbolt system targets] The adversary monitors the target's physical environment to identify systems with Thunderbolt interfaces, identify potential weaknesses in physical security in addition to periods of nonattendance by the victim over their Thunderbolt interface equipped devices, and when the devices are in locked or sleep state.

步骤 2 Explore

[Evaluate the target system and its Thunderbolt interface] The adversary determines the device's operating system, Thunderbolt interface version, and any implemented Thunderbolt protections to plan the attack.

步骤 1 Experiment

[Obtain and/or clone firmware image] The adversary physically manipulates Thunderbolt enabled devices to acquire the firmware image from the target and/or adversary Thunderbolt host controller's SPI (Serial Peripheral Interface) flash.

技术:
  • Disassemble victim and/or adversary device enclosure with basic tools to gain access to Thunderbolt controller SPI flash by connecting adversary SPI programmer.
  • Adversary connects SPI programmer to adversary-controlled Thunderbolt enabled device to obtain/clone victim thunderbolt controller firmware image through tools/scripts.
  • Clone firmware image with SPI programmer and tools/scripts on adversary-controlled device.
步骤 2 Experiment

[Parse and locate relevant firmware data structures and information based upon Thunderbolt controller model, firmware version, and other information] The acquired victim and/or adversary firmware image is parsed for specific data and other relevant identifiers required for exploitation, based upon the victim device information and firmware version.

技术:
  • Utilize pre-crafted tools/scripts to parse and locate desired firmware data and modify it.
  • Locate DROM (Device Read Only Memory) data structure section and calculate/determine appropriate offset to replicate victim device UUID.
  • Locate ACL (Access Control List) data structure and calculate/determine appropriate offsets to identify victim device UUID.
  • Locate data structure containing challenge-response key information between appropriate offsets.
步骤 3 Experiment

[Disable Thunderbolt security and prevent future Thunderbolt security modifications (if necessary)] The adversary overrides the target device's Thunderbolt Security Level to "None" (SL0) and/or enables block protections upon the SPI flash to prevent the ability for the victim to perform and/or recognize future Thunderbolt security modifications as well as update the Thunderbolt firmware.

技术:
  • The adversary-controlled Thunderbolt device, connected to SPI programmer and victim device via Thunderbolt ports, is utilized to execute commands within tools/scripts to disable SPI flash protections, modify Thunderbolt Security Level, and enable malicious SPI flash protections.
步骤 4 Experiment

[Modify/replace victim Thunderbolt firmware image] The modified victim and/or adversary thunderbolt firmware image is written to attacker SPI flash.

步骤 1 Exploit

[Connect adversary-controlled thunderbolt enabled device to victim device and verify successful execution of malicious actions] The adversary needs to determine if their exploitation of selected vulnerabilities had the intended effects upon victim device.

技术:
  • Observe victim device identify adversary device as the victim device and enables PCIe tunneling.
  • Resume victim device from sleep, connect adversary-controlled device and observe security is disabled and Thunderbolt connectivity is restored with PCIe tunneling being enabled.
  • Observe that in UEFI or Thunderbolt Management Tool/UI that the Security Level does not match adversary modified Security Level of "None" (SL0)
  • Observe after installation of Firmware update that within Thunderbolt Management UI the "NVM version" is unchanged/same prior to the prompt of successful Firmware update/installation.
步骤 2 Exploit

[Exfiltration of desired data from victim device to adversary device] Utilize PCIe tunneling to transfer desired data and information from victim device across Thunderbolt connection.

前提条件

  • The adversary needs at least a few minutes of physical access to a system with an open Thunderbolt port, version 3 or lower, and an external thunderbolt device controlled by the adversary with maliciously crafted software and firmware, via an SPI Programming device, to exploit weaknesses in security protections.

所需技能

High Detailed knowledge on various system motherboards, PCI Express Domain, SPI, and Thunderbolt Protocol in order to interface with internal system components via external devices.
High Detailed knowledge on OS/Kernel memory address space, Direct Memory Access (DMA) mapping, Input-Output Memory Management Units (IOMMUs), and vendor memory protections for data leakage.
High Detailed knowledge on scripting and SPI programming in order to configure and modify Thunderbolt controller firmware and software configurations.

所需资源

  • SPI Programming device capable of modifying/configuring or replacing the firmware of Thunderbolt device stored on SPI Flash of target Thunderbolt controller, as well as modification/spoofing of adversary-controlled Thunderbolt controller.
  • Precrafted scripts/tools capable of implementing the modification and replacement of Thunderbolt Firmware.
  • Thunderbolt-enabled computing device capable of interfacing with target Thunderbolt device and extracting/dumping data and memory contents of target device.

后果影响

影响范围: Access Control

技术影响: Bypass Protection Mechanism

影响范围: Confidentiality

技术影响: Read Data

影响范围: Integrity

技术影响: Modify Data

影响范围: Authorization

技术影响: Execute Unauthorized Commands

缓解措施

Implementation: Kernel Direct Memory Access Protection

Configuration: Enable UEFI option USB Passthrough mode - Thunderbolt 3 system port operates as USB 3.1 Type C interface

Configuration: Enable UEFI option DisplayPort mode - Thunderbolt 3 system port operates as video-only DP interface

Configuration: Enable UEFI option Mixed USB/DisplayPort mode - Thunderbolt 3 system port operates as USB 3.1 Type C interface with support for DP mode

Configuration: Set Security Level to SL3 for Thunderbolt 2 system port

Configuration: Disable PCIe tunneling to set Security Level to SL3

Configuration: Disable Boot Camp upon MacOS systems

分类映射

分类名称 条目ID 条目名称
ATTACK 1211 Exploitation for Defensive Evasion
ATTACK 1542.002 Pre-OS Boot: Component Firmware
ATTACK 1556 Modify Authentication Process
关键信息

CAPEC ID: CAPEC-665

抽象级别: Detailed

状态: Stable

典型严重程度: Very High

攻击可能性: Low

相关攻击模式