HyperDbg Debugger
Loading...
Searching...
No Matches
Ioctls.h
Go to the documentation of this file.
1
12#pragma once
13
15// Definitions //
17
18//
19// The following controls are mainly defined in <winioctl.h>
20//
21
22//
23// Macro definition for defining IOCTL and FSCTL function control codes. Note
24// that function codes 0-2047 are reserved for Microsoft Corporation, and
25// 2048-4095 are reserved for customers.
26//
27#ifndef CTL_CODE
28
29# define CTL_CODE(DeviceType, Function, Method, Access) ( \
30 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
31
32#endif // ! CTL_CODE
33
34#ifndef FILE_ANY_ACCESS
35
36# define FILE_ANY_ACCESS 0
37
38#endif // !FILE_ANY_ACCESS
39
40//
41// Define the method codes for how buffers are passed for I/O and FS controls
42//
43
44#ifndef METHOD_BUFFERED
45
46# define METHOD_BUFFERED 0
47
48#endif // !METHOD_BUFFERED
49
50#ifndef FILE_DEVICE_UNKNOWN
51
52# define FILE_DEVICE_UNKNOWN 0x00000022
53
54#endif // !FILE_DEVICE_UNKNOWN
55
57// IOCTLs //
59
64#define IOCTL_REGISTER_EVENT \
65 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
66
71#define IOCTL_RETURN_IRP_PENDING_PACKETS_AND_DISALLOW_IOCTL \
72 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
73
78#define IOCTL_TERMINATE_VMX \
79 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)
80
85#define IOCTL_DEBUGGER_READ_MEMORY \
86 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)
87
92#define IOCTL_DEBUGGER_READ_OR_WRITE_MSR \
93 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)
94
99#define IOCTL_DEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS \
100 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)
101
106#define IOCTL_DEBUGGER_REGISTER_EVENT \
107 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)
108
113#define IOCTL_DEBUGGER_ADD_ACTION_TO_EVENT \
114 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS)
115
120#define IOCTL_DEBUGGER_HIDE_AND_UNHIDE_TO_TRANSPARENT_THE_DEBUGGER \
121 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS)
122
127#define IOCTL_DEBUGGER_VA2PA_AND_PA2VA_COMMANDS \
128 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)
129
134#define IOCTL_DEBUGGER_EDIT_MEMORY \
135 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80a, METHOD_BUFFERED, FILE_ANY_ACCESS)
136
141#define IOCTL_DEBUGGER_SEARCH_MEMORY \
142 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80b, METHOD_BUFFERED, FILE_ANY_ACCESS)
143
148#define IOCTL_DEBUGGER_MODIFY_EVENTS \
149 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80c, METHOD_BUFFERED, FILE_ANY_ACCESS)
150
155#define IOCTL_DEBUGGER_FLUSH_LOGGING_BUFFERS \
156 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80d, METHOD_BUFFERED, FILE_ANY_ACCESS)
157
162#define IOCTL_DEBUGGER_ATTACH_DETACH_USER_MODE_PROCESS \
163 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80e, METHOD_BUFFERED, FILE_ANY_ACCESS)
164
170#define IOCTL_DEBUGGER_PRINT \
171 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80f, METHOD_BUFFERED, FILE_ANY_ACCESS)
172
177#define IOCTL_PREPARE_DEBUGGEE \
178 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x810, METHOD_BUFFERED, FILE_ANY_ACCESS)
179
184#define IOCTL_PAUSE_PACKET_RECEIVED \
185 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x811, METHOD_BUFFERED, FILE_ANY_ACCESS)
186
191#define IOCTL_SEND_SIGNAL_EXECUTION_IN_DEBUGGEE_FINISHED \
192 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x812, METHOD_BUFFERED, FILE_ANY_ACCESS)
193
198#define IOCTL_SEND_USERMODE_MESSAGES_TO_DEBUGGER \
199 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x813, METHOD_BUFFERED, FILE_ANY_ACCESS)
200
205#define IOCTL_SEND_GENERAL_BUFFER_FROM_DEBUGGEE_TO_DEBUGGER \
206 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x814, METHOD_BUFFERED, FILE_ANY_ACCESS)
207
212#define IOCTL_PERFROM_KERNEL_SIDE_TESTS \
213 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x815, METHOD_BUFFERED, FILE_ANY_ACCESS)
214
219#define IOCTL_RESERVE_PRE_ALLOCATED_POOLS \
220 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x816, METHOD_BUFFERED, FILE_ANY_ACCESS)
221
226#define IOCTL_SEND_USER_DEBUGGER_COMMANDS \
227 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x817, METHOD_BUFFERED, FILE_ANY_ACCESS)
228
233#define IOCTL_GET_DETAIL_OF_ACTIVE_THREADS_AND_PROCESSES \
234 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x818, METHOD_BUFFERED, FILE_ANY_ACCESS)
235
240#define IOCTL_GET_USER_MODE_MODULE_DETAILS \
241 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x819, METHOD_BUFFERED, FILE_ANY_ACCESS)
242
247#define IOCTL_QUERY_COUNT_OF_ACTIVE_PROCESSES_OR_THREADS \
248 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81a, METHOD_BUFFERED, FILE_ANY_ACCESS)
249
254#define IOCTL_GET_LIST_OF_THREADS_AND_PROCESSES \
255 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81b, METHOD_BUFFERED, FILE_ANY_ACCESS)
256
261#define IOCTL_QUERY_CURRENT_PROCESS \
262 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81c, METHOD_BUFFERED, FILE_ANY_ACCESS)
263
268#define IOCTL_QUERY_CURRENT_THREAD \
269 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81d, METHOD_BUFFERED, FILE_ANY_ACCESS)
270
275#define IOCTL_REQUEST_REV_MACHINE_SERVICE \
276 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81e, METHOD_BUFFERED, FILE_ANY_ACCESS)
277
282#define IOCTL_DEBUGGER_BRING_PAGES_IN \
283 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x81f, METHOD_BUFFERED, FILE_ANY_ACCESS)
284
289#define IOCTL_PREACTIVATE_FUNCTIONALITY \
290 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x820, METHOD_BUFFERED, FILE_ANY_ACCESS)