Mapping network shares to local paths

Hi all.

I’m intending to enumerate all network shares the local system has and list their local paths from kernel-mode code.

One way of doing so is to read the registry key:

However, I’m not sure this key will also contain network shares that is not on SMB, like DFS and WebDAV.

Does anybody know?

Thanks in advance,

Fernando Roberto da Silva
DriverEntry Kernel Development

I installed NFS Server feature on Windows Server 2019 and I saw the network shares done on NFS are listed on a different hive on registry.

These new shares on NFS are not listed on the “Computer Management->Shared Folders->Shares” window either. This leads me to believe there isn’t an unified way to list every share a system has with their respective local paths.

The documentation says the routines NetShareEnum and its siblings are limited to SMB shares. Routines from WNet* can enumerate shares from all providers, however, they don’t bring the local path regarding to each share.

Its seems there is no way to achieve what I want using a clean and documented way even in user-mode code.

Thanks anyway!

I am assuming you are working on minifilter driver. you can identify them in precreate() by checking the existence of the client token in IRP_MJ_CREATE sent by SMB server to local FSD (at SERVER SIDE!).