Code Obfuscation via Stack Buffer Copying
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computer software security measures, particularly code obfuscation, face challenges in protecting against reverse-engineering attacks, especially memory tracing, which simplifies the process for attackers by allowing them to track modifications and accesses in memory buffers, leading to potential degradation in code execution performance.
Innovation Solution
An obfuscation technique that modifies source or compiled code by copying or replacing buffer contents into local variables stored on the stack memory, using indirection through memory pointers, making it difficult for attackers to track memory modifications and accesses, while maintaining performance comparable to the original code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If code morphing is used to obfuscate compiled code, then security against reverse-engineering is improved, but execution time is increased
Solution Approach 1:
The patent applies code morphing selectively only to critical portions of the program (such as security-sensitive functions and data structures) rather than the entire codebase. This partial application maintains security for critical areas while avoiding the performance penalty of obfuscating non-critical code, thus resolving the contradiction between security improvement and execution time maintenance.
2Reliability
If conventional obfuscation techniques are used, then security is improved, but code complexity is increased
Solution Approach 1:
The patent applies different obfuscation strategies to different parts of the code based on their security requirements. Critical sections receive morphing treatment while non-critical sections remain in their original form. This localized approach improves security where needed without unnecessarily complicating the entire codebase, resolving the contradiction between security and code complexity.
3Productivity
If memory tracing is not protected, then code execution performance is maintained, but security against reverse-engineering is degraded
Solution Approach 1:
The patent introduces intermediary code (morphed code) that sits between the original code and the memory tracing attack. This intermediary layer performs additional operations that obscure the actual data flows and memory accesses, making it difficult for attackers to trace memory while maintaining the functional correctness and performance of the original code through semantic equivalence.
Data Source
AI summary
Method and apparatus for obfuscating computer software code, to protect against reverse-engineering of the code. The obfuscation here is on the part of the code that accesses buffers (memory locations). Further, the obfuscation process copies or replaces parts of the buffer contents with local variables. This obfuscation is typically carried out by suitably annotating (modifying) the original source code.


