Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

method for realizing a function hot patch through a HOOK technology under Windows

A technology for implementing functions and HOOK, applied in the field of communication, can solve problems such as reduced HOOK accuracy, affecting target process performance, HOOK missing, etc., to achieve the effect of reducing performance loss

Inactive Publication Date: 2019-05-17
杭州云缔盟科技有限公司
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Every time a system function is called, it is necessary to perform function replacement / function restoration; when the system function API is executed multiple times, the function replacement / function restoration will be executed repeatedly, affecting the performance of the entire target process; in addition, when the system function API is executed in When calling in multiple threads, there will be a moment when the system function API is restored, and the function call of the target process directly calls the original system function, resulting in missing hooks and reducing the accuracy of hooks

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
  • method for realizing a function hot patch through a HOOK technology under Windows
  • method for realizing a function hot patch through a HOOK technology under Windows
  • method for realizing a function hot patch through a HOOK technology under Windows

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The following clearly and completely describes the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0023] Please refer to figure 1 , the existing HOOK process includes the following steps:

[0024] S1, prepare a patch DLL (such as MyHook.dll), which contains a collection of replacement functions (such as containing the MySendto function);

[0025] S2, DLL injection: by calling the SetWindowsHookEx function, the patch DLL is injected into the target process (such as a.exe) of the Windows system, such as image 3 Load the memory map of the sendto function of w2_32.dll for the target process before HOOK (ws2_32.dll is a system net...

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 method for realizing a function hot patch under Windows through HOOK technology, which relates to the technical field of communication and comprises the following steps of: preparing two patches DLL, one patch DLL is a true patch DLL containing a replacement function, and the other patch DLL is a false patch DLL containing a jump function; Injecting the two patches DLL into the target process; Modifying a system function to enable the system function to skip to a replacement function; And executing the jump function, jumping back to the system function, and continuingexecution of the system function API. According to the invention, unnecessary performance loss is reduced, and the HOOK accuracy is improved.

Description

technical field [0001] The invention relates to the technical field of communication, in particular to a method for realizing function hot patching through HOOK technology under Windows. Background technique [0002] The HOOK mechanism, also known as the hook mechanism, is a platform for the Windows message processing mechanism. The application program can set a subroutine (callback function) on it to monitor certain messages of the specified window, and the monitored window can be created by other processes. Created. When the message arrives, process it before the target window handler. The hook mechanism allows applications to intercept and process window messages or specific events. [0003] After the prior art, in the case of HOOK Windows system API functions, after taking over the system API functions and completing the corresponding processing, it is necessary to call the original system API functions again. At this time, it is necessary to perform an anti-HOOK proce...

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 Applications(China)
IPC IPC(8): G06F9/445
Inventor 李宗宇赵飞郑晓峰
Owner 杭州云缔盟科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products