开源软件名称(OpenSource Name):Broihon/GH-Injector-Library开源软件地址(OpenSource Url):https://github.com/Broihon/GH-Injector-Library开源编程语言(OpenSource Language):C++ 75.5%开源软件介绍(OpenSource Introduction):GH Injector LibraryA feature-rich DLL injection library which supports x86, WOW64 and x64 injections. It features five injection methods, six shellcode execution methods and various additional options. Session separation can be bypassed with all methods. If you want to use this library with a GUI check out the GH Injector GUI. Injection methods
Shellcode execution methods
Manual mapping features:
Additional features:
Getting startedYou can easily use mapper by including the compiled binaries in your project. Check the provided Injection.h header for more information. Make sure you have the compiled binaries in the working directory of your program. On first run the injection module has to download PDB files for the native (and when run on x64 the wow64) version of the ntdll.dll to resolve symbol addresses. Use the exported StartDownload function to begin the download. The injector can only function if the downloads are finished. The injection module exports GetSymbolState and GetImportState which will return INJ_ERROR_SUCCESS (0) if the PDB download and resolving of all required addresses is completed. Additionally GetDownloadProgress can be used to determine the progress of the download as percentage. If the injection module is to be unloaded during the download process call InterruptDownload or there's a chance that the dll will deadlock your process. #include "Injection.h"
HINSTANCE hInjectionMod = LoadLibrary(GH_INJ_MOD_NAME);
auto InjectA = (f_InjectA)GetProcAddress(hInjectionMod, "InjectA");
auto GetSymbolState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetSymbolState");
auto GetImportState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetImportState");
auto StartDownload = (f_StartDownload)GetProcAddress(hInjectionMod, "StartDownload");
StartDownload();
while (GetSymbolState() != 0)
{
Sleep(10);
}
while (GetImportState() != 0)
{
Sleep(10);
}
DWORD TargetProcessId;
INJECTIONDATAA data =
{
"",
TargetProcessId,
INJECTION_MODE::IM_LoadLibraryExW,
LAUNCH_METHOD::LM_NtCreateThreadEx,
NULL,
0,
NULL,
true
};
strcpy(data.szDllPath, DllPathToInject);
InjectA(&data);
CreditsFirst of all I want to credit Joachim Bauch whose Memory Module Library was a great source to learn from: He also made a great write-up explaining the basics of mapping a module: I also want to thank Akaion/Dewera for helping me with SEH support and their C# mapping library which was another great resource to learn from: Big thanks to mambda who made this PDB parser which I could steal code from to verify GUIDs: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论