Oct 27, 2008

Hide Data in a Secret Text File Compartment

Ever since Windows 2000, the NTFS file system in Windows has supported Alternate Data Streams, which allow you to store data "behind" a filename with the use of a stream name. It's not detectable while browsing the file system, or anywhere within Windows… you can only access it with the "secret key" which is really just the name of the stream.




You can think of these extra streams as secret compartments within the file, that can only be accessed if you know the "secret code", which in this case is just the name of the stream.

This isn't a completely secure way to hide data as we'll illustrate below, but it's a fun trick to know about in a pinch.

Note: This only works on a drive formatted with NTFS.

Hiding Data in a Secret Compartment

In order to use this feature, you'll have to open a command prompt and use the following syntax:

Quote:
notepad SomeFile.txt:SecretWordHere.txt
You can use anything after the colon as a secret word, the key is that there can't be any spaces between the first filename and the colon.



If you didn't specify .txt on the end, Notepad will automatically add it, and ask if you want to create a new file, even if SomeFile.txt already existed, because SecretSquirrel!.txt doesn't already exist.




Now you can enter in whatever data you want here and save the file:






When you look at the file, it will still be the exact same size as before:





You can even open up the file by double-clicking on it, and add whatever data you want to make the file look normal:





You can use the command line again to add a second hidden "compartment" with a different name:





You can add whatever other information to this file that you'd like:






None of these hidden files will affect the other, or change the main file. Just remember you have to use the command line to access the hidden data.

Note: Once you create a hidden stream, that stream isn't exactly part of the file… you can't copy your file to another location and access the streams over there.


Conclusion

This isn't a secure way to hide data… for that you should use TrueCrypt. It's just one of those things that can be fun to use and might come in handy here or there.
Learning is fun, isn't it?

All credit goes to : HowToGeek

No comments:

Post a Comment

Your comments are valuable to us