EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Can I use FindFirstFile/FindNextFile in OnEnumerateDirectoryC()

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#30989
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?
#30990
Posted: 10/15/2014 01:55:29
by Vladimir Cherniga (EldoS Corp.)

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.
#30999
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.
#31000
Posted: 10/15/2014 11:02:21
by Vladimir Cherniga (EldoS Corp.)

Use this advice if you have problem opening directory.

Reply

Statistics

Topic viewed 1886 times

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




|

Back to top

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

Got it!