- 1
- 2
- 3
- 4
const char dll[] = "C:\\sperhacks\\superhack.dll";
LPVOID mem = NULL;
DWORD PID = 666;
if (WriteProcessMemory(OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION, FALSE, PID), (mem = VirtualAllocEx(OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION, FALSE, PID), NULL, sizeof(dll), MEM_COMMIT, PAGE_EXECUTE_READWRITE)), dll, sizeof(dll), NULL) && CreateRemoteThread(OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_CREATE_THREAD |PROCESS_QUERY_INFORMATION, FALSE, PID), NULL, 0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LoadLibraryA"), mem, NULL, NULL));
Говнопособие для самых маленьких: dll-injection в 4 строки. Можно и без кучи OpenProcess, тогда в 5 строк.