Monday, March 03, 2008

Locking USB Storage in your System

I wanted prevent users from connecting a USB Storage device to my system. It wasnt as cubersome as i initially thought it would be. Microsoft had provided this wonderful KB article (823732) which give a very good explanation of the same.

There are two scenario's that needed to be thought of.
1. If USB Storage Device is not installed in your System.
2. If USB Storage device is already installed in your system.

Under the first circumstances, we can disable the access by making usbstor.inf and usbstor.pnf files under the SystemRoot directory secure from the users.

On other hand under the second circumstances , we can change the value of UsbStor in the registry to accomplish our goals.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor

Changing the value of "Start" to "4" would prevent the USB Drive from getting detected.

Thats it, you have locked up USB storage devices from being connected to your system