Protecting your USB and PC from annoying viruses

Nitish ChandanCyber Security

A Pen Drive(USB) has kind of become an integral part of everyone’s digital life. Exchanging movies, Game of Thrones episodes, Songs or project documents is now a daily affair. These USB drives come packed with a lot of vulnerabilities which you encounter more than once in your digital lifetime. (Folder mein Folder, New Folder, Hidden Folder Executables and whatnot!)

Vulnerable, How?
  • Data Loss: There is nothing as important and expensive as  Data in the world today. 
  • Physical Access: Hackers can copy/manipulate files easily by just having physical access to your USB port.

Stop Windows from writing data to your pen drive’s root directory:

Theoretically, as soon as your pen drive is detected by the Operating System, it looks for the autorun file and executes code in it, if the code is malicious there are subsequent repercussions. Hence, what you have to do here is disable public access to the root directory of your pen drive and create a folder where the write operations can happen. Generally, if the root access is not given, you save yourself from a lot of infections.

How to do it?

1. Go to Device Manager and locate your pen drive under disks.

2. Right-click and go to properties, find the policies tab and select Better Performance.

3. Once done, format your drive to the NTFS file system over FAT or FAT32(If you are primarily going to use this drive on Windows)

4. Subsequently, create a new folder and name it anything you like,

5. Open Command prompt (go to run and type cmd) Screenshot (309)

6. Type takeown /f G:\ /r /d y  (Assuming your drive is G, change for whatever your drive is)

7. Open the properties of your drive, and navigate to the security tab. Add permissions for “Everyone” to only Read and List Folder contents. Screenshot (310)

8. Now explore your drive and do the same with the folder you created in step 4. Consequently, you can add permissions to give full control.

9. Anyone can write in the folder but not the root. Thus, this helps you kind of Write and protect your drive from Viruses.

10. In case you have any problem setting this up, leave a comment below or find us on any of our social handles.

Autorun Infection: 

I’m very sure almost all of you have faced this kind of problem at some point in time. New Folder viruses, folders within folders and so much more. Essentially, it happens by exploiting the autorun file that runs on its own once your USB drive is inserted. Thus, in order to protect your PC, you need to stop this autorun activity from automatically happening.

Disable AutoRun / AutoPlay using Registry Editor:
  • In the Run dialog, type regedit to launch the Registry Editor.
  • Depending on whether you want to disable AutoRun for all users or just for the current one, navigate to either of these registry keys (the first one is for all users):



  • Within this subkey, locate the setting labelled “NoDriveTypeAutoRun”. If it doesn’t exist, create a new 32-bit DWORD with this name and assign it the hexadecimal value 000000FF(Decimal 255).
  • FInally, restart your computer.

The concept and idea for this post was sent to us by Sukhmani Kaur. Thank you Sukhmani for the wonderful content.

Lastly, just in case you have an infected USB, Download USB FIX here.