| Informative Information for the Uninformed | ||||||||||||||
![]() |
![]() |
|||||||||||||
|
||||||||||||||
Windows OpenProcessIn Windows, the OpenProcess function is a wrapper to the NtOpenProcess routine. NtOpenProcess is implemented in the kernel by NTOSKRNL.EXE. The function prototype for NtOpenProcess is:
NTSTATUS NtOpenProcess (OUT PHANDLE ProcessHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN PCLIENT_ID ClientId OPTIONAL)
The ClientId parameter is the actual PID that is passed by OpenProcess. This parameter is optional, but during our observation the OpenProcess function always specified a ClientId when calling NtOpenProcess.
NtOpenProcess performs three primary functions:
PsLookupProcessByProcessId: mov edi, edi push ebp mov ebp, esp push ebx push esi mov eax, large fs:124h push [ebp+arg_4] mov esi, eax dec dword ptr [esi+0D4h] push PspCidTable call ExMapHandleToPointerFrom the above disassembly, it is clear that ExMapHandleToPointer queries the PspCidTable for the process ID. Now we have a complete picture of how Blacklight detects hidden processes:
|
||||||||||||||