Personal / Locked Folder in windows.

Dear reader,

Below article is related to creating your personal folder which cannot be accessible to anyone or 98% users, even not to your system administrator or your organizational administrators (AD Admins) will be able to access it (except from 2 tricks which are share at the end of article).


So lets start:

As you all must be aware that there are certain words/Name which you cannot give to folder in windows. e.g.
You can’t make a folder in Windows having CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. as the name. This is because these folder names are reserved for use in specific system related operations/tasks.

But there is a trick that you can create folder using these name and if you double click it, it won't open or in cmd you can't CD, DIR to that folder, which mean anything inside that folder can't be viewed (except from one trick which will be shared at the end of this article)

So what we will do, is to create one of the above directory (CON) and create another directory (my-hidden-directory) inside CON directory and will put files in my-hidden-directory.

Due to restriction in windows no one will be able to open CON directory and will never be able to find that there is another directory inside this CON directory, also the size of CON will be showing 0 bytes.

Lets start the practical.

I will be creating CON directory in my D:/Aamir/

I will type in below command in my command prompt:

mkdir \\.\D:\Aamir\CON\my-hidden-directory


 
Once the directory is created you can verify that you cannot go inside it, by double clicking it or type cd in command prompt.




 The trick is simple, you can go inside that hidden directory using 2 methods:

1. Open run and type in the complete path including your directory, in our case it will be like this D:\Aamir\CON\my-hidden-directory\, it will open the directory and you can copy paste the data you wants to hide.



 2. Using cmd, by typing CD "complete path" as shown below,  and copy files using copy command.



I have copied a text file inside this hidden directory as show below it showing 4KB size.

 


But the size of this CON directory will be showing 0 bytes.

Now if you want to remove your data and these folders all you to do is delete all the files inside the hidden directory after that you will be able to delete the folders one by one.

To delete the files 1st open the path using cmd or RUN box trick and delete all files.

Next using command prompt use below 2 commands

rmdir \\.\D:\Aamir\CON\my-hidden-directory

rmdir \\.\D:\Aamir\CON\

It will delete the CON and hidden directory.

Thats it.

==========================================================
Now here comes the part for administrators how to view the folder name inside those restricted directories.

1st you have to find the folder name inside that restricted directory there are 2 ways to find it.

1. Open cmd and go the parent directory of that restricted folder, in our case its D:\Aamir\. Once you are inside this parent directory, type below command
   
dir /s

it will show all the directories and sub-directories, this result will include that hidden directory also. and using above methods steps you can access that directory

2. Open cmd and go the the parent directory and type below command and press the TAB key, and it will pop the hidden directory name in terminal

CD CON\[TAB-Key]

 key pressing the TAB key and it will show all the sub-directories in side CON directory.

But most of the administrators and people are not aware of this trick so your folder is safe against most of the computer users.



Thanks



Comments

Popular posts from this blog

GRANDING UTime Master - IDOR (CVE-2023-45393)

GRANDING UTime Master - Stored XSS (CVE-2023-45391)

Ericsson BSCS iX R18 Billing & Rating (ADMX, MX) - Stored XSS (CVE-2020-29144, CVE-2020-29145)