Friday, January 9, 2009

Disable Autorun on all drives

Many viruses spread through removable storage drives using the drives autorun feature. For example as soon as one inserts the USB drive an autorun.inf file that links to the virus gets executed.

To disable automatically running this autorun.inf file use the following steps:

1) If you use Windows XP Professional:

click Start>Run... type:

gpedit.msc and hit Enter. This will open a 'Group Policy' window. Expand: 'Computer Configuration' then expand 'Administrative Templates' Select 'System' and in the pane towards the right look for 'Turn off Autoplay'. Double-click 'Turn off Autoplay' and choose 'Enabled'. Where it says 'Turn off autoplay on:' choose 'All Drives' . Click 'Apply' and 'OK' Follow the same steps by expanding 'User Configuration'

2) In case your version of windows does not run gpedit.msc try the following method that uses the Windows Registry:

open Notepad and paste the following in it:

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoDriveTypeAutoRun"=dword:000000ff

Save the file with a '.reg' extension and double-click the file. You might be prompted to merge it with the registry. Agree to do so.

Note : if you double-click the drive it might still execute the autorun.inf file.

A safer option to open drives is to use the Windows Explorer View (WinKey + E). Or maybe you'll need to import this in the registry too: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom] "AutoRun"=dword:00000000

I'm not too sure but I guess the above tweak removes the Autoplay entry from the CDROM context menu.

No comments:

Post a Comment