Flash drive infections usually involve malware that loads an autorun.inf file into the root folder of all drives (internal, external, removable). When the removable media is inserted, autorun looks for autorun.inf and automatically executes a malicious autorun.bat file which calls wscript.exe to run autorun.vbs on your computer. When a flash drive becomes infected, the Trojan will infect a system when the removable media is inserted if autorun has not been disabled.“Autorun” is the feature built into Windows that automatically runs a program specified by an “autorun.inf” file whenever a CD-ROM, DVD or USB drive is plugged into a Windows-based computer. Autorun is intended as a convenience to automatically start an installer when removable media is inserted into the computer.
Keeping Autorun enabled on USB and other removable drives has become a significant security risk due to the increasing number of malware variants that can infect them and transfer the infection to your computer. Read Danger USB! Worm targets removable memory sticks.I recommend disabling the Autorun feature on USB drives as a method of prevention.
The easiest way to disable Autorun on a specific drive is to download and use Tweak UI PowerToy.
After installation, launch Tweak UI, double-click on My Computer in the tree menu on the left, then click on AutoPlay > Drives. This will allow you to change the system settings for AutoPlay/autorun.
Uncheck the drives you want to disable AutoPlay on and click on Apply.
Next, click on the Types in the left tree. This allows you to control whether Autoplay is enabled for CD and DVD drives and removable drives. You may need to restart Tweak UI if it closes after step 2.
Uncheck the box to disable Autoplay for a particular type of drive.
See “Disable Autorun/AutoPlay” for instructions with screenshots.
When Autorun is disabled, double-clicking a drive which has autorun.inf in its root directory may still activate Autorun so be careful.Always scan USB Flash Drives after they have been used in other computer systems, even your own. An easy way to do this is to download “ClamWin Portable“, install it on your USB Flash Drive, update its definition files and perform a scan.
Another prevention measure you can use is to download Symantec’s NoScript utility. Scroll down to the section “How to disable (or re-enable) the Windows Scripting Host” to find the link and follow the instructions. Noscript will disable the Windows Scripting Host and prevent VBScripts from running on your machine until you run the utility again.