summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authortumagonx2017-08-08 10:54:53 +0700
committertumagonx2017-08-08 10:54:53 +0700
commit2acec63b2ed75bf4b71ad257db573c4b8f9639e7 (patch)
treea8bea139ddd26116d44ea182b0b8436f2162e6e3 /file.c
initial commit
Diffstat (limited to 'file.c')
-rw-r--r--file.c665
1 files changed, 665 insertions, 0 deletions
diff --git a/file.c b/file.c
new file mode 100644
index 0000000..b82ed5c
--- /dev/null
+++ b/file.c
@@ -0,0 +1,665 @@
1/*
2 * Copyright (c) 2004 Security Architects Corporation. All rights reserved.
3 *
4 * Module Name:
5 *
6 * file.c
7 *
8 * Abstract:
9 *
10 * This module implements various file hooking routines.
11 *
12 * Author:
13 *
14 * Eugene Tsyrklevich 19-Feb-2004
15 *
16 * Revision History:
17 *
18 * None.
19 */
20
21
22#include <NTDDK.h>
23#include "file.h"
24#include "policy.h"
25#include "pathproc.h"
26#include "hookproc.h"
27#include "accessmask.h"
28#include "learn.h"
29
30
31#ifdef ALLOC_PRAGMA
32#pragma alloc_text (INIT, InitFileHooks)
33#endif
34
35
36fpZwCreateFile OriginalNtCreateFile = NULL;
37fpZwOpenFile OriginalNtOpenFile = NULL;
38fpZwDeleteFile OriginalNtDeleteFile = NULL;
39fpZwQueryAttributesFile OriginalNtQueryAttributesFile = NULL;
40fpZwQueryFullAttributesFile OriginalNtQueryFullAttributesFile = NULL;
41fpZwQueryDirectoryFile OriginalNtQueryDirectoryFile = NULL;
42fpZwSetInformationFile OriginalNtSetInformationFile = NULL;
43
44fpZwCreateMailslotFile OriginalNtCreateMailslotFile = NULL;
45fpZwCreateNamedPipeFile OriginalNtCreateNamedPipeFile = NULL;
46
47
48
49// XXX make sure that this still works with POSIX subsystem (inside windows 2000 describes how to start posix subsystem)
50
51// XXX make sure streams don't screw anything up... do a search on a directory, observe NtCreateFile output..
52
53
54/*
55 * HookedNtCreateFile()
56 *
57 * Description:
58 * This function mediates the NtCreateFile() system service and checks the
59 * provided file name against the global and current process security policies.
60 *
61 * NOTE: ZwCreateFile() creates or opens a file. [NAR]
62 *
63 * Parameters:
64 * Those of NtCreateFile().
65 *
66 * Returns:
67 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
68 * Otherwise, NTSTATUS returned by NtCreateFile().
69 */
70
71NTSTATUS
72NTAPI
73HookedNtCreateFile
74(
75 OUT PHANDLE FileHandle,
76 IN ACCESS_MASK DesiredAccess,
77 IN POBJECT_ATTRIBUTES ObjectAttributes,
78 OUT PIO_STATUS_BLOCK IoStatusBlock,
79 IN PLARGE_INTEGER AllocationSize OPTIONAL,
80 IN ULONG FileAttributes,
81 IN ULONG ShareAccess,
82 IN ULONG CreateDisposition,
83 IN ULONG CreateOptions,
84 IN PVOID EaBuffer OPTIONAL,
85 IN ULONG EaLength
86)
87{
88 PCHAR FunctionName = "HookedNtCreateFile";
89 CHAR BufferLongName[MAX_PATH], BufferShortName[MAX_PATH];
90 PCHAR FILENAME = BufferLongName;//BufferShortName;
91 PCHAR DIRECTORYNAME = BufferLongName;//BufferShortName;
92 BOOLEAN CreateDirectoryRequest = FALSE;
93
94
95 HOOK_ROUTINE_ENTER();
96
97
98 /* special handling for directories, look at flags to figure out whether we are dealing w/a directory */
99 if ((CreateOptions & FILE_DIRECTORY_FILE) && (CreateDisposition & FILE_CREATE))
100 CreateDirectoryRequest = TRUE;
101
102
103 if (LearningMode == FALSE)
104 {
105 GetPathFromOA(ObjectAttributes, BufferLongName, MAX_PATH, RESOLVE_LINKS);
106
107// ConvertLongFileNameToShort(BufferLongName, BufferShortName, MAX_PATH);
108//KdPrint(("%s\n%s\n", BufferLongName, BufferShortName));
109
110 if (CreateDirectoryRequest == TRUE)
111 {
112 POLICY_CHECK_OPTYPE(DIRECTORY, OP_DIR_CREATE);
113 }
114 else
115 {
116 POLICY_CHECK_OPTYPE(FILE, Get_FILE_OperationType(DesiredAccess));
117 }
118 }
119
120//XXX if resolved name's first character is not '\' then allow? to allow names such as IDE#CdRomNECVMWar_VMware..
121
122
123/*
124XXX
125investigate
126
127The FileId can be used to open the file, when the FILE_OPEN_BY_FILE_ID
128CreateOption is specified in a call to ZwCreateFile.
129
130whether this can be used to bypass name checking mechanism
131*/
132 if (CreateOptions & FILE_OPEN_BY_FILE_ID)
133 {
134 LOG(LOG_SS_FILE, LOG_PRIORITY_WARNING, ("%d HookedNtCreateFile: FILE_OPEN_BY_FILE_ID set\n", (ULONG) PsGetCurrentProcessId()));
135
136 HOOK_ROUTINE_EXIT( STATUS_ACCESS_DENIED );
137 }
138
139
140 ASSERT(OriginalNtCreateFile);
141
142 rc = OriginalNtCreateFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock,
143 AllocationSize, FileAttributes, ShareAccess, CreateDisposition,
144 CreateOptions, EaBuffer, EaLength);
145
146
147 if (CreateDirectoryRequest == TRUE)
148 {
149 HOOK_ROUTINE_FINISH_OPTYPE(DIRECTORY, OP_DIR_CREATE);
150 }
151 else
152 {
153 HOOK_ROUTINE_FINISH(FILE);
154 }
155}
156
157
158
159/*
160 * HookedNtOpenFile()
161 *
162 * Description:
163 * This function mediates the NtOpenFile() system service and checks the
164 * provided file name against the global and current process security policies.
165 *
166 * NOTE: ZwOpenFile() opens a file. [NAR]
167 *
168 * Parameters:
169 * Those of NtOpenFile().
170 *
171 * Returns:
172 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
173 * Otherwise, NTSTATUS returned by NtOpenFile().
174 */
175
176NTSTATUS
177NTAPI
178HookedNtOpenFile
179(
180 OUT PHANDLE FileHandle,
181 IN ACCESS_MASK DesiredAccess,
182 IN POBJECT_ATTRIBUTES ObjectAttributes,
183 OUT PIO_STATUS_BLOCK IoStatusBlock,
184 IN ULONG ShareAccess,
185 IN ULONG OpenOptions
186)
187{
188 PCHAR FunctionName = "HookedNtOpenFile";
189// HOOK_ROUTINE_START(FILE);
190
191 CHAR BufferLongName[MAX_PATH], BufferShortName[MAX_PATH];
192 PCHAR FILENAME = BufferLongName;//BufferShortName;
193
194
195 HOOK_ROUTINE_ENTER();
196
197
198 if (LearningMode == FALSE)
199 {
200 GetPathFromOA(ObjectAttributes, BufferLongName, MAX_PATH, RESOLVE_LINKS);
201
202// ConvertLongFileNameToShort(BufferLongName, BufferShortName, MAX_PATH);
203//KdPrint(("%s\n%s\n", BufferLongName, BufferShortName));
204
205 POLICY_CHECK_OPTYPE(FILE, Get_FILE_OperationType(DesiredAccess));
206 }
207
208
209 ASSERT(OriginalNtOpenFile);
210
211 rc = OriginalNtOpenFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock,
212 ShareAccess, OpenOptions);
213
214
215 HOOK_ROUTINE_FINISH(FILE);
216}
217
218
219
220/*
221 * HookedNtDeleteFile()
222 *
223 * Description:
224 * This function mediates the NtDeleteFile() system service and checks the
225 * provided file name against the global and current process security policies.
226 *
227 * NOTE: ZwDeleteFile deletes a file. [NAR]
228 *
229 * Parameters:
230 * Those of NtDeleteFile().
231 *
232 * Returns:
233 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
234 * Otherwise, NTSTATUS returned by NtDeleteFile().
235 */
236
237NTSTATUS
238NTAPI
239HookedNtDeleteFile
240(
241 IN POBJECT_ATTRIBUTES ObjectAttributes
242)
243{
244 PCHAR FunctionName = "HookedNtDeleteFile";
245
246
247 HOOK_ROUTINE_START_OPTYPE(FILE, OP_DELETE);
248
249
250 ASSERT(OriginalNtDeleteFile);
251
252 rc = OriginalNtDeleteFile(ObjectAttributes);
253
254
255 HOOK_ROUTINE_FINISH_OPTYPE(FILE, OP_DELETE);
256}
257
258
259
260/*
261 * HookedNtQueryAttributesFile()
262 *
263 * Description:
264 * This function mediates the NtQueryAttributesFile() system service and checks the
265 * provided file name against the global and current process security policies.
266 *
267 * NOTE: ZwQueryAttributesFile retrieves basic information about a file object. [NAR]
268 *
269 * Parameters:
270 * Those of NtQueryAttributesFile().
271 *
272 * Returns:
273 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
274 * Otherwise, NTSTATUS returned by NtQueryAttributesFile().
275 */
276
277NTSTATUS
278NTAPI
279HookedNtQueryAttributesFile
280(
281 IN POBJECT_ATTRIBUTES ObjectAttributes,
282 OUT PFILE_BASIC_INFORMATION FileInformation
283)
284{
285 PCHAR FunctionName = "HookedNtQueryAttributesFile";
286
287
288 HOOK_ROUTINE_START_OPTYPE(FILE, OP_READ);
289
290
291 ASSERT(OriginalNtQueryAttributesFile);
292
293 rc = OriginalNtQueryAttributesFile(ObjectAttributes, FileInformation);
294
295
296 HOOK_ROUTINE_FINISH_OPTYPE(FILE, OP_READ);
297}
298
299
300
301/*
302 * HookedNtQueryFullAttributesFile()
303 *
304 * Description:
305 * This function mediates the NtQueryFullAttributesFile() system service and checks the
306 * provided file name against the global and current process security policies.
307 *
308 * NOTE: ZwQueryFullAttributesFile retrieves extended information about a file object. [NAR]
309 *
310 * Parameters:
311 * Those of NtQueryFullAttributesFile().
312 *
313 * Returns:
314 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
315 * Otherwise, NTSTATUS returned by NtQueryFullAttributesFile().
316 */
317
318NTSTATUS
319NTAPI
320HookedNtQueryFullAttributesFile
321(
322 IN POBJECT_ATTRIBUTES ObjectAttributes,
323 OUT PFILE_NETWORK_OPEN_INFORMATION FileInformation
324)
325{
326 PCHAR FunctionName = "HookedNtQueryFullAttributesFile";
327
328
329 HOOK_ROUTINE_START_OPTYPE(FILE, OP_READ);
330
331
332 ASSERT(OriginalNtQueryFullAttributesFile);
333
334 rc = OriginalNtQueryFullAttributesFile(ObjectAttributes, FileInformation);
335
336
337 HOOK_ROUTINE_FINISH_OPTYPE(FILE, OP_READ);
338}
339
340
341
342/*
343 * HookedNtQueryDirectoryFile()
344 *
345 * Description:
346 * This function mediates the NtQueryDirectoryFile() system service and checks the
347 * provided file name against the global and current process security policies.
348 *
349 * NOTE: ZwQueryDirectoryFile retrieves information about the contents of a directory. [NAR]
350 *
351 * Parameters:
352 * Those of NtQueryDirectoryFile().
353 *
354 * Returns:
355 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
356 * Otherwise, NTSTATUS returned by NtQueryDirectoryFile().
357 */
358
359NTSTATUS
360NTAPI
361HookedNtQueryDirectoryFile
362(
363 IN HANDLE FileHandle,
364 IN HANDLE Event OPTIONAL,
365 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
366 IN PVOID ApcContext OPTIONAL,
367 OUT PIO_STATUS_BLOCK IoStatusBlock,
368 OUT PVOID FileInformation,
369 IN ULONG FileInformationLength,
370 IN FILE_INFORMATION_CLASS FileInformationClass,
371 IN BOOLEAN ReturnSingleEntry,
372 IN PUNICODE_STRING FileName OPTIONAL,
373 IN BOOLEAN RestartScan
374)
375{
376 PCHAR FunctionName = "HookedNtQueryDirectoryFile";
377 UNICODE_STRING usInputFileName;
378 CHAR FILENAME[MAX_PATH];
379 ANSI_STRING asFileName;
380
381
382 HOOK_ROUTINE_ENTER();
383
384
385 if (ARGUMENT_PRESENT(FileName))
386 {
387 if (!VerifyUnicodeString(FileName, &usInputFileName))
388 {
389 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("HookedNtQueryDirectoryFile: VerifyUnicodeString failed\n"));
390 HOOK_ROUTINE_EXIT( STATUS_ACCESS_DENIED );
391 }
392
393
394 _snprintf(FILENAME, MAX_PATH, "%S", usInputFileName.Buffer);
395 FILENAME[ MAX_PATH - 1 ] = 0;
396
397 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("HookedNtQueryDirectoryFile: %s\n", FILENAME));
398 }
399
400
401 if (LearningMode == FALSE)
402 {
403 //XXX
404// POLICY_CHECK_OPTYPE(FILE, OP_READ);
405 }
406
407
408 ASSERT(OriginalNtQueryDirectoryFile);
409
410 rc = OriginalNtQueryDirectoryFile(FileHandle, Event, ApcRoutine, ApcContext, IoStatusBlock,
411 FileInformation, FileInformationLength, FileInformationClass,
412 ReturnSingleEntry, FileName, RestartScan);
413
414
415// HOOK_ROUTINE_FINISH_OBJECTNAME_OPTYPE(FILE, FILENAME, OP_READ);
416 HOOK_ROUTINE_EXIT(rc);
417}
418
419
420
421/*
422 * HookedNtSetInformationFile()
423 *
424 * Description:
425 * This function mediates the NtSetInformationFile() system service and checks the
426 * provided file name against the global and current process security policies.
427 *
428 * NOTE: ZwSetInformationFile sets information affecting a file object. [NAR]
429 *
430 * Parameters:
431 * Those of NtSetInformationFile().
432 *
433 * Returns:
434 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
435 * Otherwise, NTSTATUS returned by NtSetInformationFile().
436 */
437
438NTSTATUS
439NTAPI
440HookedNtSetInformationFile
441(
442 IN HANDLE FileHandle,
443 OUT PIO_STATUS_BLOCK IoStatusBlock,
444 IN PVOID FileInformation,
445 IN ULONG FileInformationLength,
446 IN FILE_INFORMATION_CLASS FileInformationClass
447)
448{
449 PCHAR FunctionName = "HookedNtSetInformationFile";
450 CHAR FILENAME[MAX_PATH];
451 WCHAR FILENAMEW[MAX_PATH];
452 PWSTR FileName = NULL;
453 UCHAR Operation = OP_READ;
454
455
456 HOOK_ROUTINE_ENTER();
457
458
459 /* FileDispositionInformation is used to delete files */
460 if (FileInformationClass == FileDispositionInformation)
461 Operation = OP_DELETE;
462
463
464 if ((FileName = GetNameFromHandle(FileHandle, FILENAMEW, sizeof(FILENAMEW))) != NULL)
465 {
466 sprintf(FILENAME, "%S", FileName);
467
468 LOG(LOG_SS_FILE, LOG_PRIORITY_VERBOSE, ("%d %s: %s\n", (ULONG) PsGetCurrentProcessId(), FunctionName, FILENAME));
469
470 if (LearningMode == FALSE)
471 {
472 POLICY_CHECK_OPTYPE_NAME(FILE, Operation);
473 }
474 }
475
476
477 ASSERT(OriginalNtSetInformationFile);
478
479 rc = OriginalNtSetInformationFile(FileHandle, IoStatusBlock, FileInformation, FileInformationLength, FileInformationClass);
480
481
482 HOOK_ROUTINE_FINISH_OBJECTNAME_OPTYPE(FILE, FileName, Operation);
483}
484
485
486
487/*
488 * HookedNtCreateNamedPipeFile()
489 *
490 * Description:
491 * This function mediates the NtCreateNamedPipeFile() system service and checks the
492 * provided named pipe name against the global and current process security policies.
493 *
494 * NOTE: ZwCreateNamedPipeFile creates a named pipe. [NAR]
495 *
496 * Parameters:
497 * Those of NtCreateNamedPipeFile().
498 *
499 * Returns:
500 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
501 * Otherwise, NTSTATUS returned by NtCreateNamedPipeFile().
502 */
503
504NTSTATUS
505NTAPI
506HookedNtCreateNamedPipeFile
507(
508 OUT PHANDLE FileHandle,
509 IN ACCESS_MASK DesiredAccess,
510 IN POBJECT_ATTRIBUTES ObjectAttributes,
511 OUT PIO_STATUS_BLOCK IoStatusBlock,
512 IN ULONG ShareAccess,
513 IN ULONG CreateDisposition,
514 IN ULONG CreateOptions,
515 IN ULONG TypeMessage,
516 IN ULONG ReadmodeMessage,
517 IN ULONG Nonblocking,
518 IN ULONG MaxInstances,
519 IN ULONG InBufferSize,
520 IN ULONG OutBufferSize,
521 IN PLARGE_INTEGER DefaultTimeout OPTIONAL
522)
523{
524 PCHAR FunctionName = "HookedNtCreateNamedPipeFile";
525
526
527 HOOK_ROUTINE_START(NAMEDPIPE);
528
529
530 ASSERT(OriginalNtCreateNamedPipeFile);
531
532 rc = OriginalNtCreateNamedPipeFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock,
533 ShareAccess, CreateDisposition, CreateOptions, TypeMessage,
534 ReadmodeMessage, Nonblocking, MaxInstances, InBufferSize,
535 OutBufferSize, DefaultTimeout);
536
537
538 HOOK_ROUTINE_FINISH(NAMEDPIPE);
539}
540
541
542
543/*
544 * HookedNtCreateMailslotFile()
545 *
546 * Description:
547 * This function mediates the NtCreateMailslotFile() system service and checks the
548 * provided mailslot name against the global and current process security policies.
549 *
550 * NOTE: ZwCreateMailslotFile creates a mailslot. [NAR]
551 *
552 * Parameters:
553 * Those of NtCreateMailslotFile().
554 *
555 * Returns:
556 * STATUS_ACCESS_DENIED if the call does not pass the security policy check.
557 * Otherwise, NTSTATUS returned by NtCreateMailslotFile().
558 */
559
560NTSTATUS
561NTAPI
562HookedNtCreateMailslotFile
563(
564 OUT PHANDLE FileHandle,
565 IN ACCESS_MASK DesiredAccess,
566 IN POBJECT_ATTRIBUTES ObjectAttributes,
567 OUT PIO_STATUS_BLOCK IoStatusBlock,
568 IN ULONG CreateOptions,
569 IN ULONG InBufferSize,
570 IN ULONG MaxMessageSize,
571 IN PLARGE_INTEGER ReadTimeout OPTIONAL
572)
573{
574 PCHAR FunctionName = "HookedNtCreateMailslotFile";
575
576
577 HOOK_ROUTINE_START(MAILSLOT);
578
579
580 ASSERT(OriginalNtCreateMailslotFile);
581
582 rc = OriginalNtCreateMailslotFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock,
583 CreateOptions, InBufferSize, MaxMessageSize, ReadTimeout);
584
585
586 HOOK_ROUTINE_FINISH(MAILSLOT);
587}
588
589
590
591/*
592 * InitFileHooks()
593 *
594 * Description:
595 * Initializes all the mediated file operation pointers. The "OriginalFunction" pointers
596 * are initialized by InstallSyscallsHooks() that must be called prior to this function.
597 *
598 * NOTE: Called once during driver initialization (DriverEntry()).
599 *
600 * Parameters:
601 * None.
602 *
603 * Returns:
604 * TRUE to indicate success, FALSE if failed.
605 */
606
607BOOLEAN
608InitFileHooks()
609{
610 if ( (OriginalNtCreateFile = (fpZwCreateFile) ZwCalls[ZW_CREATE_FILE_INDEX].OriginalFunction) == NULL)
611 {
612 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtCreateFile is NULL\n"));
613 return FALSE;
614 }
615
616 if ( (OriginalNtOpenFile = (fpZwOpenFile) ZwCalls[ZW_OPEN_FILE_INDEX].OriginalFunction) == NULL)
617 {
618 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtOpenFile is NULL\n"));
619 return FALSE;
620 }
621
622 if ( (OriginalNtDeleteFile = (fpZwDeleteFile) ZwCalls[ZW_DELETE_FILE_INDEX].OriginalFunction) == NULL)
623 {
624 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtDeleteFile is NULL\n"));
625 return FALSE;
626 }
627
628 if ( (OriginalNtQueryAttributesFile = (fpZwQueryAttributesFile) ZwCalls[ZW_QUERY_ATTRIBUTES_FILE_INDEX].OriginalFunction) == NULL)
629 {
630 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtQueryAttributesFile is NULL\n"));
631 return FALSE;
632 }
633
634 if ( (OriginalNtQueryFullAttributesFile = (fpZwQueryFullAttributesFile) ZwCalls[ZW_QUERY_FULLATTR_FILE_INDEX].OriginalFunction) == NULL)
635 {
636 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtQueryFullAttributesFile is NULL\n"));
637 return FALSE;
638 }
639/*
640 if ( (OriginalNtQueryDirectoryFile = (fpZwQueryDirectoryFile) ZwCalls[ZW_QUERY_DIRECTORYFILE_INDEX].OriginalFunction) == NULL)
641 {
642 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtQueryDirectoryFile is NULL\n"));
643 return FALSE;
644 }
645*/
646 if ( (OriginalNtSetInformationFile = (fpZwSetInformationFile) ZwCalls[ZW_SET_INFO_FILE_INDEX].OriginalFunction) == NULL)
647 {
648 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtSetInformationFile is NULL\n"));
649 return FALSE;
650 }
651
652 if ( (OriginalNtCreateNamedPipeFile = (fpZwCreateNamedPipeFile) ZwCalls[ZW_CREATE_NAMEDPIPEFILE_INDEX].OriginalFunction) == NULL)
653 {
654 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtCreateNamedPipeFile is NULL\n"));
655 return FALSE;
656 }
657
658 if ( (OriginalNtCreateMailslotFile = (fpZwCreateMailslotFile) ZwCalls[ZW_CREATE_MAILSLOTFILE_INDEX].OriginalFunction) == NULL)
659 {
660 LOG(LOG_SS_FILE, LOG_PRIORITY_DEBUG, ("InitFileHooks: OriginalNtCreateMailslotFile is NULL\n"));
661 return FALSE;
662 }
663
664 return TRUE;
665}