Skip to content

SystematicSkid/java-jit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just In Time! Hooking Java Methods

License: MIT

Overview

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.

Demo

A demo can be found here.

Features

  • Easy detection of JIT entrypoints
  • Simple hook interface with examples
  • Force compilation of a Java methods not yet compiled

Requirements

  • A java application to hook
  • Knowledge of the class and method name/signature to hook
  • Address of CompileBroker::compile_method
  • CMake
  • C++17 compiler

Dependencies

This project uses hde64 for disassembly, which is developed by Vyacheslav Patkov.

Building

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

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published