Flash media andpreventing autorun.inf malware

JerryMungo

Honorary Master
Joined
Jul 18, 2008
Messages
37,567
Reaction score
6,324
After lots of head scratching, I have finally come up with my favourite method to prevent these annoying infections:

There are two things to do:

1) Disable autorun. Autorun is a pain in the butt and very insecure. Copy and paste the text below into a file with .reg extension, then double click the file to integrate it into the Windoze registry:
Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf]
@="@SYS:DoesNotExist"
This prevents autorun from launching malware from any USB stick you pop into your PC (the one that you ran this registry patch on).

2) Prevent your own USB stick from becoming infected:
Create a folder on each volume of your stick called autorun.inf
This prevents malware on an infected PC from creating it's own autorun.inf file when you insert your flash. It's likely there may be one or two trojans that have catered for this by deleting any autorun.inf files / folders before creating it's own - i'm not aware of any myself.
This will prevent any malware copied to your stick from an infected PC from running when inserted into any other system including your own. Note that the malware may actually attempt to infect and indeed infect the stick, but since it can't be automatically run on insertion of the stick, it won't spread easily. You should also be able to scan and clean it easily enough when you get it back to your own clean / safe PC (i.e. no stealthed stuff, etc).
 
Last edited:
1.) If memory serves you can do it in gpedit.msc as well. Administrative Templates->System-> Turn off Autoplay -> Enable option

2.) Tried that, even made my autorun read-only. You'll run into a virus which gets rid of it.

or

3.) Put in flash. Open command prompt. Go to drive letter of flash. Type "type autorun.inf". You now can see the location of the virus (most of the time). Go there and delete the crap out of it.
Works if you haven't infected your computer with the virus yet
 
Top
Sign up to the MyBroadband newsletter
X