Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

How to block file edition on Network share drive using file system minifilter

Nikhil_V_SNikhil_V_S Member - All Emails Posts: 58

I have created a minifilter driver to block the access of files in network share drive. It is working fine .
Here I face an issue, not able to block file editing in it.
I have checked with the following flag values in miniprecreate.
But not able to block file edition.
Thanks in advance. Can you please provide a solution.


  • rstruempfrstruempf Member Posts: 103

    You won't be able to do this purely from IRP_MJ_CREATE's desired access and disposition, because those are often set for things that don't end up getting used, which would cause your filter to over block. To do this properly, you will need to allow most IRP_MJ_CREATES, except those that would modify your file during the create, and block specific actions, like IRP_MJ_WRITE, and many IRP_MJ_SET_INFORMATION's

    But specifically to what you are trying above, you've missed some entries. An existing file can be edited, for example, with a disposition of FILE_OPEN or FILE_OPEN_IF, or FILE_OVERWRITE_IF, etc., but you state that you are only checking for FILE_OVERWRITE.

  • Nikhil_V_SNikhil_V_S Member - All Emails Posts: 58
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA