So look at this code: https://rstforums.com/forum/43070-c-direct-code-injection-examples-no-dll-injection.rst
Here they are not giving the size of thread func as parameter but sizeof(RemoteData) will it work?
And my computer is broke can you please check and find out if it works...:), please?
EDIT: How can this code work with dev c++???
Can you download it and test it?
Help...
I am sorry but test it when your computer gets fixed, as I am not going to download additional softwares for a single thread with Araavind (I know it's You).
Thankyou, now for my next topic:
How can you kill a process using dll injection?
I made a good DLL Injector,
now how to make my dll kill the injected process?
first is is not you made it is you copy pasted anyway call NtTerminateProcess or TerminateProcess to terminate the process. Just do it exactly like how you terminate your process.
It would work because as DLL is running under injected process memory space any action performed by DLL will be equivalent to the injected process doing it.
Can I use ExitProcess() in the dll than TerminateProcess(GetCurrentProcess() ?
In the old code cave method
which is the order in declaring
the functions?
1 2 3 4
static DWORD aInject(PARAM *p);
staticvoid zStub();
// OR REVERSE?
ExitProcess() and TerminateProcess(GetCurrentProcess() is the same thing ...
However, calling them from DllMain kills the injector process.
MSDN wrote:
f the specified module is a DLL that is not already loaded for the calling process, the system calls the DLL's DllMain function with the DLL_PROCESS_ATTACH value. If DllMain returns TRUE, LoadLibrary returns a handle to the module.
I tried to kill with injection because to kill protected processes?
But anyways :
In the old code cave method
which is the order in declaring
the functions?
1 2 3
static DWORD aInject(PARAM *p);
staticvoid zStub();
// OR REVERSE?
I think the reason no one is answering you is that what you are trying to do is stupid. Killing a critical system process causes a system failure and forces Windows to reboot, CSRSS.exe is a critical system process. You need to do A LOT more homework before you're ready to do whatever it is that you are doing. http://en.wikipedia.org/wiki/Client/Server_Runtime_Subsystem