5

I need to keep a secure file on OS X (10.6). The file is stored on a Flash drive, in an encrypted volume using TrueCrypt.

The file itself is a CSV, to be opened using Excel. I need the file to stay on the Flash drive and make sure it never leaves any "residue" on the internal hard drive of the machine. No caching, no backed-up versions, no spotlight index, nothing.

Is there a safe way to do that?

Update: following the comments, I agree that Excel creates risks. Hence, I can use plain text files with TextEdit or any other text editor.

7
  • 3
    easiest way (imho) ? boot a linux live cd, open it in openoffice. no harddrive needed at all.
    – Sirex
    Aug 9, 2011 at 7:49
  • On a MacBook Air... (no CD)
    – zvikico
    Aug 9, 2011 at 8:15
  • oh. fail ;-/ pxe boot over network ?
    – Sirex
    Aug 9, 2011 at 9:27
  • I really don't want the data travelling over any network.
    – zvikico
    Aug 9, 2011 at 9:33
  • 1
    no, pxe boot the os. once its running it'll be in memory. To be honest if security is that important for this file, it's worth going the extra mile to set up a workstation that can do it right, or use something like deep freeze to stop the drive being altered, or shred the drive after. there's a lot of options, but if you want to be 100% sure, take the harddrive out of the situation entirely. If a macbook can boot from usb you can boot from a live cd image on a usb stick.
    – Sirex
    Aug 9, 2011 at 9:52

3 Answers 3

1

Call me crazy - but if the data doesn't have to be in Excel what about using a tool like KeePass - http://www.keepassx.org - that can certainly manage user names and passwords, but can also store all sorts of other data as part of an account. Tools like this are purpose built specifically for scenarios you are describing and you don't need to go through the gyrations of using TrueCrypt either - though you certainly could.

3
  • That's a nice idea, kudos for thinking outside the box. We're talking about thousands of entries, so I'm not sure how it will perform. Also, I'll need to import them somehow.
    – zvikico
    Aug 9, 2011 at 15:29
  • KeePass supports importing data in a TON of formats, and CSV is one of them. I'd suggesting giving the import functionality a shot.
    – Goyuix
    Aug 9, 2011 at 17:17
  • KeePass does, but not KeePassX, which seems to be far behind. It does import its' own XMLs which should be easy to manage. It could probably be achieved with KeyChain, although I'm not sure what format it can import.
    – zvikico
    Aug 9, 2011 at 19:05
3

Microsoft Excel uses (and sometimes abuses) temporary files to prevent your work from getting lost. Here is a quote from Microsoft Support:

When you save changes a Microsoft Excel file, the following occurs:

  • The changed file is saved to a temporary file.
  • The original file is deleted.
  • The temporary file is renamed to the original file name.

The deleted original file is located in the same directory or folder as the newly modified file in Windows. On the Macintosh, temporary files are placed in an invisible folder called Temporary Items in the root level of the hard disk.

Temporary files should be automatically deleted when you close Excel, but, if you want to make sure of this, you could create a little script that deletes files in /.TemporaryItems. Note that this folder is automatically excluded from spotlight searches because it is hidden.

My advice is to not use Excel. A .csv file is a simple text file so you could try other editors, depending on what your needs are. TextEdit, for example, only creates one temporary file located in the same folder as your file.


UPDATE

Since you updated your question and removed Excel out of the equation, I will add a few points.

If you are using an appropiate editor (TextEdit without auto-saving for example), there won't be any leftovers in the hard drive. Temporary/cached files were never created and the content of your text file was kept only in RAM while the file was open.

However, if this file is really important, you should consider other things besides "hard drive leftovers". If your system is compromised, it is not secure to open your file there. You should probably consider more "drastic" approaches like Sirex suggested in the comments.

2
  • I'm with nmat here. Excel was never intended to be a csv editor anyways. . .
    – surfasb
    Aug 9, 2011 at 11:02
  • I agree that Excel is dangerous. Let's say I'm using a text file with TextEdit.
    – zvikico
    Aug 9, 2011 at 12:19
1

No matter what you do, there's always a possibility that portions of the file could be written to the machine's swap space on the boot disk.

It sounds like this might be a file that you carry from one machine to another to help you configure the machines or something? The most secure way to make sure the data stays off a machine is to never let the machine access the data in the first place. You might consider putting the file on an iPad or other portable device and accessing the data there rather than on the machine in question.

2
  • I can agree that it is better to keep it off the machine, but a mobile device with no good encryption solution like an iPad doesn't sound like the best idea :-)
    – zvikico
    Aug 9, 2011 at 19:09
  • Good point about swapping. @zvikico could disable dynamic swapping before opening the file though. And there are lots of tablet devices. I am sure that you can find one that offers a decent encryption solution.
    – nmat
    Aug 9, 2011 at 20:38

You must log in to answer this question.

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