tags:

views:

218

answers:

4

Hey,

I am trying to make a program that when a usb is plugged into the computer it will lock the usb, so it is not accessable, and then when the user enters the correct password the usb will be accessable.

Is this possible?

Any help would be appreciated, Thanks.

A: 

Use something like http://www.truecrypt.org/ - it ensures all data is inaccessible until correct password is entered.

Will
No, not like this, I am trying to make it so if any usb is plugged into my computer. Making my computer more secure.
Crazyd22
Ah, I see, sorry! Good luck!
Will
+1  A: 

What you are talking about is called "device control" in the security world. Commercial solutions exist in many flavours (Google it or take the question to SF/SU) but unfortunately I think it's quite complicated to implement on your own. In particular I think you would need to modify the device drivers in the USB layer, which in turn might disqualify C#. You would also need to whitelist certain devices or types of devices, for example your keyboard.

You could perhaps disable USB completely (in the BIOS for example), if it's a notebook and you don't strictly need USB for a keyboard or anything.

calmh
+3  A: 

I found several articles by googling "usb policy c#". Here's the first one and it looks straightforward. The results also showed some CodeProject hits, which you can usually download and learn from.

David Stratton
This is what I was looking for, however the program does not work on windows 7.
Crazyd22
A: 

I've noticed in other secure USB thumb drives that the encrypted, inaccessible portion is not considered a removable device (it shows up as another hard drive). The part that launches the executable to "login" to the encrypted drive is on a removable device.

FYI the device is a Imation PivotPlus.

cmw