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

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

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Intercept network share enumeration (NetShareEnum) from Minifilter?

dato0011dato0011 Member Posts: 11

Hello guys

I want to intercept calls to NetShareEnum function (which enumerates shared folders) and for a specific application, I want to add a "fake" folder from post ops callback. I then would process files/folders enumeration in that shared folder from IRP_MJ_DIRECTORY_CONTROL callbacks from my minifilter.
Is there a way to achieve this? I couldn't find anything useful from MSDN.



  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,376

    It is not as simple as intercepting a specific enumeration request in kernel mode.

    The enumeration of network shares happens in user mode. The network file system registers a network provider DLL that exports enumeration functions called when the O/S wants to enumerate the shares. The network provider DLL then does whatever processing is necessary to populate these enumerations with info from the server.

    What exactly are you trying to accomplish? Maybe there's a better way.


  • dato0011dato0011 Member Posts: 11

    I see, so this task needs user mode hooking. Thanks Scott

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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE