TDXdown

TDXdown: Single-Stepping and Instruction Counting Attacks against Intel TDX

Speaker: Chenyu Zhou

English

TDXdown: Single-Stepping and Instruction Counting Attacks against Intel TDX

Speaker: Chenyu Zhou

Intel Trust Domain Extensions (TDX)

The vulnerabilities of single-stepping detection, a key defense mechanism of TDX, and the instruction counting attack based on it.

How Single-Stepping Works

  1. Utilizing External Interrupts:

    • An attacker manipulates hardware timers (e.g., APIC timer) to trigger an interrupt at a specific point during program execution.
    • When the interrupt occurs, the CPU halts the current execution and hands control over to the operating system (or hypervisor).
  2. Executing Instructions One at a Time:

    • After the interrupt, the program resumes execution, but only one instruction at a time.
    • By repeating this process, the attacker can observe the execution flow at an instruction level.
  3. Using Side Channels:

    • The attacker analyzes memory access patterns, cache usage, power consumption, and other indicators that occur when a specific instruction is executed to extract sensitive data.

Attack Techniques


What is a Trusted Domain (TD)?

A Trusted Domain (TD) is an isolated execution environment created using Intel TDX to provide enhanced security by protecting the confidentiality and integrity of code and data from untrusted entities, including the hypervisor.

What is SEAM Mode (Secure Arbitration Mode)?

SEAM Mode is a dedicated CPU mode required to run the TDX module and Trusted Domains (TDs).

SEAM Mode operates with higher privileges than traditional CPU modes (e.g., user mode, kernel mode), providing a security layer isolated from potential attackers such as hypervisors or operating systems.


StumbleStepping Attack

Why Does This Work?


Remaining Questions

(Questions for further discussion)

Intel Trust Domain Extensions (TDX)
TDX의 주요 방어 기법인 싱글 스테핑(single-stepping) 탐지와 이에 기반한 지시어 카운팅 공격(instruction counting attack) 의 취약점

싱글 스테핑의 작동 방식

  1. 외부 인터럽트 활용:
    • 공격자는 하드웨어 타이머(예: APIC 타이머)를 조작하여 프로그램 실행 중 특정 지점에서 인터럽트를 발생시킵니다.
    • 인터럽트가 발생하면 CPU는 현재 실행 중인 작업을 멈추고 운영체제(혹은 하이퍼바이저)로 제어를 넘깁니다.
  2. 명령어 단위 실행:
    • 인터럽트가 발생한 후 다시 프로그램 실행을 재개하되, 한 번에 한 명령어만 실행하도록 제어합니다.
    • 이를 반복하면, 공격자는 프로그램의 실행 흐름을 명령어 단위로 관찰할 수 있습니다.
  3. 부채널 활용:
    • 특정 명령어가 실행될 때 발생하는 메모리 접근 패턴, 캐시 사용, 전력 소비 등의 정보를 분석하여 민감한 데이터를 유출합니다.

What is TD(Trusted Domain)?

What is SEAM Mode? (Secure Arbitration Mode)

StumbleStepping 공격:

-> why???

-> 난수(nonce)를 알아낼 수 있다.

Remaining Questions