Runtime Code Relocation for Sensitive Data Protection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Software applications are vulnerable to reverse engineering and tampering attacks, particularly when sensitive data is accessed and stored at specific memory locations, allowing attackers to extract or modify such data.
Innovation Solution
A method involving the partitioning of software programs into code and data blocks, which are dynamically relocated at runtime to new memory locations, updating associated indices to maintain accessibility while obscuring the current location, thereby preventing attackers from determining the exact memory locations of sensitive data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If code blocks are moved to new memory locations at runtime, then security against reverse engineering is improved, but device complexity increases due to the need for dynamic relocation mechanisms and index management
Solution Approach 1:
The patent applies dynamics by making code blocks movable in memory during runtime. Code blocks are relocated from initial static locations to new dynamic locations, and this relocation continues during execution. The system maintains code index registers that track current positions, enabling the program to adapt its memory layout dynamically, which prevents attackers from predicting sensitive data locations.
Solution Approach 2:
The patent segments the program into multiple code blocks that can be independently relocated in memory. Each code block is managed separately with its own index registration, allowing fine-grained control over which portions of code are moved and when. This segmentation enables selective protection of sensitive code segments without requiring movement of the entire program.
2Reliability
If code blocks are frequently relocated at runtime, then extraction of sensitive data by attackers is prevented, but processing time increases due to continuous memory operations and index updates
Solution Approach 1:
The patent implements periodic action by relocating code blocks at specific intervals or at designated points during runtime rather than continuously. Code blocks are moved between execution phases, and the system periodically updates code index registers to reflect new positions. This periodic relocation provides security while avoiding the overhead of constant memory operations.
3Difficulty of detecting and measuring
If code blocks are moved to obscure sensitive data locations, then reverse engineering becomes more difficult, but accessibility and execution efficiency may be reduced due to indirect memory access requirements
Solution Approach 1:
The patent introduces code index registers as intermediary structures that mediate between the program's execution logic and the actual memory locations of code blocks. These index registers store current position information and enable indirect access to relocated code blocks. The intermediary layer obscures actual memory positions from attackers while maintaining efficient access for the executing program, as the processor can quickly resolve indirect addresses through the index registers.
Data Source
Figure 1
Figure 2
Figure 3a~3d
AI summary
The disclosed method is concerned with a computer implemented method generating code for protecting sensitive data used by the program, by partitioning the program into a plurality of blocks of code, such that each code block in the program is registered using a code index in a code register created for the program. The code index for a given code block reflects current properties including the current location of the code block, at any given time. During execution of the program at runtime by the computing device, each code block of the program is moved from a first code location in a memory to a respective second code location in the memory, such that the code block is accessible from the second code location in the memory henceforth. The code index for the moved code block is updated to indicate updated current properties, such as the new location of the code block, i.e. the second code location, after moving the code block. In addition to moving the code to the second code location that is different to the first code location; one or more references stored in the memory and that are required for the execution of the code block, i.e. which are accessed by the code block and/or are required to access the code block, are also associated with the moved code block. To enable the association, the one or more references for the code block are registered in a reference register, such that a reference index reflecting current properties for each of the one or more references is adjusted based on updated current properties of the code index of the moved code block.