Obfuscating Computer Program Code via Conditional Statement Transformation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for tamper protection of computer program code, particularly through obfuscation, fail to effectively obscure execution traces and critical decision points, making it difficult to prevent reverse engineering and software tampering.

Innovation Solution

A computer-implemented method that transforms conditional program statements into obfuscated code, merging execution paths into straight-line code and using guarded statements with arithmetic expressions to obscure execution traces, ensuring the same program output while hiding differences in execution traces, thereby making it harder to identify critical decision points.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conditional program statements are used to implement control flow, then the program functionality is clear and maintainable, but execution traces reveal critical decision points that can be analyzed by attackers

Engineering Contradiction:
Improvetamper protectionVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the control flow by introducing artificial branch points and splitting basic blocks into multiple segments. Each segment is assigned a sequence number, creating artificial divisions in the code structure that obscure the original control flow logic while maintaining functional correctness. This segmentation makes it difficult for attackers to trace the execution path and identify critical decision points.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a new dimension to the code representation by introducing sequence numbers and artificial branch targets. Instead of relying solely on the natural control flow structure, the obfuscated code operates in an expanded state space that includes these additional metadata dimensions. This makes static analysis and dynamic tracing significantly more complex while preserving the original program's functional behavior.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Loss of information

If execution traces are collected and analyzed, then critical decision points can be identified, but this enables reverse engineering and tampering

Engineering Contradiction:
Improveobfuscation effectivenessVSAvoidprogram execution efficiency
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent performs preliminary obfuscation actions by assigning sequence numbers to basic blocks and inserting artificial branch instructions before the program executes. This pre-processing transforms the control flow structure in advance, ensuring that when execution traces are collected during runtime, they reflect the obfuscated structure rather than the original logical flow. This preliminary transformation protects critical decision points from being easily identified through trace analysis.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If anti-debugger techniques are used to prevent observation, then debugging is complicated, but these techniques are specific to particular debuggers and platforms

Engineering Contradiction:
Improveplatform independenceVSAvoidexecution trace analysis difficulty
Core Design Contradiction:
Adaptability or versatilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent implements a universal obfuscation mechanism that operates independently of specific debugger implementations or platform characteristics. By transforming the control flow at the bytecode or intermediate representation level and using platform-neutral constructs like sequence numbers and artificial branches, the protection mechanism works across different platforms and debugger tools. This universal approach makes the obfuscation effective against both software-based and hardware-supported debuggers without requiring platform-specific countermeasures.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8393003B2Obfuscating computer program code
Publication Date: 2013.03.05 TELEFONAKTIEBOLAGET LM ERICSSON (PUBL)
  • US8393003B2 patent drawing
  • US8393003B2 patent drawing
  • US8393003B2 patent drawing

AI summary

A computer-implemented method of tamper-protecting computer program code. The method comprises: obtaining an input representation of the computer program code; identifying a conditional program statement for causing a data processing system to selectively execute one of at least a first and a second sets of program statements when said computer program is executed by a data processing system; replacing said identified conditional program statement and the first and second sets of program statements with a set of transformed program statements to obtain obfuscated program code, wherein the set of transformed program statements is adapted to cause the data processing system to execute at least a part of each of the transformed program statements when said computer program is executed by the data processing system.