by Kevin M Matthews (2 Submissions)
Category: Files/File Controls/Input/Output
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
UPDATE: Fixed a few minor bugs, and added the ability to import any changes the user may have made to a file back into the vault.
UPDATE: I have updated the code to implement AES encryption (John Korejwa), and Secure Document Shredder(Steppenwolfe). Fixed a major bug that I was unaware of until I did the update. All file types should be launchable now from within the program.
This code demonstrates how to use alternate data streams (ADS) to store programs, files, etc, within another file. There are three projects included in the zip. One is used to View the VaultFiles, one is a blank VaultFile, and the other is used to cleanup tempfiles created when opening a file. Compile all three to the same directory. Launch either FileVaultViewer or VaultFile and the rest should be explained as you go. I have taken extra care to thoroughly comment the code so it should be understandable by coders of any experience level. (Just make sure you understand Alternate Data Streams first.) Feedback would be much appreciated.
Much of the information used to create this was obtained from the site https://www.infosecwriters.com/texts.php?op=display&id=53
Also, I used Ion Alex Ionescu's project (located at https://www.vbcoders.com/vb/scripts/ShowCode.asp?txtCodeId=47299&lngWId=1) for debugging purposes.
API Declarations'See Code
Download FileVault Using NTFS Alternate Data Streams (70 KB)