Today I made this injector that injects all the DLL's in the specified processes. I included the source code so if you see any bugs/errors or improvements/idea's feel free to post them. I hope you guys like it
Virus Scan: VirusTotal - Free Online Virus, Malware and URL Scanner
I know that it gives a few viruses but they aren't real viruses . If you still don't trust it feel free to not download it or compile it yourself.
How to use:
1. in inject.txt type a asterisk(*) and then the process name. (e.g. *iw4mp.dat)
2. then on the second line type the DLL path. If you want more DLL's to be injected in the process go to the next line and type another DLL.
3. If you want to inject DLL's in more processes just go to a new line again and type another asterisk with the process name. So a valid inject.txt would be:
4. After you've done that you can just run the injector and it injects it for you.Code:*iw4mp.dat number1.dll number2.dll number3.dll *notepad.exe number4.dll number5.dll
Source Code:
Have fun with it and thank me if I helped youCode:#include <fstream> #include <windows.h> #include <tlhelp32.h> #include <shlwapi.h> #include <iostream> #include <string> #define CREATE_THREAD_ACCESS (PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ) BOOL Inject(char* procName, char* dllName); using namespace std; int main() { ifstream myFile; string output; string process; string strDLL; char* Proc; char* DLL; myFile.open("C:\\Users\\Johan\\Desktop\\inject.txt"); if (myFile.is_open()) { while (!myFile.eof()) { myFile >> output; if(output[0]=='*'){ process = output.substr(1, output.size()); Proc=&process[0]; } else { strDLL = output; DLL = &strDLL[0]; Inject(Proc, DLL); } } } myFile.close(); return 0; } BOOL Inject(char* procName, char* dllName) { DWORD ProcID = 0; PROCESSENTRY32 pe; HANDLE thSnapshot; BOOL retval, ProcFound = false; thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if(thSnapshot == INVALID_HANDLE_VALUE) { return false; } pe.dwSize = sizeof(PROCESSENTRY32); retval = Process32First(thSnapshot, &pe); while(retval) { if(StrStrI(pe.szExeFile, procName) ) { ProcFound = true; break; } retval = Process32Next(thSnapshot,&pe); pe.dwSize = sizeof(PROCESSENTRY32); } ProcID = pe.th32ProcessID; HANDLE hToken; TOKEN_PRIVILEGES tkp; if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) { LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid); tkp.PrivilegeCount = 1; tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL); } HANDLE Proc; LPVOID RemoteString, LoadLibAddy; Proc = OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcID); if(!Proc) { return false; } LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(dllName), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); WriteProcessMemory(Proc, (LPVOID)RemoteString, dllName, strlen(dllName), NULL); CreateRemoteThread(Proc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL); CloseHandle(Proc); return true; }
Please register or login to download attachments.