How To Hide Your Secret Data In A Text File

Advertisements


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.

118 How To Hide Your Secret Data In A Text 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.

11 How To Hide Your Secret Data In A Text FileYou 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.

Your data is not going to be completely secure but you should know the trick just for the sake of fun. icon biggrin How To Hide Your Secret Data In A Text File

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:

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.

21 How To Hide Your Secret Data In A Text File

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.

311 How To Hide Your Secret Data In A Text File

Write whatever you want in the file and then save it.

12 How To Hide Your Secret Data In A Text File

The file size will still be the same as before.

13 How To Hide Your Secret Data In A Text File

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

22 How To Hide Your Secret Data In A Text File

You can use the command line again to add a second hidden “compartment” with a different name.

14 How To Hide Your Secret Data In A Text File

You can add whatever other information to this file that you would like.

15 How To Hide Your Secret Data In A Text File

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.

streams.exe SomeFile.txt

16 How To Hide Your Secret Data In A Text File

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.

23 How To Hide Your Secret Data In A Text File

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

17 How To Hide Your Secret Data In A Text File

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

18 How To Hide Your Secret Data In A Text File

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

19 How To Hide Your Secret Data In A Text File

You can see that the secret data that we added is outputted to the console.

via howtogeek

Advertisements


Popular On Web Today

1 Response to " How To Hide Your Secret Data In A Text File "

  1. Cain says:

    Really awesome post. I have gone through it and i think it is really a very useful thing that needs to applied to our data is vulnerable. Thanks for sharing it.

Leave a comment

You must be Logged in to post comment.