Dynamic Heap Memory Obfuscation via Encoder Routines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Sensitive data stored in runtime heap allocations is vulnerable to unwanted access by reverse engineers due to lack of effective access control, as existing protection methods can interfere with program efficiency and speed.

Innovation Solution

Implementing a memory management system with encoders to obfuscate heap memory allocations, creating a dynamic and non-linear memory layout that abstracts memory access, encrypts data, and adjusts security levels to protect against data flow analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If data obfuscation is used to protect heap memory from reverse engineering, then security against data flow analysis is improved, but program execution speed and resource consumption deteriorate

Engineering Contradiction:
ImprovesecurityVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-computing and storing encoder mappings in lookup tables during program compilation or initialization. The encoder routines pre-process memory address transformations and store the results, so that during runtime, obfuscation operations can be performed efficiently by simply table-lookup pre-computed values rather than performing complex transformations on-the-fly, thus maintaining security while minimizing runtime overhead

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating multiple encoder routines that implement the same obfuscation logic but with different encoding parameters or sequences. These duplicate encoder implementations can be selectively applied to different memory regions or executed in parallel, distributing the obfuscation workload and improving overall execution efficiency while maintaining the security benefits of data obfuscation

Inventive Principle:
Principle #26Copying

2Productivity

If traditional memory allocation is used, then program execution efficiency is maintained, but heap memory becomes vulnerable to reverse engineering

Engineering Contradiction:
Improveexecution efficiencyVSAvoidvulnerability to reverse engineering
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent introduces an intermediary layer consisting of encoder routines that sit between the program's memory access operations and the actual heap memory. These encoder routines act as mediators that translate standard memory access requests into obfuscated address accesses, allowing the program to maintain its normal efficient execution patterns while the intermediary performs the security function of obscuring the actual memory layout from reverse engineers

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent applies segmentation by dividing the heap memory into multiple segments, each protected by a different encoder routine with unique encoding parameters. This segmentation allows different portions of memory to be protected with optimized encoding strategies tailored to their specific access patterns, maintaining execution efficiency for frequently accessed data while providing robust protection for sensitive regions

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9268677B2Dynamic obfuscation of heap memory allocations
Publication Date: 2016.02.23 APPLE INC
  • US9268677B2 patent drawing
  • US9268677B2 patent drawing
  • US9268677B2 patent drawing

AI summary

Techniques, methods, systems, and computer-readable media for allocating and managing dynamically obfuscated heap memory allocations are described. In one embodiment a memory manager in a data processing system contains an addressor, to determine a first address of a program object in a first memory address space, and one or more encoders, to abstract memory access to the program object using the first address such that layout of the object data in the first address space differs from the layout of the object in a second address space. In one embodiment, a runtime system modifies object code of an executable file to include encoder routines to abstract memory accesses to data in an obfuscated heap. In one embodiment, a compiler system using an intermediate representation of a high level program generates an intermediate representation of a high level program capable of performing memory writes and memory reads using obfuscation encoder routines.