4 #if (PHNT_MODE != PHNT_MODE_KERNEL)
5 #define OBJECT_TYPE_CREATE 0x0001
6 #define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
9 #if (PHNT_MODE != PHNT_MODE_KERNEL)
10 #define DIRECTORY_QUERY 0x0001
11 #define DIRECTORY_TRAVERSE 0x0002
12 #define DIRECTORY_CREATE_OBJECT 0x0004
13 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
14 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xf)
17 #if (PHNT_MODE != PHNT_MODE_KERNEL)
18 #define SYMBOLIC_LINK_QUERY 0x0001
19 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
22 #define OBJ_PROTECT_CLOSE 0x00000001
24 #define OBJ_INHERIT 0x00000002
26 #define OBJ_AUDIT_OBJECT_CLOSE 0x00000004
28 #if (PHNT_MODE != PHNT_MODE_KERNEL)
29 typedef enum _OBJECT_INFORMATION_CLASS
31 ObjectBasicInformation,
33 ObjectTypeInformation,
38 } OBJECT_INFORMATION_CLASS;
40 #define ObjectNameInformation 1
41 #define ObjectTypesInformation 3
42 #define ObjectHandleFlagInformation 4
43 #define ObjectSessionInformation 5
61 #if (PHNT_MODE != PHNT_MODE_KERNEL)
62 typedef struct _OBJECT_NAME_INFORMATION
65 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
108 #if (PHNT_MODE != PHNT_MODE_KERNEL)
115 _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
116 _Out_writes_bytes_opt_(ObjectInformationLength) PVOID ObjectInformation,
117 _In_ ULONG ObjectInformationLength,
118 _Out_opt_ PULONG ReturnLength
124 NtSetInformationObject(
126 _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
127 _In_reads_bytes_(ObjectInformationLength) PVOID ObjectInformation,
128 _In_ ULONG ObjectInformationLength
131 #define DUPLICATE_CLOSE_SOURCE 0x00000001
132 #define DUPLICATE_SAME_ACCESS 0x00000002
133 #define DUPLICATE_SAME_ATTRIBUTES 0x00000004
139 _In_ HANDLE SourceProcessHandle,
140 _In_ HANDLE SourceHandle,
141 _In_opt_ HANDLE TargetProcessHandle,
142 _Out_opt_ PHANDLE TargetHandle,
143 _In_ ACCESS_MASK DesiredAccess,
144 _In_ ULONG HandleAttributes,
151 NtMakeTemporaryObject(
158 NtMakePermanentObject(
165 NtSignalAndWaitForSingleObject(
166 _In_ HANDLE SignalHandle,
167 _In_ HANDLE WaitHandle,
168 _In_ BOOLEAN Alertable,
169 _In_opt_ PLARGE_INTEGER Timeout
175 NtWaitForSingleObject(
177 _In_ BOOLEAN Alertable,
178 _In_opt_ PLARGE_INTEGER Timeout
184 NtWaitForMultipleObjects(
186 _In_reads_(Count) HANDLE Handles[],
188 _In_ BOOLEAN Alertable,
189 _In_opt_ PLARGE_INTEGER Timeout
192 #if (PHNT_VERSION >= PHNT_WS03)
196 NtWaitForMultipleObjects32(
198 _In_reads_(Count)
LONG Handles[],
200 _In_ BOOLEAN Alertable,
201 _In_opt_ PLARGE_INTEGER Timeout
210 _In_ SECURITY_INFORMATION SecurityInformation,
211 _In_ PSECURITY_DESCRIPTOR SecurityDescriptor
217 NtQuerySecurityObject(
219 _In_ SECURITY_INFORMATION SecurityInformation,
220 _Out_writes_bytes_opt_(Length) PSECURITY_DESCRIPTOR SecurityDescriptor,
222 _Out_ PULONG LengthNeeded
232 #if (PHNT_VERSION >= PHNT_THRESHOLD)
237 _In_ HANDLE FirstObjectHandle,
238 _In_ HANDLE SecondObjectHandle
246 #if (PHNT_MODE != PHNT_MODE_KERNEL)
251 NtCreateDirectoryObject(
252 _Out_ PHANDLE DirectoryHandle,
253 _In_ ACCESS_MASK DesiredAccess,
257 #if (PHNT_VERSION >= PHNT_WIN8)
261 NtCreateDirectoryObjectEx(
262 _Out_ PHANDLE DirectoryHandle,
263 _In_ ACCESS_MASK DesiredAccess,
265 _In_ HANDLE ShadowDirectoryHandle,
273 NtOpenDirectoryObject(
274 _Out_ PHANDLE DirectoryHandle,
275 _In_ ACCESS_MASK DesiredAccess,
279 typedef struct _OBJECT_DIRECTORY_INFORMATION
283 } OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
288 NtQueryDirectoryObject(
289 _In_ HANDLE DirectoryHandle,
290 _Out_writes_bytes_opt_(Length) PVOID Buffer,
292 _In_ BOOLEAN ReturnSingleEntry,
293 _In_ BOOLEAN RestartScan,
294 _Inout_ PULONG Context,
295 _Out_opt_ PULONG ReturnLength
302 #if (PHNT_MODE != PHNT_MODE_KERNEL)
304 #if (PHNT_VERSION >= PHNT_VISTA)
309 NtCreatePrivateNamespace(
310 _Out_ PHANDLE NamespaceHandle,
311 _In_ ACCESS_MASK DesiredAccess,
313 _In_ PVOID BoundaryDescriptor
319 NtOpenPrivateNamespace(
320 _Out_ PHANDLE NamespaceHandle,
321 _In_ ACCESS_MASK DesiredAccess,
323 _In_ PVOID BoundaryDescriptor
329 NtDeletePrivateNamespace(
330 _In_ HANDLE NamespaceHandle
339 #if (PHNT_MODE != PHNT_MODE_KERNEL)
344 NtCreateSymbolicLinkObject(
345 _Out_ PHANDLE LinkHandle,
346 _In_ ACCESS_MASK DesiredAccess,
354 NtOpenSymbolicLinkObject(
355 _Out_ PHANDLE LinkHandle,
356 _In_ ACCESS_MASK DesiredAccess,
363 NtQuerySymbolicLinkObject(
364 _In_ HANDLE LinkHandle,
366 _Out_opt_ PULONG ReturnedLength