LLM Code Obfuscation via Dynamic De-obfuscation Feedback
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing automated code generation methods using voice models, such as Large Language Models (LLMs), face challenges in ensuring the correctness and obfuscation of generated code, particularly when dealing with larger code bases, which can be time-consuming and inefficient.
Innovation Solution
A procedure that uses a voice model to obfuscate program code, generates an executable file, dynamically de-obfuscates it, and stores metrics for feedback, allowing for iterative improvement of the obfuscation process, while also training the voice model using these metrics to enhance code obfuscation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If code obfuscation is performed manually or using traditional methods on large codebases, then obfuscation quality may be maintained, but the process becomes time-consuming and inefficient
Solution Approach 1:
The patent replaces traditional mechanical/manual code obfuscation methods with an AI-based language model system. The language model automatically analyzes and obfuscates code without human intervention, transforming the manual process into an automated intelligent system that operates at machine speed while maintaining or improving obfuscation quality.
Solution Approach 2:
The obfuscation system performs self-service through autonomous operation. The language model independently analyzes code structures, identifies obfuscation opportunities, applies transformation rules, and generates obfuscated code without requiring continuous human guidance or manual processing, enabling the system to handle large codebases efficiently.
2Productivity
If automated code generation is used to improve productivity, then code generation speed increases, but correctness and obfuscation quality become uncertain
Solution Approach 1:
The patent implements a feedback mechanism where the generated code is dynamically unobfuscated and analyzed to verify correctness. The system measures obfuscation metrics and code quality, then feeds this information back to the language model for iterative improvement, ensuring that productivity gains do not compromise code correctness or obfuscation quality.
Solution Approach 2:
The system performs preliminary validation by dynamically unobfuscating generated code before final deployment. This preliminary check verifies that the obfuscated code maintains functional correctness and meets quality standards, preventing incorrect code from being deployed and ensuring reliability alongside high productivity.
3Measurement precision
If dynamic unobfuscation is performed to verify code quality, then code correctness can be measured, but the process adds time and computational overhead
Solution Approach 1:
The patent applies partial unobfuscation rather than complete unobfuscation for verification. The system dynamically unobfuscates only the necessary portions of code required to verify correctness and measure obfuscation metrics, avoiding the time cost of fully unobfuscating the entire codebase while still achieving accurate quality measurement.
Data Source
Figure 1~2
Figure 3
Figure 4~5
AI summary
A method (10) for obfuscating program code (23) using a language model (22) comprises the steps: - obfuscating (11) a program code (23) using a language model (22), - generating (12) an executable file (43) from the obfuscated program code (23), - dynamically de-obfuscating (13) the executable file (43) until the de-obfuscating (13) is complete or does not produce any new results, - saving (14) metrics of the dynamic de-obfuscating (13), - feeding (15) metrics of the dynamic de-obfuscating (13) and optionally the generated program code (23) back to the language model (22) for a further iteration of obfuscating (11).