0

Possible Duplicate:
Make a USB drive read only

I'm trying to my flash-drive read-only so I can stick it into potentially virus infected computers and run the files enclosed.

I have discovered basically 2 ways:

  1. USB Dummy Project - a program that creates a file to take up all free space.
  2. How to Disable Write Access to USB Hard Disk and Flash Key Drives

I don't think the second way will work; a virus can be copied before I can run the program. Is there another way?

1

3 Answers 3

1
  • Some USB drives have a hardware write-protect switch. You could purchase one of these. I have an old 128MB Microsoft-branded "pen drive" that has such a switch. Not sure who actually makes it.

  • Alternatively you could use a full-size SD card which as standard has a small write-protect slider. Make a USB SD card reader part of your recovery kit.

  • The Sandisk U3 drives present the "U3" software as a fake CD-ROM partition - this is necessary since the U3 software unlocks the data on the remainder of the flash drive. I believe it's possible to modify this partition (basically erasing the current "CD-ROM partition" and creating a new one) using various utilities. I'll update this answer later with specifics if I can recall where I found the information.

2
  • - @chk has a good idea - if you can find a USB firmware utility for your flash drive (be prepared to open it and do a bit of searching) then you might be able to turn yours into a read only device.
    – LawrenceC
    Aug 7, 2012 at 18:18
  • Some USB drives with write protect are listd here ( fencepost.net/2010/03/… ) but it also notes that the write-protect on many SD cards actually just signals the card reader/writer that i shouldn't write to it and doesn't physically disable writing.
    – StarNamer
    Aug 7, 2012 at 18:25
1

The first method relies on the drive being completely filled, but if a virus can overwrite sections of a file, it can still infect it, so that's not going to work reliably.

The second method disables write access to all USB drives, so can be done before inserting the drive. However, a virus could just unset the registry entry, so that it's not really protected.

The only real answer is to find a USB drive with a hardware write protect switch or assume the drive is going to get infected and reformat it after each use. (Or, of course, trust that your anti-virus program will protect you when you read it on another system).

0

Why not use a CD (or CD-RW to be green) to boot a liveCD with utilities to fix such problems. Something like the SystemRescueCD or a flavor of one of the Ubuntu install CDs. The SystemRescueCD has the Clam-AntiVirus utility, along with critical disk tools.

1
  • 1
    There are quite a few modern portable devices that don't have optical drives, but you'd have to reach back to the P4 days to start regularly finding systems that won't boot from USB (and even farther back to find systems that didn't have USB 2.0 at all). Not to mention that working from USB tends to be much faster than optical media. Depending on the systems one expects to encounter, this might be viable though.
    – afrazier
    Aug 7, 2012 at 19:04

Not the answer you're looking for? Browse other questions tagged .