In order to restrict access to some specific files i've create a hook on NtCreateFile. I ve read many documentation and I know it's undocumented, it's a bit tricky etc etc =) But in my case i just want to forbid access on several files.
I've succeeded to hook it, and to block access. But i receive all file path in the following form : \??\C:\blabla or \??\UNC
Firstly i removed that \??\prefix and then if I encounter a unknown drive letter (I have a db in which are stored all drives, their type and their letter) I deduce that it is a network access but I think that's a poor solution to deduce a network path by default.
So my question is in 2 parts :
-Is there a function that i missed to acheive this
-Is there a real logical way to deduce a network path from a ntFilePath.
Thanks in advance.
I've done it with a win32 C++ Dll.