CAPECattack pattern

CAPEC-663 Exploitation of Transient Instruction Execution

Very High Official page ↗
Abstraction
Standard
Status
Stable
Likelihood of attack
Low
Typical severity
Very High
CAPEC version
3.9

Description

An adversary exploits a hardware design flaw in a CPU implementation of transient instruction execution to expose sensitive data and bypass/subvert access control over restricted resources. Typically, the adversary conducts a covert channel attack to target non-discarded microarchitectural changes caused by transient executions such as speculative execution, branch prediction, instruction pipelining, and/or out-of-order execution. The transient execution results in a series of instructions (gadgets) which construct covert channel and access/transfer the secret data.

Execution flow

1. [Explore] [Survey target application and relevant OS shared code libraries] Adversary identifies vulnerable transient instruction sets and the code/function calls to trigger them as well as instruction sets or code fragments (gadgets) to perform attack. 2. [Explore] [Explore cache and identify impacts] Utilize tools to understand the impact of transient instruction execution upon address spaces and CPU operations. 1. [Experiment] [Cause conditions for identified transient instruction set execution] Adversary ensures that specific code/instructions of the target process are executed by CPU, so desired transient instructions are executed. 2. [Experiment] [Cause specific secret data to be cached from restricted address space] Executed instruction sets (gadgets) in target address space, initially executed via adversary-chosen transient instructions sets, establish covert channel and transfer secret data across this channel to cache. 1. [Exploit] [Perform covert channel attack to obtain/access secret data] Adversary process code removes instructions/data from shared cache set, waits for target process to reinsert them back into cache, to identify location of secret data via a timing method. Adversary continuously repeat this process to identify and access entirety of targeted secret data.

Prerequisites

• The adversary needs at least user execution access to a system and a maliciously crafted program/application/process with unprivileged code to misuse transient instruction set execution of the CPU.

Skills required

• [High] Detailed knowledge on how various CPU architectures and microcode perform transient execution for various low-level assembly language code instructions/operations. • [High] Detailed knowledge on compiled binaries and operating system shared libraries of instruction sequences, and layout of application and OS/Kernel address spaces for data leakage.

Consequences

• Confidentiality: Read Data • Access Control: Bypass Protection Mechanism • Authorization: Execute Unauthorized Commands

Mitigations

• Implementation: DAWG (Dynamically Allocated Way Guard) - processor cache properly divided between different programs/processes that don't share resources • Implementation: KPTI (Kernel Page-Table Isolation) to completely separate user-space and kernel space page tables • Configuration: Architectural Design of Microcode to limit abuse of speculative execution and out-of-order execution • Configuration: Disable SharedArrayBuffer for Web Browsers • Configuration: Disable Copy-on-Write between Cloud VMs • Configuration: Privilege Checks on Cache Flush Instructions • Implementation: Non-inclusive Cache Memories to prevent Flush+Reload Attacks

Related

Can precede · CAPEC (1)

Child of · CAPEC (2)

  • CAPEC-184 Software Integrity Attack attack pattern
  • CAPEC-74 Manipulating State attack pattern

Peer of · CAPEC (3)

  • CAPEC-124 Shared Resource Manipulation attack pattern
  • CAPEC-180 Exploiting Incorrectly Configured Access Control Security Levels attack pattern
  • CAPEC-212 Functionality Misuse attack pattern

Weakness · CWE (3)

  • CWE-1037 Processor Optimization Removal or Modification of Security-critical Code weakness
  • CWE-1264 Hardware Logic with Insecure De-Synchronization between Control and Data Channels weakness
  • CWE-1303 Non-Transparent Sharing of Microarchitectural Resources weakness

Referenced by CAPEC · child of (1)

  • CAPEC-696 Load Value Injection attack pattern

Referenced by CWE · attack pattern (3)

  • CWE-1037 Processor Optimization Removal or Modification of Security-critical Code weakness
  • CWE-1264 Hardware Logic with Insecure De-Synchronization between Control and Data Channels weakness
  • CWE-1303 Non-Transparent Sharing of Microarchitectural Resources weakness