Answer the question
In order to leave comments, you need to log in
Return control to the application?
Hello.
I inject a shellcode into a process, but after execution, the process closes.
It is logical to assume that it has nowhere to go, because after execution there is no return of control to the application.
How can I make the application work normally after executing the shellcode?
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, GetPID("exeinfope.exe"));
LPVOID remoteBuffer = VirtualAllocEx(hProc, NULL, sizeof xcode, (MEM_RESERVE | MEM_COMMIT), PAGE_EXECUTE_READWRITE);
WriteProcessMemory(hProc, remoteBuffer, xcode, sizeof xcode, NULL);
HANDLE remoteThread = CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)remoteBuffer, NULL, 0, 0);
CloseHandle(hProc);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question