Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Code Injection Example

Injects custom code into a running java process.

thumbnail

Commands

# compile everything
javac sample/*.java

# build agent.jar
jar -cvmf MANIFEST.MF agent.jar sample/*.class

# run target process in another terminal (prints the PID)
java sample/Target

# run injector
java sample/Injector <PID> [agent0|agent1|agent2] <path to agent.jar>

Agents

  • agent0: Prints something into the target process.
  • agent1: Calls a private function from the target process.
  • agent2: Executes custom code from a Minecraft process.

Devcontainer

I hate managing multiple java versions, so I added a .devcontainer config in case you want to use the same environment as me.

(Note: If you run the injector from the container, it wont get access to the Minecraft PID)

https://code.visualstudio.com/docs/devcontainers/containers

Sources

About

Injects custom code into a running java process.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors