Hi
Easy peazy way to terminate processes when you are in the kernel on Windows
1. PsLookupProcessByProcessId
2. ObOpenObjectByPointer
3. ZwTerminateProcess
^^ order of API calls required. That's it!
If you are in the kernel then with this method you will also be able to kill many AV processes but it won't get around ELAM so you need dkom for that one m8.
enjoy the read & gl
Easy peazy way to terminate processes when you are in the kernel on Windows
1. PsLookupProcessByProcessId
2. ObOpenObjectByPointer
3. ZwTerminateProcess
^^ order of API calls required. That's it!
Code
PEPROCESS pProcess;
HANDLE hProcess;
if (NT_SUCCESS(PsLookupProcessByProcessId((HANDLE)processid, &pProcess)))
{
if (NT_SUCCESS(ObOpenObjectByPointer(pProcess, 0, NULL, 0, *PsProcessType, KernelMode, &hProcess)))
{
ZwTerminateProcess(hProcess, 0);
}
}If you are in the kernel then with this method you will also be able to kill many AV processes but it won't get around ELAM so you need dkom for that one m8.
enjoy the read & gl
