Android Hook notes

One, Hook type

Hook can be divided into inlineHook, gotHook, etc.

Second, detailed explanation

2.1 inlineHook

Representative: Frida's Hook on the C layer

Principle: Modify the instruction of the method, change the first instruction to: jump xxx

2.2 gotHook

Representative: iQiyi's open source XHook

Principle: After the so library is loaded, a table will be generated, such as libc.so. After the loading is completed, the generated table is the correspondence between method name and method address. The Hook principle is to modify the correspondence table to correspond to the Hook method. Changed your address to your own address.

2.3 Native化Hook

Representative: Xposed, Frida's Hook in the Java layer

Principle: Modify the Method structure of a Java method, change its method attribute parameter from Java to Native, and modify its method address parameter at the same time.

 

Guess you like

Origin blog.csdn.net/wishxiaozhu/article/details/108473223