Dynamic Byte Code Obfuscation via Execution History

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software protection methods are inadequate in preventing reverse engineering and tampering, as attackers can use sophisticated tools to analyze and modify executable code, especially in open platforms where execution is observable.

Innovation Solution

The method involves encoding byte codes using the most recently executed codes, with decoding dependent on these recent codes, and employing differential encoding techniques, such as subtraction or XOR operations, to create obfuscated code that is difficult to reverse engineer, while ensuring unique execution histories and using masks or no-ops to handle branch points.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If code obfuscation is applied to protect software from reverse engineering, then security against attackers is improved, but the complexity of code execution and decoding increases

Engineering Contradiction:
ImprovesecurityVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies differential encoding where each byte code is transformed based on the previous byte code value, creating a dynamic obfuscation scheme. The encoding function f(prev, curr) and decoding function g(prev, encoded) make the obfuscation adaptive to the execution flow, increasing security while managing complexity through a systematic approach.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter representation by encoding byte codes as differences from previous values rather than absolute values. This parameter transformation makes reverse engineering more difficult while maintaining executable integrity, as the encoded values only have meaning in the context of the execution sequence.

Inventive Principle:
Principle #35Parameter changes

2Difficulty of detecting and measuring

If differential encoding is used to obfuscate byte codes, then reverse engineering difficulty increases, but the overhead of encoding and decoding operations increases

Engineering Contradiction:
Improvereverse engineering difficultyVSAvoidencoding overhead
Core Design Contradiction:
Difficulty of detecting and measuringVSLoss of time

Solution Approach 1:

The patent replaces traditional static encryption mechanisms with a dynamic differential encoding system that uses arithmetic operations (addition, subtraction, XOR) based on previous byte code values. This substitution provides obfuscation with lower computational overhead compared to full encryption schemes, as it only requires simple arithmetic operations during encoding and decoding.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If obfuscated code is executed on open platforms, then code protection is improved, but observability of execution increases attacker capability

Engineering Contradiction:
Improvecode protectionVSAvoidattacker observability
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent applies preliminary anti-action by pre-encoding the byte codes with differential values before execution. This preemptive obfuscation ensures that even when execution is observable on open platforms, the actual code logic remains hidden, as attackers would need to understand the differential encoding scheme and track previous byte code values to make sense of the executed instructions.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentEP2947590B1Program code obfuscation based upon recently executed program code
Publication Date: 2020.10.21 NXP BV
  • EP2947590B1 patent drawingFigure 1
  • EP2947590B1 patent drawing
  • EP2947590B1 patent drawing

AI summary

A method of obscuring software code including a plurality of instructions, comprising: determining, by a processor, a number N prior instructions to a current instruction; encoding the current instruction based upon a first function, a second function, and the N prior instructions, wherein the second function is based upon the N prior instructions, and wherein the first function is based upon the current instruction and an output of the second function.