Dynamic Address Resolution for Private Function Hooking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional hooking methods struggle to determine the start addresses of internal or private functions in byte code, as these addresses are not easily identifiable and often required at compile time, limiting the ability to hook to such functions.

Innovation Solution

A method that dynamically searches for the address of internal functions by using predefined data points, such as signatures, within the instruction data of known exported functions, allowing for run-time identification and hooking without requiring the address at compile time, even if the data files change.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional hooking methods use export tables to identify function addresses, then publicly exported functions can be easily hooked, but internal functions cannot be identified or hooked

Engineering Contradiction:
Improveease of hookingVSAvoidability to hook internal functions
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The system dynamically determines function addresses at runtime rather than using static compile-time addresses. It employs runtime function resolution mechanisms that scan and identify both public and internal function addresses during program execution, enabling flexible hooking of internal functions without requiring knowledge of their addresses at compile time.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The invention introduces intermediary mechanisms such as runtime function resolution libraries or agents that act as mediators between the hooking system and the target internal functions. These intermediaries provide the necessary address information and facilitate the hooking process for internal functions that are not accessible through conventional export tables.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If hooking programs require internal function addresses at compile time, then addressing can be determined statically, but the program cannot adapt to data file changes

Engineering Contradiction:
Improveaddress determination reliabilityVSAvoidadaptability to data file changes
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system transitions from static address determination to dynamic runtime address resolution. It implements mechanisms that can adapt to changes in data files by重新扫描和识别函数地址,ensuring that hooking remains effective even when the underlying binary structure changes due to patches or updates.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The invention changes the parameter of function address from a fixed compile-time constant to a flexible runtime-determined value. This allows the system to adapt to different versions and configurations of data files by resolving addresses dynamically based on the actual state of the binary at runtime.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If internal function addresses are not in export tables, then internal functions remain private and protected, but conventional methods cannot locate or hook them

Engineering Contradiction:
Improveprivacy protection of internal functionsVSAvoiddifficulty of locating internal functions
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The system employs intermediary techniques such as runtime agents or resolution libraries that can access and identify internal function addresses without compromising their privacy protection. These intermediaries provide a controlled interface for discovering internal function locations while maintaining the integrity and security of the private functions.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The invention replaces conventional static analysis methods with dynamic runtime analysis mechanisms. Instead of using traditional mechanical approaches that rely on predefined symbols and tables, it employs runtime scanning, pattern recognition, and dynamic binary analysis to locate internal functions, making the process more sophisticated and adaptable.

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

Data Source

PatentUS9141613B2Systems and methods for determining an address for a private function
Publication Date: 2015.09.22 IVANTI US LLC
  • US9141613B2 patent drawing
  • US9141613B2 patent drawing
  • US9141613B2 patent drawing

AI summary

Systems and methods are provided for determining an address for a private function. A start address for a public function of a software program in a data file associated with the software program is determined. Instruction data for the public function is identified in the data file based on the start address of the public function. First data of a predetermined size is read from a beginning of the instruction data for the public function. A signature for a private function of the software program is identified in the first data. A relative address for the private function in the data file based on the identified signature is stored in memory.