subhook icon indicating copy to clipboard operation
subhook copied to clipboard

Method installation failed ?

Open ereza10 opened this issue 7 years ago • 0 comments

Hi, First, great project ! Thank u for doing it ! I've tried to use subhook in order to replace Oracle Java 10 libjvm.so methods. While everything worked for me for Java 8, certain hook failed for Java 10. I have tried to install a hook instead of the DumperWriter::write_internal() method but my method (the replacing one) is never being called although I know it supposed to.

I have printed the content of the relevant addresses in order to try to provide the info.

The following is the output of the implementation of the method without any hooking:

Found symbol address for symbol _ZN10DumpWriter14write_internalEPvm Symbol address 0x7f83cc903970 0x7f83cc903970 : 0x56415741e5894855 0x7f83cc903978 : 0xec83485354415541 0x7f83cc903980 : 0xc87d8948278b4418 0x7f83cc903988 : 0x8f880fe48545 0x7f83cc903990 : 0x49f38948d2854800

The following is the output of my program after installing the hook:

// Look for the hook and print its content (first 5 8 bytes): Found symbol address for symbol _ZN10DumpWriter14write_internalEPvm Symbol address 0x7f68c7c67970 // same one 0x7f68c7c67970 : 0x564157018bfd2be9 0x7f68c7c67978 : 0xec83485354415541 0x7f68c7c67980 : 0xc87d8948278b4418 0x7f68c7c67988 : 0x8f880fe48545 0x7f68c7c67990 : 0x49f38948d2854800

When I'm getting the hook for this method I'm getting the following:

hookGetSrc() 0x7f68c7c67970 // expected hook GetDst() 0x7f68c95276a0 hook GetTrampoline() 0x7f68c0026730 // expected ?

I'm using subhook version 0.4.2. Was there such a known issue in this version ? Thanks in advance !

ereza10 avatar Oct 04 '18 17:10 ereza10