Description: BOOL InjectDLL(DWORD ProcessID)
{
HANDLE Proc
char buf[50]={0}
LPVOID RemoteString, LoadLibAddy
if(!ProcessID)
return false
Proc = OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcessID)
if(!Proc)
{
sprintf(buf, "OpenProcess() failed: d", GetLastError())
MessageBox(NULL, buf, "Loader", NULL)
return false
}
LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA")
RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(DLL_NAME), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE)
WriteProcessMemory(Proc, (LPVOID)RemoteString, DLL_NAME,strlen(DLL_NAME), NULL)
CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL)
CloseHandle(Proc)
return true
}
- [INJECTOR] - upload a process of re-injected into the
- [ThreadUtility] - Enhance program permissions to create so
- [openprocess] - SeDebugPrivilege user permissions can be
- [CheatEngine] - The famous CE source code, but also driv
- [vc468222444] - This code demonstrates how to use functi
- [InJectDLL] - The DLL encapsulates the two functions,
File list (Check if you may need any files):
Injector v2.0
.............\app.rc
.............\AssemblyInfo.cpp
.............\Form1.h
.............\Form1.resx
.............\Injector v2.0.cpp
.............\Injector v2.0.sln
.............\Injector v2.0.vcproj
.............\Release
.............\.......\Injector.exe
.............\resource.h