ViRb3 / jvm-dump-proxy

A proxy DLL for Windows to dump JVM classes at JNI level
79 stars 11 forks source link
classes dll dump jni jvm proxy reverse-engineering security windows

JVM Dump Proxy

A proxy DLL for Windows to dump JVM classes at JNI level.

Introduction

Some Java programs use reflection to hide their code by loading and executing classes dynamically. You can dump them from memory, but what if they are unloaded right after they execute? You could edit rt.jar and place a hook on various reflection methods. But what if the program uses the native class loading methods directly, bypassing any bytecode-level hooks?

This project aims to be a universal solution to all your dumping needs. By hooking at the lowest reliably accessible JNI level, it will dump all classes as they are being loaded.

Limitations

Usage

Download the latest release. Place version.dll in your Java bin directory, next to java.exe. You may want to use a separate Java installation so you don't affect all processes. On your desktop, create a new directory called JVMDUMP.

When you run any program with the modified Java installation, you will see a message box with the hooking result. Once you press OK, all loaded classes will be saved under the directory on your desktop.

FAQ

Technical details

proxy.h, library.def

A simple proxy DLL implementation to inject into the JVM painlessly and reliably. For more information, check the references.

hook.cpp

Installs the hooks that redirect methods to our code. Powered by mhook.

dump.h

The class dumping logic.

parser.h

A fast and simple Java class parser. It will parse the class name of each hooked byte buffer and use it to save the file under the appropriate name.

Compilation

References