Is this project suitable to build an application based restricted filesystem? *Windows OS* #493
-
Hi! I often manipulate sensitive data and I would like to ensure that only a specific program (identified by its path and/or digital signature) has access specific folders so any other program trying to access it would be denied. Even Windows Explorer should be denied or even the system. As a developer I often have to use more or less secure way to store credentials for the sake of automation or convenience (like .conf .ini files or rely on my various terminal programs encryption to ensure they do it right). Any virus or remote control program could just copy all the files are any time but now if I can control which processes can access my files.... All the data would be stored in a big file/block which would be encrypted ofc. My intent is very much like mounting a TrueCrypt volume but with a process based identification to ensure nothing can steal the data. I was wondering if :
Thank you for reading so far! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
What you want is possible, but there are caveats. You need to understand the caveats and decide whether the implied security is enough for your needs. Windows file system security is based on controlling access when files are being opened. This means that whenever the Additionally system components may have unfettered access to files:
These system components live in kernel space and are therefore "safe". However some of them may choose to "ship" your Beyond direct access to any With these caveats (and perhaps more) in mind, the answer is that: yes, you can do that in WinFsp. The native WinFsp API provides access to the ID of the process that is opening files ( |
Beta Was this translation helpful? Give feedback.
-
If you want an filesystem only accessible by one process, you can detour the NTDLL functions that have to do with files (such as NtCreateFile). Because everything file-related ultimately calls NTDLL functions, you completely control how the app sees the filesystem. |
Beta Was this translation helpful? Give feedback.
What you want is possible, but there are caveats. You need to understand the caveats and decide whether the implied security is enough for your needs.
Windows file system security is based on controlling access when files are being opened. This means that whenever the
CreateFile
(or equivalent) API is used, the file system applies access control. If the call succeeds, then the returnedHANDLE
does not usual…