forked from zxd1994/vt-debuuger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHookHelper.h
63 lines (52 loc) · 1.6 KB
/
HookHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include <ntifs.h>
#include "Ntstructs.h"
typedef struct _NT_SYSCALL_NUMBERS
{
SHORT NtSetInformationThread;
SHORT NtQueryInformationProcess;
SHORT NtQueryObject;
SHORT NtSystemDebugControl;
SHORT NtSetContextThread;
SHORT NtQuerySystemInformation;
SHORT NtGetContextThread;
SHORT NtClose;
SHORT NtQueryInformationThread;
SHORT NtCreateThreadEx;
SHORT NtCreateFile;
SHORT NtCreateProcessEx;
SHORT NtYieldExecution;
SHORT NtQuerySystemTime;
SHORT NtQueryPerformanceCounter;
SHORT NtContinue;
SHORT NtQueryInformationJobObject;
SHORT NtCreateUserProcess;
SHORT NtGetNextProcess;
SHORT NtOpenProcess;
SHORT NtOpenThread;
SHORT NtSetInformationProcess;
SHORT NtDebugActiveProcess;
SHORT NtCreateDebugObject;
SHORT NtRemoveProcessDebug;
SHORT NtWaitForDebugEvent;
SHORT NtDebugContinue;
SHORT NtReadVirtualMemory;
SHORT NtWriteVirtualMemory;
}NT_SYSCALL_NUMBERS;
typedef struct _WIN32K_SYSCALL_NUMBERS
{
SHORT NtUserFindWindowEx;
SHORT NtUserBuildHwndList;
SHORT NtUserQueryWindow;
SHORT NtUserGetForegroundWindow;
SHORT NtUserGetThreadState;
SHORT NtUserGetClassName;
SHORT NtUserInternalGetWindowText;
}WIN32K_SYSCALL_NUMBERS;
VOID GetNtSyscallNumbers(NT_SYSCALL_NUMBERS& SyscallNumbers);
VOID GetWin32kSyscallNumbers(WIN32K_SYSCALL_NUMBERS& SyscallNumbers);
BOOLEAN IsWindowBad(HANDLE hWnd);
VOID FilterProcesses(PSYSTEM_PROCESS_INFO ProcessInfo);
VOID FilterHandlesEx(PSYSTEM_HANDLE_INFORMATION_EX HandleInfoEx);
VOID FilterHandles(PSYSTEM_HANDLE_INFORMATION HandleInfo);
BOOLEAN HookKiDispatchException(PVOID HookedKiDispatchException, PVOID* OriginalKiDispatchException);;