CAPEC-696
Load Value Injection
An adversary exploits a hardware design flaw in a CPU implementation of transient instruction execution in which a faulting or assisted load instruction transiently forwards adversary-controlled data from microarchitectural buffers. By inducing a page fault or microcode assist during victim execution, an adversary can force legitimate victim execution to operate on the adversary-controlled data which is stored in the microarchitectural buffers. The adversary can then use existing code gadgets and side channel analysis to discover victim secrets that have not yet been flushed from microarchitectural state or hijack the system control flow.
Abstraction
Detailed
Typical severity
Very High
Likelihood of attack
Low
Understand the attack
What is this attack pattern?
Extended description
Execution flow
How does the attack proceed, step by step?
Explore
Survey target application and relevant OS shared code libraries
Techniques used
- Utilize Disassembler and Debugger tools to examine and trace instruction set execution of source code and shared code libraries on a system.
Experiment
Fill microarchitectural buffer with controlled value
Techniques used
- The adversary may choose the controlled value to be memory address of sensitive information that they want the system to access
- The adversary may choose the controlled value to be the memory address of other code gadgets that they wish to execute by hijacking the control flow of the system
Set up instruction to page fault or microcode assist
Techniques used
- When targeting Intel SGX enclaves, adversaries that have privileges can manipulate PTEs to provoke page-fault exceptions or microcode assists.
- When targeting Intel SGX enclaves, adversaries can indirectly revoke permissions for enclave code through the “mprotect” system call
- An adversary can evict selected virtual memory pages using legacy interfaces or by increasing physical memory utilization
- When attacking a Windows machine, wait until the OS clears the PTE accessed bit. When the page is next accessed, the CPU will always issue a microcode assist for re-setting this bit
Exploit
Operate on adversary-controlled data
Techniques used
- Influence the system to load sensitive information into microarchitectural state which can be read by the adversary using a code gadget.
- Hijack execution by jumping to second stage gadgets found in the address space. By utilizing return-oriented programming, this can chain gadgets together and allow the adversary to execute a sequence of gadgets.
Requirements
What does the attack require?
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.
- The CPU incorrectly transiently forwards values from microarchitectural buffers after faulting or assisted loads
- The adversary needs the ability to induce page faults or microcode assists on the target system.
- Code gadgets exist that allow the adversary to hijack transient execution and encode secrets into the microarchitectural state.
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.
- High: The ability to provoke faulting or assisted loads in legitimate execution.
Resources required
Not stated in the MITRE record.
Detection
What are the indicators of the attack?
Impact
What does a successful attack lead to?
Affected scopes: Confidentiality
Affected scopes: Access Control
Affected scopes: Authorization
Defence