How To Protect Your USB Sticks From Malwares?

The popularity of USB thumb drives nowadays has attracted hundreds of virus writers throughout the globe. They work so well exploiting the ‘Autorun’ feature and developing new sets of malwares with a clear intent of accessing your PC without your informed consent. And most often, they’ve got malicious scripts that work seamlessly that even the top-notch antivirus software of today can’t fix.

One of the best ways to protect your USB sticks from malwares is to create a file or folder and name it as “AUTORUN.INF”. This enables the worms to run automatically on your computer even without executing it yourself. By creating a file/directory named as “AUTORUN.INF” beforehand, the malware should ideally not be able to execute that way.

But the trick doesn’t end all there as malwares can actually delete and replace your newly-created file/folder with a fresh version of malicious “AUTORUN.INF” file/folder. Right after you create an ”AUTORUN.INF” file/folder, you’ve got to restrict access/changes by manipulating the file permission setting of that file/folder.

Here’s how you can protect your USB sticks from malwares using this simple technique:

Note: This USB stick protection technique only works with NTFS-formatted external drives. If you have a thumb drive formatted using FAT, back it up and reformat it with NTFS file system. (This should work on Windows XP, Windows Vista and Windows 7).

1. Create a folder in the root directory of your flash drive and name it as AUTORUN.INF.

2. Inside AUTORUN.INF folder, create four more directories and name it as “recycle”, “recycler”, “recycled”, and “setup”. You should be able to create the following directories:

E:\AUTORUN.INF\recycle \

Where 'E’ is the removable disks’ directory Note: The folders “recycle”, “recycler”, “recycled” and “setup” are optional but it’s highly recommended to create these as malicious software often uses these names.

3. Run command prompt (cmd.exe); click Start, Run, and type “cmd”.

4. At the command prompt, go to the root directory of your USB stick by typing in directory drive followed by a colon. Example, “E:” (without “).

5. Set the attributes of your AUTORUN.INF folder using this DOS command:
attrib autorun.inf /s /d –a +s +r

6. Set the access level of this folder using this DOS command:
cacls autorun.inf /c /d administrators

7. You should be prompted with the message “Are you sure(Y/N)?”. Just select “Y” and hit Enter.

8. Now try to delete, modify, rename, copy, or open the AUTORUN.INF folder. If you cannot perform any of these operations, then, your USB stick is successfully protected.

Protecting your USB sticks from malwares doesn’t really have to be expensive. With the simple technique mentioned above, you should be able to plug your thumb drive to any computer without having to worry for virus infections.


Get weekly alerts delivered straight to your inbox