Simple CreateRemoteThread Injection?
Code:
#include<stdio.h>
#include<iostream>
#include<windows.h>
using namespace std;
int main()
{
cout << "Enter the target's MainWindow name: ";
char* WindowName;
*WindowName = cin.get();
cout << endl;
cout << "Enter dll name: ";
char* DllName;
*DllName = cin.get();
HWND WindowHandle = FindWindow(NULL, WindowName);
DWORD* ProcId = new DWORD;
GetWindowThreadProcessId(WindowHandle, ProcId);
HANDLE ProcHandle = OpenProcess(PROCESS_CREATE_THREAD, FALSE, *ProcId);
LPVOID LoadLibraryAddress = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibrary");
LPVOID RemoteStringAddress = (LPVOID)VirtualAllocEx(ProcHandle, NULL, strlen(DllName), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
WriteProcessMemory(ProcHandle, (LPVOID)RemoteStringAddress, DllName, strlen(DllName), NULL);
CreateRemoteThread(ProcHandle, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibraryAddress, (LPVOID)RemoteStringAddress, NULL, NULL);
CloseHandle(ProcHandle);
return 0;
}

