25 October 2007

Protecting your memory stick

If, for some petty corporate reason like "they don't allow me to change the registry", you can't apply the little hack I wrote about on 23 October, then you can at least protect your memory stick itself. This is also useful if you're lending your stick out to someone who will use it in more than one PC and don't want them catching, then transferring viruses (and blaming you, loudly, to their hosts).

All you do is open the memory stick and create a new folder called AUTORUN.INF. This should prevent most worms/viruses from creating a file of the same name, because when the worm sets out to create this file, it will probably use Windows file system calls which either delete, or truncate to zero, any existing regular file with that name; but those calls don't work for folders. (Of course, now I've blown the secret, I expect the virus writers will add code to do just that. So keep this one to yourself...)

3 comments:

  1. If you've got a SD card, can you just switch on the read/write protection to protect you from viruses?

    ReplyDelete
  2. Of course. That works right up until you need to put some data onto it. :) But if all you're doing is transporting, say, a Powerpoint presentation from your home PC to a conference, it's not a bad idea. A lot of people don't know you can do it.

    ReplyDelete
  3. Just a warning on this: the read/write protection does not protect the SD card "by itself"... it has to be "honored" by the card reader. Some card readers do not honor it, so the best bet is to make a little test with the particular card reader (btw: it is better using an own external usb card reader that has been tested as working fine, than "having to trust" a receiver's PC unknown card reader).

    ReplyDelete