This project showcases how to easily hook Java methods by acquiring the JIT compiled code address and applying a detour.
You can find the full writeup here.
A demo can be found here.
- Easy detection of JIT entrypoints
- Simple hook interface with examples
- Force compilation of a Java methods not yet compiled
- A java application to hook
- Knowledge of the class and method name/signature to hook
- Address of
CompileBroker::compile_method
- CMake
- C++17 compiler
This project uses hde64 for disassembly, which is developed by Vyacheslav Patkov.
To build the project, please use the provided CMakeLists.txt file.
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -T host=x64 -A x64
cmake --build . --config Release
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is for educational purposes only.
I am well aware that a lot of the code is not production ready and that there are a lot of things that could be improved.