Software Constant Obfuscation via Runtime Indexed Array Lookup
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing anti-tampering techniques in software protection can be reverse-engineered by attackers, who identify and manipulate constant values used in integrity checks, allowing them to bypass security measures.
Innovation Solution
A method that obfuscates constant values by replacing them with a replacement variable and using an indexed array to compute and retrieve the value at runtime, making it difficult for attackers to determine the original constant value through static analysis by employing multiple transformation functions and invalid memory addresses.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If constant values are used directly in software code for integrity checks, then the software can perform security verification, but attackers can easily identify and manipulate these constant values through reverse engineering
Solution Approach 1:
The patent introduces an intermediary mechanism (indexed array with runtime computation) between the original constant value and its usage in the code. Instead of directly storing and using constant values, the system stores them in an indexed array and computes indices at runtime using transformation functions, making it difficult for attackers to directly identify and manipulate the constant values
Solution Approach 2:
The patent transforms the representation and access parameters of constant values. Rather than using direct constant references, the system changes to using indexed array access with dynamically computed indices derived from transformation functions, thereby changing how constant values are detected and accessed in the code
2Reliability
If anti-tampering techniques are implemented using constant values, then software protection is provided, but the protection can be reversed-engineered and broken by attackers
Solution Approach 1:
The patent segments the constant value storage and access mechanism into multiple components: an indexed array for storage, transformation functions for index computation, and runtime lookup logic. This segmentation distributes the protection mechanism across different parts of the code, making reverse engineering more difficult while maintaining protection functionality
3Difficulty of detecting and measuring
If constant values are obfuscated by replacement variables and indexed arrays, then attackers cannot easily identify the values through static analysis, but the code becomes more complex
Solution Approach 1:
The patent performs preliminary actions by pre-defining the indexed array structure and transformation functions during code compilation or preparation. This allows the obfuscation mechanism to be established in advance, making static analysis ineffective while the runtime complexity is managed through pre-computed structures
Data Source
Figure 1~3
Figure 4~5
Figure 6
AI summary
The present invention relates to method of securing a software code comprising at least one constant value, said method generating a secure software code and comprising the steps of: − determining (S1) by a processor in the software code a constant value to be protected, − inserting (S2) by the processor in the software code an indexed array of values such that the constant value to be protected can be determined from one value of the array, − replacing (S3) by the processor in the software code the constant value to be protected by a replacement variable, − inserting (S4) by the processor in the software code a first sequence of instructions which, when executed at runtime: • computes the index in the array of the value from which the constant value to be protected can be determined, • extracts from said array the value located at said computed index in said array, • from said extracted value, determines the constant value to be protected, • sets the value of said replacement variable equal to the determined constant value.