EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Can I use FindFirstFile/FindNextFile in OnEnumerateDirectoryC()

Posted: 10/14/2014 17:50:21
by david bennett (Standard support level)
Joined: 03/29/2013
Posts: 50

I would like to use CBFlt to enable me to do a directory listing on a directory I don't have permissions for. I'm thinking that I could run the CallbackFilter application as a different user from the one logged in and then when a directory listing is made the filter application can enumerate the directory which will fail for the logged-in user. Is there a way for me to enumerate a directory from within the OnEnumerateDirectoryC() callback?
Posted: 10/15/2014 01:55:29
by Vladimir Cherniga (Team)

You need a directory handle opened, to enable directory listing. It does mean that someone must call FindFirstFile/FindNextFile with success. Alternatively, you may try to open directory handle with CreateNonCbFile api, then enumerate directory with native NtQueryDirectoryFile api.
Posted: 10/15/2014 10:54:12
by david bennett (Standard support level)
Joined: 03/29/2013
Posts: 50

Thanks. The second method seems like it might work.
Posted: 10/15/2014 11:02:21
by Vladimir Cherniga (Team)

Use this advice if you have problem opening directory.



Topic viewed 3228 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!