I am rewriting a legacy device driver that used the “hooked syscall” method to redirect the NtCreateFile, NtOpenFile, NtCreateSection and NtOpenSection syscalls. This method won’t work with the 64-bit OSs due to the MS kernel patch. The legacy filter looked for specific file names and when found, redirected them to its own internal files to be opened instead.
I am planning on using the minifilter approach, based on the Microsoft supplied simrep minifilter sample. I know I can intercept the IRP_MJ_CREATE Irp to redirect the NtCreateFile and NtOpenFile calls, but I am concerned about the Section calls. I am not sure if the section calls come through IRP_MJ_CREATE with different flags or not at all, and I can find no specific references in MSDN. I saw some reference on this forum that they do not go through IRP_MJ_CREATE. Since the previous developer told me that often the calls come through as Section calls, I know I have to handle this case.
Can you tell me if there is a way to intercept the NtSectionCreate/Open calls and also verify that my decision to use the minifilter simrep sample is the right way to go?
Thanks!