How to Protect PC from USB drive viruses and vice-versa?

by Neeraj K on July 12, 2009 · 2 comments

in Free Softwares

USB Drive Virus

How many times you have found that your computer is infected after you have plugged the USB drive. I have definitely faced this situation many times and more often vice-versa.  When you attach your USB drive to the infected computer the virus is transferred to the drive in no time affecting all the important data in USB drive.


So we require a solution that protects computer from getting virus from USB drive and vice-versa.

One approach is that if we make our USB drive write protected then no data can be written to it which means that if a virus infected computer is going to transmit any virus to drive, it won’t be able to because USB drive is write protected.  But we can safely copy data from USB drive without the worry of virus being copied on my USB drive. Although you won’t be able to write anything on your USB drive, it’s still very useful in case you want something to copy from your USB drive and don’t want to get infected. This can be achieved either by making changes to Windows XP registry or using third party software.

It’s always recommended to backup your registry before tweaking registry values.  You should have administrator privileges to makes changes in the registry.

  • Click on start and select Run (Run dialog box will popup)
  • Type regedit and press enter
  • Browse to HKEY_LOCAL_MACHINE\SYSTEM
    \CurrentControlSet\Control\
  • Locate the sub-key StorageDevicePolicies. If it doesn’t exist then create a new key under Control by right clicking on it.
  • Right click in the blank area of the sub key you just created and create a new DWORD value by the name WriteProtect.
  • Double-click it and set the value data as 1 (and 0 for disabling it).
  • Click OK, close the Registry Editor and restart the PC.

I have created a registry file which can enable/disable write protection. Download and double click,  it will make necessary changes in the registry.

Download: WriteProtectEnable.reg WriteProtectDisable.reg

You have to restart PC every time you want to toggle the write protection of USB drive.  This will annoy some users. Hence, third party software comes to their rescue.

USB WriteProtector

USB WriteProtector

The USB WriteProtector is a freeware application which prevents write access to a USB drives. This will protect USB drives from viruses, malwares, spywares etc. It’s a portable program available in different languages and also easy to use. The file is only 190KB in size and supports on Windows XP.  After activating write protection on USB drive, if you copy/delete data following message will appear.

USB WriteProtector : Error Copying File or Folder

Download: USB WriteProtector

Other approach can be disabling feature called AutoRun or AutoPlay that executes a special program autorun.inf as soon as a device is connected.  Viruses take advantage of that feature by creating their own autorun program hidden in the USB drive.

Turning off the USB AutoRun feature of Windows XP can be achieved by manipulating registry as well as using third party software. Once again I will explain both.

As mentioned before in this post, you must take backup of your registry before tweaking them.  You should have administrator privileges to makes changes in the registry.

  • Click on start and select Run (Run dialog box will popup)
  • Type regedit and press enter
  • Browse to HKEY_CURRENT_USER\Software\Microsoft\Windows
    \CurrentVersion\Policies\Explorer
  • Change the value of the variable NoDriveTypeAutoRun to 95 (In Hexadecimal). Old value will be 91(In Hexadecimal) as default in WinXP.
  • Browse to  HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
    \CurrentVersion\Policies\Explorer
  • Change the value of the variable NoDriveTypeAutoRun to 95 (In Hexadecimal). Old value will be 91(In Hexadecimal) as default in WinXP.
  • Restart the PC (it might not be necessary to restart but better be safe)

I have created a registry file which can disable AutoRun feature. Download and double click, it will make necessary changes in the registry.

Download: AutoRunDisable.reg

Coming back to third party software Panda USB Vaccine disables AutoRun completely so that no program from any USB/CD/DVD drive can auto-execute.  It can further be used on individual USB drives to disable its autorun.inf file in order to prevent malware infections from spreading automatically.

Panda USB Vaccine

Panda USB Vaccine

When applied on a USB drive, the vaccine permanently blocks an innocuous autorun.inf file, preventing it from being read, created, deleted or modified. The drive can otherwise be used normally and files (even malware) copied to/from it, but they will be prevented from opening automatically. Panda USB Vaccine currently works on FAT/FAT32/NTFS USB drives.

Download: Panda USB Vaccine

I would highly recommend using Panda USB Vaccine as it protects both PC & USB drive.

If you are aware of any other approach to prevent USB drive virus from spreading, pl. do reply.

Email This Post Email This Post    Print This Post Print This Post   
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Related posts:

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 2 comments… read them below or add one }

1 Ravinder October 16, 2009 at 11:50 pm

thanks for the nice info. Really it is very usefull.

Reply

2 Neeraj K October 24, 2009 at 4:05 pm

Thanks Ravinder for your comment, I am glad you find it useful.

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled

Next post: