VOGONS


First post, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

Like a lot of people, I use USB drives to back up data nowadays, as they are relatively cheap for the amount of storage space you get, and are very reliable. The problem is that you can't write protect a USB drive to prevent accidental file deletion/formatting/viruses altering the files/etc.

In the floppy disc days, you just engaged the write-protect tab on the disc, and in the CD-R/DVD-R days of course, accidental erasure/formatting was literally impossible*, but now with so many of us using USB hard drives/memory sticks, it's made me wonder if there is a way to prevent data on a USB drive from being altered. I would have thought that special USB leads would be available that have a switch in them to prevent file deletion, but since these don't seem to exist, then I imagine that the solution is more complicated than just disabling a 'write' date lead in the USB cable?

If nothing else, is there software that can do this, even though obviously that will have limited success. But if it at least objects when you (accidentally) try to move data from the USB drive to your PC instead of (as you intended) merely copying the data from the USB drive to the PC, then that would be something. I know, of course, that you can set the 'read only' flag on a per file basis, but I'm hoping for something more effective than that.

Thanks for any answers.

* Combine that with the extremely cheap price per blank disc, and DVD-R would be a superb backup solution, if the 'almost indestructable' sales pitch about CDs in the 1980s and onwards onto the DVD weren't so ridiculously untrue. No matter how carefully DVD-Rs are stored, they seem prone to errors a few years down the line, sadly.

Reply 2 of 19, by ratfink

User metadata
Rank Oldbie
Rank
Oldbie

Can't you password protect them, and would that meet the need?

Reply 3 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

password protection only works if you encrypt the files and that only gives you *READ* protection.
Nothing save a physical switch can give you write protection (or I'm open to suggestions, I can't think of any software protection that can't be circumvented)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 19, by Lo Wang

User metadata
Rank Member
Rank
Member
ratfink wrote:

Can't you password protect them, and would that meet the need?

That would prevent specific files from being modified by the user, but the drive as a whole would still be open to viral infection, deletion and corruption under virtually any environment (if you can fire up and hex editor and navigate the whole drive without restrictions, there goes the software lock)

"That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved" - Romans 10:9

Reply 5 of 19, by 133MHz

User metadata
Rank Oldbie
Rank
Oldbie

The very first USB flash drive I ever got (back when you had to carry a separate floppy disk with the drivers to actually use it) had a very handy write protect switch, but of the ones that succeeded it ever since I've never seen or had one with said switch. I do miss having one for the particular cases of virus-laden machines and overzealous security software deleting my stuff.

I guess a roundabout way of achieving the same thing would be to use a USB SD card reader, the 'lock' tab on the card pushes a switch inside the reader which you could wire externally, but I'm too lazy and thus can't be bothered. 🙄

http://133FSB.wordpress.com

Reply 6 of 19, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

You can try inverting these suggestions to do it programmatically:
http://www.pcadvisor.co.uk/how-to/storage/how … d-card-3456666/

Google turns up some interesting things: https://www.google.com/search?q=write+protect+a+USB+drive%3F

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 7 of 19, by Zup

User metadata
Rank Oldbie
Rank
Oldbie

Trekstor still have some USB sticks with write protection (Trekstor CS), but they're USB 2.0. I've got a 256 Mb stick bought 9 years ago and still works, but I bought a 8 Gb one and lasted only two months.

133MHz wrote:

I guess a roundabout way of achieving the same thing would be to use a USB SD card reader, the 'lock' tab on the card pushes a switch inside the reader which you could wire externally, but I'm too lazy and thus can't be bothered. 🙄

Write protection on SD cards seems to be entirely optional. My USB card reades do write protect when the lock tab is on "locked" position, but my Canon cameras can't write to the card even when locked (in fact, is a requirement to autoboot CHDK firmwares).

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 9 of 19, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

There might be modern USB sticks or USB hard drives that have such switches, I suppose, but only expensive, very large capacity ones for businesses, and no doubt they are very expensive. Certainly I've never seen one when I've been deciding which ones to buy, and I'm just a home user. And come to think of it, if a USB stick/hard drive did have such a switch on it then it would definitely bias me towards buying that one.

133MHz wrote:

I guess a roundabout way of achieving the same thing would be to use a USB SD card reader,

That's a good idea! Offhand, how does an SD card compare to a USB stick, speed-wise. Probably a stupid question, as each type no doubt comes in a variety of speeds, but a locked (switched to write-only) SD card in an SD to USB converter would be good for avoiding contamination risks with infected PCs.

the 'lock' tab on the card pushes a switch inside the reader which you could wire externally, but I'm too lazy and thus can't be bothered. 🙄

Is that all it would take, one line being cut, to make a USB extension cable into a read-only cable? If so, could you point me towards somewhere on the 'net that shows how to do this, please?

Reply 10 of 19, by Zup

User metadata
Rank Oldbie
Rank
Oldbie
Kerr Avon wrote:

Is that all it would take, one line being cut, to make a USB extension cable into a read-only cable? If so, could you point me towards somewhere on the 'net that shows how to do this, please?

No. USB cables (at least USB 2.0) have 4 wires: +5v, D+, D- and GND. They don't have a "write protection" wire. He suggest modifying the USB reader so you can enable or disable the write protection without having to extract the SD card.

I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!

Reply 11 of 19, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie
Zup wrote:
Kerr Avon wrote:

Is that all it would take, one line being cut, to make a USB extension cable into a read-only cable? If so, could you point me towards somewhere on the 'net that shows how to do this, please?

No. USB cables (at least USB 2.0) have 4 wires: +5v, D+, D- and GND. They don't have a "write protection" wire. He suggest modifying the USB reader so you can enable or disable the write protection without having to extract the SD card.

I see, sorry.

Reply 13 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Yeah, but that is, as outlined in the article, more a way to prevent this very Windows system to write to any USB stick. It's not proecting a stick from being written to on any other system...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 14 of 19, by Stojke

User metadata
Rank l33t
Rank
l33t

It can always autorun registry file (if it can be specified to device ID).

Note | LLSID | "Big boobs are important!"

Reply 15 of 19, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

that's not a protection that's an illusion... (There are other systems, besides Windows, people prevent autorun, in modern Windows you need admin priviliges to write to the registry(and who'd give it to a script on a stick?))

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 16 of 19, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

There's also such a thing as hardware USB write blockers, used for data forensics.

Wiebetech has one starting as low as $199 or so:
https://www.cru-inc.com/products/wiebetech/usb_writeblocker/
plus others: https://www.cru-inc.com/products/wiebetech/usb_writeblocker/

Or the Tableau forensic bridge:
https://www.guidancesoftware.com/products/Pag … ridges/T8u.aspx
http://www.digitalintelligence.com/products/u … _write_blocker/
http://www.digitalintelligence.com/products/u … _write_blocker/

Less expensively, this guy built his own:
http://www.instructables.com/id/Cheap-and-Eff … ocker/?ALLSTEPS
https://media.blackhat.com/bh-eu-12/Polstra/b … _Oh_Shit-WP.pdf
http://micsymposium.org/mics2012/submissions/ … bmission_17.pdf
http://itm.iit.edu/netsecure11/PhilipPolstra_ … SBForensics.pdf
http://ppolstra.blogspot.com
https://github.com/ppolstra/USB-Writeblocker

These go between the USB flash drive and the computer.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 17 of 19, by ahendricks18

User metadata
Rank Member
Rank
Member

I bought a 4 gb Sandisk cruzer once. If I remember correctly, it had some pre-loaded software to password protect the usb drive.

Main: AMD FX 6300 six core 3.5ghz (OC 4ghz)
16gb DDR3, Nvidia Geforce GT740 4gb Gfx card, running Win7 Ultimate x64
Linux: AMD Athlon 64 4000+, 1.5GB DDR, Nvidia Quadro FX1700 running Debian Jessie 8.4.0

Reply 19 of 19, by ahendricks18

User metadata
Rank Member
Rank
Member

Oops, didn't read it too closely. Sorry

Main: AMD FX 6300 six core 3.5ghz (OC 4ghz)
16gb DDR3, Nvidia Geforce GT740 4gb Gfx card, running Win7 Ultimate x64
Linux: AMD Athlon 64 4000+, 1.5GB DDR, Nvidia Quadro FX1700 running Debian Jessie 8.4.0