├── .gitignore
├── .idea
├── .gitignore
├── discord.xml
├── encodings.xml
├── misc.xml
└── uiDesigner.xml
├── README.md
├── cpp src
├── Natives
│ ├── DLLInjector.cpp
│ └── MemoryEditor.cpp
└── Process Injector
│ ├── Injector.cpp
│ └── Process Injector.cpp
├── pom.xml
└── src
└── main
├── java
└── uk
│ └── whitedev
│ ├── InjectClassLoader.java
│ ├── InjectableMain.java
│ ├── JavaSourceFromString.java
│ ├── classes
│ └── ClassCheckerGui.java
│ ├── injector
│ ├── DLLInjector.java
│ └── InjectorGui.java
│ ├── memory
│ ├── MemoryEditor.java
│ ├── MemoryEditorGUI.java
│ ├── MemoryLocation.java
│ └── WindowInfo.java
│ ├── monitor
│ └── ProcessProfilerGui.java
│ └── utils
│ ├── ClassUtil.java
│ ├── ColorUtils.java
│ ├── FieldUtil.java
│ ├── MonitorUtil.java
│ ├── NativeLoader.java
│ └── ProcessUtil.java
└── resources
├── assets
└── cfr-0.152.jar
└── natives
├── DLLInjector.dll
└── MemoryEditor.dll
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 | !**/src/main/**/target/
4 | !**/src/test/**/target/
5 |
6 | ### IntelliJ IDEA ###
7 | .idea/modules.xml
8 | .idea/jarRepositories.xml
9 | .idea/compiler.xml
10 | .idea/libraries/
11 | *.iws
12 | *.iml
13 | *.ipr
14 |
15 | ### Eclipse ###
16 | .apt_generated
17 | .classpath
18 | .factorypath
19 | .project
20 | .settings
21 | .springBeans
22 | .sts4-cache
23 |
24 | ### NetBeans ###
25 | /nbproject/private/
26 | /nbbuild/
27 | /dist/
28 | /nbdist/
29 | /.nb-gradle/
30 | build/
31 | !**/src/main/**/build/
32 | !**/src/test/**/build/
33 |
34 | ### VS Code ###
35 | .vscode/
36 |
37 | ### Mac OS ###
38 | .DS_Store
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/discord.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/uiDesigner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
7 |
8 | -
9 |
10 |
11 | -
12 |
13 |
14 | -
15 |
16 |
17 | -
18 |
19 |
20 |
21 |
22 |
23 | -
24 |
25 |
26 |
27 |
28 |
29 | -
30 |
31 |
32 |
33 |
34 |
35 | -
36 |
37 |
38 |
39 |
40 |
41 | -
42 |
43 |
44 |
45 |
46 | -
47 |
48 |
49 |
50 |
51 | -
52 |
53 |
54 |
55 |
56 | -
57 |
58 |
59 |
60 |
61 | -
62 |
63 |
64 |
65 |
66 | -
67 |
68 |
69 |
70 |
71 | -
72 |
73 |
74 | -
75 |
76 |
77 |
78 |
79 | -
80 |
81 |
82 |
83 |
84 | -
85 |
86 |
87 |
88 |
89 | -
90 |
91 |
92 |
93 |
94 | -
95 |
96 |
97 |
98 |
99 | -
100 |
101 |
102 | -
103 |
104 |
105 | -
106 |
107 |
108 | -
109 |
110 |
111 | -
112 |
113 |
114 |
115 |
116 | -
117 |
118 |
119 | -
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Java Process Inspector [JPI] 🖥️
2 |
3 | This is a sophisticated tool designed for dynamically browsing, analyzing, and modifying a running Java process ⚡
4 |
5 | ## Basic information
6 |
7 | It allows users to interact with the Java application's live state, inspect its code, and make changes in real-time, offering a powerful solution for everyone, who need deep insights and control over Java applications during execution.
8 |
9 | The program has a basic GUI that is easy to use and does not take up much memory.
10 |
11 | ## Functions
12 |
13 | #### 🔧 Dynamic Executor for Java Code:
14 | This feature allows you to force the program, to which JPI is attached, to execute specific lines of code written in the built-in code editor provided with JPI. It offers full access to use any classes and methods, enabling real-time manipulation and testing of the application’s behavior.
15 |
16 | #### ✏️ Memory Editor:
17 | The Memory Editor is a powerful tool that enables you to search for specific values within the process's memory and dynamically modify them while the process is running. This function provides direct access to the internal state of the application, allowing precise and immediate adjustments.
18 |
19 | #### 🔌 DLL Injector:
20 | A straightforward tool designed to inject DLL files into the process. This function simplifies the process of adding external libraries, enabling extended functionality or modifications to the running application.
21 |
22 | #### 🔍 Loaded Class Checker:
23 | This feature allows you to inspect all the classes loaded by the process, decompile them, and view their source code. Additionally, it provides the capability to dump all loaded classes to a specified folder.
24 |
25 | #### 💻 Process Profiler:
26 | Real-time Java process monitoring and profiling solution. Displays performance metrics, resource utilization, process details and enables field inspection, providing a comprehensive overview of the running process.
27 |
28 | ## How to inject JPI
29 | - To attach JPI to a java process, run Process Injector.exe
30 | - Find the pid of the process you are interested in (java/javaw)
31 | - Enter the pid of the process you want to attach JPI to (confirm with enter)
32 | - Enter the full path to the dll file "injector.dll" (confirm with enter) `Example: C:\\Users\\whitedev\\Files\\injector.dll`
33 |
34 | ## Disclaimer
35 | Remember that modifying memory, dynamically injecting new classes and various modifications in the running java process are quite dangerous and can cause various errors with your application, use this with caution.
36 |
37 | ## Project Suppot
38 | If you need help, join to our community:
39 | - Discord Server: https://discord.gg/KhExwvqZb5
40 | - WebSite: https://devsmarket.eu/
41 |
42 | ## Authors
43 |
44 | - [@0WhiteDev](https://github.com/0WhiteDev)
45 | - [@DevsMarket](https://github.com/DEVS-MARKET)
46 |
--------------------------------------------------------------------------------
/cpp src/Natives/DLLInjector.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | extern "C" {
10 | JNIEXPORT jboolean JNICALL Java_uk_whitedev_injector_DLLInjector_injectDLL(JNIEnv *env, jclass clazz, jlong pid, jstring dllPath);
11 | }
12 |
13 | bool InjectDLL(DWORD processID, const std::string& dllPath) {
14 | HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, processID);
15 | if (!hProcess) {
16 | std::cerr << "OpenProcess failed" << std::endl;
17 | return false;
18 | }
19 |
20 | LPVOID pRemoteMemory = VirtualAllocEx(hProcess, NULL, dllPath.size() + 1, MEM_COMMIT, PAGE_READWRITE);
21 | if (!pRemoteMemory) {
22 | std::cerr << "VirtualAllocEx failed" << std::endl;
23 | CloseHandle(hProcess);
24 | return false;
25 | }
26 |
27 | if (!WriteProcessMemory(hProcess, pRemoteMemory, dllPath.c_str(), dllPath.size() + 1, NULL)) {
28 | std::cerr << "WriteProcessMemory failed" << std::endl;
29 | VirtualFreeEx(hProcess, pRemoteMemory, 0, MEM_RELEASE);
30 | CloseHandle(hProcess);
31 | return false;
32 | }
33 |
34 | HMODULE hKernel32 = GetModuleHandleA("kernel32.dll");
35 | if (!hKernel32) {
36 | std::cerr << "GetModuleHandleA failed" << std::endl;
37 | VirtualFreeEx(hProcess, pRemoteMemory, 0, MEM_RELEASE);
38 | CloseHandle(hProcess);
39 | return false;
40 | }
41 |
42 | LPVOID pLoadLibrary = (LPVOID)GetProcAddress(hKernel32, "LoadLibraryA");
43 | if (!pLoadLibrary) {
44 | std::cerr << "GetProcAddress failed" << std::endl;
45 | VirtualFreeEx(hProcess, pRemoteMemory, 0, MEM_RELEASE);
46 | CloseHandle(hProcess);
47 | return false;
48 | }
49 |
50 | HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)pLoadLibrary, pRemoteMemory, 0, NULL);
51 | if (!hThread) {
52 | std::cerr << "CreateRemoteThread failed" << std::endl;
53 | VirtualFreeEx(hProcess, pRemoteMemory, 0, MEM_RELEASE);
54 | CloseHandle(hProcess);
55 | return false;
56 | }
57 |
58 | WaitForSingleObject(hThread, INFINITE);
59 |
60 | VirtualFreeEx(hProcess, pRemoteMemory, 0, MEM_RELEASE);
61 | CloseHandle(hThread);
62 | CloseHandle(hProcess);
63 |
64 | return true;
65 | }
66 |
67 | JNIEXPORT jboolean JNICALL Java_uk_whitedev_injector_DLLInjector_injectDLL(JNIEnv *env, jclass clazz, jlong pid, jstring dllPath) {
68 | const char *pathChars = env->GetStringUTFChars(dllPath, NULL);
69 | if (!pathChars) {
70 | std::cerr << "Failed to convert jstring to C string" << std::endl;
71 | return JNI_FALSE;
72 | }
73 |
74 | std::string dllPathStr(pathChars);
75 | env->ReleaseStringUTFChars(dllPath, pathChars);
76 |
77 | bool result = InjectDLL(static_cast(pid), dllPathStr);
78 |
79 | return result ? JNI_TRUE : JNI_FALSE;
80 | }
81 |
--------------------------------------------------------------------------------
/cpp src/Natives/MemoryEditor.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include