Close file handle in a general process is easy, use KeStackAttachProcess and ZwClose is feasible.
But how to close handle in SYSTEM process(PID=4)? Method on above is not useful. If direct use NtClose(in a kernel thread) is not useful, too.
Both ZwClose and NtClose return 0xC0000008(STATUS_INVALID_HANDLE).
Tested platform: WIN7 X64 and WIN8 X64.
But how to close handle in SYSTEM process(PID=4)? Method on above is not useful. If direct use NtClose(in a kernel thread) is not useful, too.
Both ZwClose and NtClose return 0xC0000008(STATUS_INVALID_HANDLE).
Tested platform: WIN7 X64 and WIN8 X64.
Last edited by myid on Wed Dec 26, 2012 10:59 pm, edited 3 times in total.