hi
sorry for too many question , after hours search in google cant find how find PID from handle in ZwTerminateProcess ?
i hook ZwTerminateProcess in fake function i use following code to find Which process is get Terminate : and according to PID take good action
can use ObReferenceObjectByHandle with kernel object ?
sorry for too many question , after hours search in google cant find how find PID from handle in ZwTerminateProcess ?
i hook ZwTerminateProcess in fake function i use following code to find Which process is get Terminate : and according to PID take good action
Code: Select all
code result is BSOD with 0xC0000005: STATUS_ACCESS_VIOLATION indicates that a memory access violation occurred. NTSTATUS fakeZwTerminateProcess(HANDLE ProcessHandle , NTSTATUS ExitStatus )
{
DbgPrint("zwterminateprocess");
ObReferenceObjectByHandle(ProcessHandle, 0, *PsProcessType, KernelMode, (PVOID*)eProcess, 0);
id =(int)PsGetProcessId(eProcess);
ObDereferenceObject(eProcess);
DbgPrint("process PID is ",id);
.......
return STATUS_ACCESS_DENIED ;
}
can use ObReferenceObjectByHandle with kernel object ?
@R00tkitSMM