If you have some secret data that you don’t want others to see & wondering how to hide that, then you are at the right place at the right time. Today we will going to show how to hide data in a text file that can’t be seen by anybody else unless they know the name of the secret compartment or stream in a file.
How it Works?
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 is not detectable while browsing the file system, or anywhere within Windows. It can only be accessed with the “secret key” which is really just the name of the stream.
Your data is not going to be completely secure but you should know the trick just for the sake of fun. 😀
Note: The trick only works on a drive formatted with NTFS.
How To Hide Data in a Secret Compartment?
Open a command prompt and use the following syntax:
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.
Write whatever you want in the file and then save it.
The file size will still be the same 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 would 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. Once a stream is created, you can’t copy the file to a different location and access that stream there because the stream is not a part of the file.
How To Detect Files with Streams?
As we said above that these files ain’t completely hidden from everybody, because you can use a small command line application called Streams.exe to detect files that have streams, including the names of the streams.
In our case we’d use the following syntax.
The names of the streams are shown, which would allow you to easily access them.
If you’re using Windows 7, you can simply use the /R argument to the DIR command to see the streams.
How To Delete Streams?
You can use the same Streams.exe command to delete all streams from a file, although we are not sure that you can delete just a single stream. Use the following syntax
streams.exe -d SomeFile.txt
The streams are now removed from the file.
How To Add Data To Hidden Streams?
You can add data to a hidden stream by using a number of commands, or really anything that can pipe input or output and accept the standard FileName:StreamName syntax. You could use “echo” command for this purpose.
echo “Neat!” > SomeFile.txt:Test
You can see with the streams command in the example above that we now have a hidden stream on the file.
How To Read a Stream?
You can read data from the stream by piping data into the more command, using this syntax
more < FileName:StreamName
In our example the actual command was this:
more < SomeFile.txt:SecretSquirrel!.txt
You can see that the secret data that we added is outputted to the console.
Share this post