A method, device and storage medium for hooking dynamic link library functions

A technology of dynamic link library and function, which is applied in the direction of program control device, electronic digital data processing, program loading/starting, etc. It can solve the problem that the internal function of the function cannot be hooked, and achieve the effect of ensuring normal operation and realizing hooking

Active Publication Date: 2020-04-14
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the prior art, the external function can be hooked (hijacked) through the GOT (global offset table) of the so function, and the hook operation can be completed by modifying the address of the external function, but this method cannot be hooked to the internal function of the function

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method, device and storage medium for hooking dynamic link library functions
  • A method, device and storage medium for hooking dynamic link library functions
  • A method, device and storage medium for hooking dynamic link library functions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] In order to realize the hooking of any dynamic link library function in the native layer, the embodiment of the present invention provides a method, device and storage medium for hooking the dynamic link library function.

[0026] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention, and in the absence of conflict, the present invention The embodiments and the features in the embodiments can be combined with each other.

[0027] First, some terms involved in the embodiments of the present invention are described to facilitate the understanding of those skilled in the art.

[0028] The hook (hook) of a function means that when the target process executes a certain function (when the function of the hook is needed, the fun...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a dynamic link library function hooking method, device and storage medium. The method is used for hooking any dynamic link library function of a native layer. The dynamic linklibrary function hooking method includes the steps that when it is detected that a system calls a target function, according to a segment base address stored in a memory by the target function and address offset information of the target function in an executable and connectable format file, a jump address is determined, wherein the address offset information is determined according to a storage address of a custom function and the segment base address; the custom function is executed according to the jump address to obtain an execution result of the custom function; the target function is called in the custom function, and the execution result of the target function is returned.

Description

technical field [0001] The invention relates to the technical field of computer program development, in particular to a dynamic link library function hooking method, device and storage medium. Background technique [0002] This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] Android is a Linux-based free and open-source operating system primarily used on mobile devices such as smartphones and tablets. The Android system architecture adopts a layered architecture, which is divided into four layers. From high to low, they are the Android application layer, the Android application framework layer, the Android system operating layer (native layer) and the Linux kernel layer. The Android platform packages the native layer code into a so (dynamic link library) format for external or internal use. [0004] In ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445G06F8/30
CPCG06F8/30G06F9/44521
Inventor 房伟
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products