TEE Call Emulation for Secure Device Testing and Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The challenge of effectively testing and analyzing the Trusted Execution Environment (TEE) of a Device Under Test (DUT) is hindered by hardware isolation, closed-source nature, lack of debug capabilities, and limited dynamic analysis options, making it difficult to assess security and identify vulnerabilities.
Innovation Solution
Emulating the TEE using a software emulator to intercept calls from the Rich Execution Environment (REE) and process them in an emulated TEE, allowing for dynamic analysis and response transmission, enabling inspection and modification of the emulated code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If hardware isolation is implemented for TEE, then security and confidentiality are improved, but testing and analysis capability deteriorates
Solution Approach 1:
A hardware bridge is introduced as an intermediary component between the TEE and external testing apparatus. This bridge includes a test interface that can be selectively activated to allow external access to the TEE for testing purposes, while maintaining isolation during normal operation. The bridge acts as a controlled gateway that enables testing without compromising the security model.
Solution Approach 2:
The TEE's isolation state is made dynamic rather than static. The test interface of the hardware bridge can be activated or deactivated based on operational mode - disabled during normal secure operation to maintain isolation, and enabled during testing phases to allow analysis. This dynamic switching resolves the contradiction between maintaining constant isolation and enabling testing.
2Reliability
If closed-source TEE is used, then security is improved, but dynamic analysis capability deteriorates
Solution Approach 1:
The hardware bridge with its test interface serves as a mediator that enables dynamic analysis of closed-source TEE code. By providing a controlled interface through which test data can be input and responses observed, the bridge allows dynamic behavior analysis without requiring source code access or modifying the TEE's closed-source nature.
Solution Approach 2:
Instead of attempting to analyze the original closed-source TEE directly, the system creates a copy or replica of the TEE environment through the hardware bridge interface. This allows testing and dynamic analysis on the replicated interface while the original TEE remains intact and secure, enabling analysis without compromising the closed-source constraint.
3Reliability
If hardware isolation is implemented, then confidentiality is improved, but debug capability deteriorates
Solution Approach 1:
The hardware bridge acts as a debugging intermediary that provides debug capabilities without breaking confidentiality. The test interface allows debugging operations such as setting breakpoints, inspecting state, and controlling execution flow while maintaining the confidential nature of the TEE through the isolated hardware path.
Solution Approach 2:
Traditional software-based debugging mechanisms that would require breaking isolation are replaced with a dedicated hardware debugging interface. This hardware-based approach substitutes the need for software modifications or isolation breaches, providing debug capability through a physical interface that respects the confidentiality boundaries.
4Reliability
If TEE code is encrypted or obfuscated, then security is improved, but static analysis capability deteriorates
Solution Approach 1:
The hardware bridge with its test interface serves as an intermediary that enables static analysis of encrypted or obfuscated TEE code. By allowing controlled input of test cases and observation of outputs through the bridge, analysts can perform static analysis on the interface behavior and infer properties about the obscured internal code without needing to decrypt or deobfuscate it.
Data Source
AI summary
A method for testing a Device Under Test (DUT) is provided. The method includes emulating a Trusted Execution Environment (TEE) of the DUT by means of a software emulator in order to provide an emulated TEE. The method further comprises intercepting at the DUT a call from a Rich Execution Environment (REE) of the DUT into the TEE of the DUT. In addition, the method includes transmitting the call to the emulated TEE such that the call is processed by the emulated TEE. The method includes transmitting a response of the emulated TEE to the REE. The response is based on the call.

