Jump to content

Useful little trick to hide files.


DennisD

Recommended Posts

  • Moderators

Ha I said exactly the same thing on portablefreeware.com re the program that allows hidden files in pictures

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

It seems rather a lot of effort just to hide a few files so I'll share a personal trick of my own. ;)

 

Back the good old days of MS-DOS the dot symbol was used a lot for navigation around directories (folders as Windows calls them but the same thing).

CD .. would take you down a directory level and . could be used to represent the current directory of a drive i.e. copy a:. d:\

So it would probably surprising you to know that under XP (and maybe Vista / Windows 7) it's possible to create a folder containing dots using the following command:

 

mkdir "\\?\c:\.." (make .. folder in the root of C drive)

 

Having a file or folder with dots (not mixed with other characters) can be quite amusing because it breaks regular DOS commands i.e. "CD .." and "DIR .." as well as applications i.e Windows Explorer because having ".." in a path makes the path invalid.

 

So basically you now have a folder that can contain any files and no way of knowning what's actually inside it.

 

To transfer files to a ".." folder for example kitten.jpg on drive e:

copy e:\kitten.jpg "\\?\c:\..\kitten.jpg"

 

To copy it back from the hidden folder:

copy "\\?\c:\..\kitten.jpg" e:\kitten-new.jpg

 

To remove the hidden folder and it's contents:

rmdir /s "\\?\c:\.."

 

btw: if anyone has access to Microsoft Vista or Windows 7 could you confirm if this trick still works.

 

Richard S.

Link to comment
Share on other sites

I have been searching for this trick for quite a while now. A person did this on some other forum and I was amazed, I kept trying different things to make it work... now I know.

 

 

Thanks a lot, Dennis!

Simplicity is hard.

Link to comment
Share on other sites

The thing about archiving formats such as RAR and ZIP their data start position can be flexible.

This was intentional to support manual extraction of files from self-extracting executables which themselves are nothing more than executable code + compressed data.

I've tested this method with mp3 files too (copy /b jpg + mp3) (playable only in Winamp), however if someone i.e. network admin notices large jpgs but small images I don't think they would be easily fooled.

 

As for my little trick it's probably not much use to most people and less understood by non DOS users.

It's interesting to see just how badly Windows reacts to a folder i.e. ".." because it's neither visible in Windows Explorer nor can you search for the filename(s) inside it.

This means that even a Guest account user has the power to dodge anti-virus scanners and security auditing software. ;)

 

Richard S.

Link to comment
Share on other sites

Another way to hide data is to use NTFS's Alternate Data Streams (ADSs).

However, doing so without programming is pretty hard since common command-line tools such as "copy" don't work.

 

You can still hide text easily though:

notepad myfile.txt:hidden.txt

will open a Notepad window which will edit the "hidden.txt" alternate data stream in "myfile.txt". Save it when you're finished. (You can create an ADS for a directory, too)

If you hide a 10 MB ADS into a 10 KB file, Windows Explorer will show the file as being 10 KB.

You have to remember the ADS's name, however :D

Piriform French translator

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.