Thread: Write protecting USB drive

  1. #1
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587

    Write protecting USB drive

    Recently when I used my usb drive on another computer the files on my usb drive got infected by worms.
    Is there any way to make an usb drive inherently write-protected like floppy disks with any software so that worms won't be able to infect it.
    I searched for this but all solutions depend on tinkering with target computer(infected PC) registry. Utilities like thumbscrew also seem to give a similar solution.
    Is there some kind of utility which would make the usb drive write-protected at my PC and does not involve tinkering with target computer's registry.
    Does anyone know of any such utility or is it even possible to do this?
    I heard some usb drives have write-protection toggle like those in floppy disks but mine doesn't have this.
    Last edited by stevesmithx; 01-15-2009 at 09:19 AM.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    probably easier will be to find a USB-drive with lock-slider preventing write access on the hardware level
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    Yeah but as i said earlier mine doen't have lock-slider to toggle write-protection.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Without a switchm, any solution will be software based, which means tinkering with every computer that uses it, and of course the worms are free to ignore the software protection.

    So the answer is NO, buy one with a switch.

  5. #5
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    Without a switchm, any solution will be software based, which means tinkering with every computer that uses it, and of course the worms are free to ignore the software protection.

    So the answer is NO, buy one with a switch.
    Actually I searched and found certain unfamiliar for-a-fee software which claimed to do this perfectly. But I didn't want to end up buying some crap which is either fake or a virus itself!
    Anyway as you say the better solution would be to use a hardware lock,i guess.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The only way you can actually achieve this without hardware support would be to use a (filter-)driver that declines writes to that particular device. It can certainly be done, but it's not entirely trivial.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    Thanks Mats.
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  8. #8
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Damn USB thumb drives are like heroin needles. People pass them around like crazy. And because most people's systems are configured for autorun when a thumb drive is plugged in, viruses and other things can spread too easily.

    EVERY thumb drive should have a hardware write protect switch. I can't believe some don't.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  9. #9
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    IMHO autorun is inherently wrong. At least pop up a menu like Vista does (IIRC?). Plugging in a thumb drive = giving consent to executing arbitrary code is just wrong.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Hardware + Software][C++ or C#] USB Fan
    By Mywk in forum C++ Programming
    Replies: 16
    Last Post: 07-04-2009, 03:12 PM
  2. Extracting data from a laptop hard drive
    By DavidP in forum Tech Board
    Replies: 6
    Last Post: 06-13-2009, 07:02 AM
  3. Usb 2.0
    By ober in forum Tech Board
    Replies: 6
    Last Post: 09-06-2003, 10:14 AM
  4. Printers On USB
    By (TNT) in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-10-2002, 11:48 AM
  5. This should be the Cprogramming.com anthem!
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-21-2002, 12:01 AM