Mar 19

A secure filesystem for portable storage media

Category: Linux   — Published by tengo on March 19, 2008 at 7:32 am

When using portable storage media like USB-Sticks, SD-Cards, Transflash cards or Memorysticks you do gamble a bit with your data. From multiple data losses on such devices I know that losing the piece itself is not the only way to surprisingly get rid of your files.

Let's discuss these two aspects:

  1. The threat of losing everything caused by malfunction or sudden error on the media itself, and
  2. The threat of having the device stolen, losing it through holes in your pocket or simply by just losing it through stupidity

Number 1 implies that we need to harden the media itself against errors, make it failsafe and redundant. Number two implies using techniques of obscuration/obfuscation, encryption and steganography. Let's see, what we can do:

Measures to make data loss less probable:

By default, most USB drives are formatted in FAT32, a simple and reliable filesystem. Most modern OSes use more advanced filesystems, but portable media manufactures chose to use an older but hopefully more compatible format. You aren't bound to keep this decision. So why don't we format an USB-Stick in NTFS or Ext3?

Actually, I haven't done much research in terms of fault-tolerance differences between the available filesystems yet. So comments welcome! But what I do know is that the simplicity of FAT32 or even FAT16 doesn't help preventing data loss. So the switch to a more sophisticated filesystem might be helpful.

But what changing over to Ext3 would do, it would raise security a bit, which leads us to

Things to do to prepare for the physical loss of your device

What I mentioned before is that a change in filesystem might lead to a step towards higher security. Using Ext3 would allow simple access from any unix/linux workstation while most Windows users (as a driver for the free Ext3 is not shipped with Microsoft products by default) would encounter an error and think the drive is inaccessble or empty. So we get a bit of obfuscation/encryption this way.

The other solution is to really encrypt your portable media. There are free solutions out there but I never used one of them so far. Actually I think that an encrypted drive lures too much attention and thus steganography would be the better way to go. A random intruder into your privacy might be puzzled by many for example .mp3 files and thus miss the one file that is actually not a real .mp3 file... Work in progress on this one, a good point to mediate about.

Sidenote

I don't know how far these RAID-on-USB-Stick projects will help us with the data loss problem. Maybe splitting the drive into parts and redundant write/read access would help, but that would imply a custom driver on the host side... We'll see