Jump to content



Photo

USBProtect


  • Please log in to reply
7 replies to this topic

#1 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,512 posts

Posted 28 August 2010 - 05:07 PM

LAST VERSION - 1.1
28-Jun-10

The program consists of only one executable file (USBProtect.exe), and is intended to lock any removable storage devices, such as Flash Drive, Hard Drive (external), etc. Just run USBProtect and all removable drives will be locked. If you try to open them, you get the "Access is denied" message. If the user's account is not included in the administrators group, the user not be able to unload the process by using Windows Task Manager. In this case, USBProtect can be unloaded only by using the "/u" command line parameter (see below). I must say that USBProtect is designed to work only in Windows Vista/7 (USBResolve, see below, works in any systems).

A distinctive feature of USBProtect is that you can create (mark) a "favorites" removable drives. These drives will not be locked by USBProtect. To create the "favorite" drive you have to do the following.

  • Create a text file named "Volume.dat" in the root directory of the required drive, for example "D:Volume.dat".
  • Place in this file a unique identifier which returns the following function. This identifier is based on the serial number of drive's file system, so if you format it, this process must be repeated again.

    Spoiler

  • Set "Hidden" and "Read only" attributes for this file.
Now USBProtect will not lock this drive, and you can safely use it while all other drives will be locked. To not do every time this steps, I wrote a small utility USBResolve (inside the archive) which makes all the same but much faster and safer. Just select a drive from the list and click "Change Status" button for lock/unlock its. Naturally, this should be done while USBProtect is not launched, otherwise, drive will not be present in the list, or on another computer. Note, you can unlock only drives that have the FAT32 or NTFS file systems. And lastly, USBProtect does not write any data in the registry, it's does not need them.

You can use the following command line parameters.

"/c" or "/cd"

At program start, will be locked all the internal CD/DVD/BD-ROM devces, and while the process is in memory, access to these devices will be completely locked.

"/u" or "/unload"

Unloads USBProtect from the memory.


Posted Image



Supported operating systems

Windows Vista, 7


Files to download

Binary
Redirection to USBProtect_bin.7z, 605 KB

Attached File  USBProtect_bin.html   143bytes   1775 downloads

Source
Redirection to USBProtect_source.7z, 125 KB

Attached File  USBProtect_source.html   146bytes   1588 downloads


Note

Source code inside the archive is fully functional, but for security reasons I excluded from it a function that is responsible for protecting the process. I think that if someone who written something which really needed a protection of the process, he can independently implement that.

Edited by Yashied, 25 April 2012 - 02:56 PM.








#2 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,483 posts

Posted 28 August 2010 - 07:36 PM

Good Idea, thanks to share !

and for xp users like me, is there another version ? Posted Image

  AutoIt Version : 3.3.8.1/3.3.9.4 SciTE 3.3.0 Language:040C OS:WIN_7/ CPU:X64 OS:X64 

  Last updated Scripts and executables with full embedded files are available on : GoogleCode 


#3 slayerz

slayerz

    Prodigy

  • Active Members
  • PipPipPip
  • 160 posts

Posted 03 September 2010 - 10:51 AM

Really nice example Yashied... especially the exe protection feature.

BTW, if you have Unlocker installed, you can actually unlock your USB... but overall, it's a very nice program ;)
AUTOIT I'm lovin' it!

#4 logmein

logmein

    Polymath

  • Active Members
  • PipPipPipPip
  • 214 posts

Posted 05 September 2010 - 02:06 PM

Hmm, it requires Windows Vista that I don't have. Can you develop a version for XP?

#5 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,512 posts

Posted 05 September 2010 - 03:38 PM

Hmm, it requires Windows Vista that I don't have. Can you develop a version for XP?

USBProtect uses the WinAPI functions to lock a devices that will not work properly in Windows XP. The program is designed only for Windows Vista or later. I'm sorry.

;)

#6 4Eyes

4Eyes

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 334 posts

Posted 06 September 2010 - 02:56 AM

Yashied,

In relation to your comment "Source code inside the archive is fully functional, but for security reasons, I excluded from it a function that is responsible for protecting the process", I can't help but wonder....
is this 'protection' a method to prevent the process from being 'ProcessClosed' or does it hide the process?

Regards,

4Eyes

#7 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,512 posts

Posted 06 September 2010 - 04:53 AM

Yashied,

In relation to your comment "Source code inside the archive is fully functional, but for security reasons, I excluded from it a function that is responsible for protecting the process", I can't help but wonder....
is this 'protection' a method to prevent the process from being 'ProcessClosed' or does it hide the process?

Regards,

4Eyes

Prevents a closure process.

#8 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,512 posts

Posted 27 April 2012 - 08:55 AM

Links updated.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users