Live data from Hacker News

Using Spotlight from the OS X Commandline

0xfe.blogspot.com

21–30 of 32 posts

Re: Using Spotlight from the OS X Commandline

#21
post #20
post #10

I am very fond of the Mac, but the developers of Spotlight and the recent Versions feature of OS X Lion have not given proper thought to users' security and privacy. Spotlight peeks inside files to create an index, and Version-supported apps maintain a changelog of file diffs. These OS X features save data in hidden locations, separate from the file. This means that: (a) it is very difficult to delete a file and be c…

You can easily exclude folders or disks from spotlight indexing. System Preferences -> Spotlight -> privacy tab to overwrite then delete the spotlight indices, disable spotlight then overwrite and delete: $ sudo srm --simple -rf /.Spotlight-V100/ There's also whole disk encryption (unfortunately not particularly robust -- I don't understand the reason but something about how the login password is stored seems to make…

I do know how to turn off Spotlight, but thank you.

My broader point is that it is becoming impossible to truly delete a file or maintain separation between different parts of your data unless you are very technical and meticulous.

How many other features are there in OS X like Spotlight or Versions that we need to be aware of?

The OS should be designed so that we don't need to be constantly on guard for these privacy gotchas.

Re: Using Spotlight from the OS X Commandline

#22
post #19
post #10

I am very fond of the Mac, but the developers of Spotlight and the recent Versions feature of OS X Lion have not given proper thought to users' security and privacy. Spotlight peeks inside files to create an index, and Version-supported apps maintain a changelog of file diffs. These OS X features save data in hidden locations, separate from the file. This means that: (a) it is very difficult to delete a file and be c…

At least there's full disk encryption with FileVault, if you want encryption.

Yes, and under OS X Lion, FileVault2 is apparently a complete rewrite of the earlier FileVault, and it appears to be solid. TrueCrypt is also an excellent (and multi-platform) alternative.

But using whole-disk encryption doesn't invalidate my comments about Spotlight and Versions. When you've logged in (i.e., mounted the encrypted volume), Spotlight and Versions will still be storing pieces of yours files in hidden locations, you still can't truly delete a file without a lot of know-how, etc.

Re: Using Spotlight from the OS X Commandline

#23
post #21
post #20

Earlier quoted context omitted.

You can easily exclude folders or disks from spotlight indexing. System Preferences -> Spotlight -> privacy tab to overwrite then delete the spotlight indices, disable spotlight then overwrite and delete: $ sudo srm --simple -rf /.Spotlight-V100/ There's also whole disk encryption (unfortunately not particularly robust -- I don't understand the reason but something about how the login password is stored seems to make…

I do know how to turn off Spotlight, but thank you. My broader point is that it is becoming impossible to truly delete a file or maintain separation between different parts of your data unless you are very technical and meticulous . How many other features are there in OS X like Spotlight or Versions that we need to be aware of? The OS should be designed so that we don't need to be constantly on guard for these priva…

I would argue that disabling Spotlight indexing for a particular folder isn't that technical, the UI for it is very simple. Of course, realising that you should do this perhaps requires a more technical mind! Overall though the point remains (swap, SSDs, etc), and is quite scary.

Re: Using Spotlight from the OS X Commandline

#24
post #10

I am very fond of the Mac, but the developers of Spotlight and the recent Versions feature of OS X Lion have not given proper thought to users' security and privacy. Spotlight peeks inside files to create an index, and Version-supported apps maintain a changelog of file diffs. These OS X features save data in hidden locations, separate from the file. This means that: (a) it is very difficult to delete a file and be c…

IIRC the Spotlight metadata is stored per-volume, so if you for example mount an encrypted DMG or external disk the metadata for files on that volume are stored on the same volume. This way you can have separate volumes for things with different classifications, and information doesn't leak from one to the other via Spotlight.

If you strongly need full privacy separation between contexts, set up a virtual machine for your confidential work, and encrypt that. Then you can monitor what crosses the security boundary yourself, and deleting the VM means the data and any possible fragments of that data generated by nosy operating system features are gone.

Side note: Check out Finder's advanced preferences for 'Empty Trash Securely'. Additionally, I believe the swap space is now encrypted by default on Lion (at least for laptops), even if you don't have full disk encryption enabled.

Re: Using Spotlight from the OS X Commandline

#25
post #20
post #10

I am very fond of the Mac, but the developers of Spotlight and the recent Versions feature of OS X Lion have not given proper thought to users' security and privacy. Spotlight peeks inside files to create an index, and Version-supported apps maintain a changelog of file diffs. These OS X features save data in hidden locations, separate from the file. This means that: (a) it is very difficult to delete a file and be c…

You can easily exclude folders or disks from spotlight indexing. System Preferences -> Spotlight -> privacy tab to overwrite then delete the spotlight indices, disable spotlight then overwrite and delete: $ sudo srm --simple -rf /.Spotlight-V100/ There's also whole disk encryption (unfortunately not particularly robust -- I don't understand the reason but something about how the login password is stored seems to make…

> There's also whole disk encryption (unfortunately not particularly robust -- I don't understand the reason but something about how the login password is stored seems to make this somewhat weak to eg the government)

As far as I understand it, with FileVault 2:

- encryption is full disk AES128 (with optional AES256) with XTS.

- the AES key is apparently [1] stored in the keychain on the recovery partiton, which is itself encrypted with 3DES, and unlocked with the login passwords. The login passwords are not stored anywhere, they are used as the encryption passphrase: decryption failure means that the provided password is wrong.

People have been able to retrieve the AES key with DMA attacks via special Firewire devices on a running system in less than a hour (I guess they could have used the PCIe slot, and maybe Thunderbolt) by dumping and scanning the memory, and this impacts just about any system out there, not just Macs and FileVault, but TrueCrypt also [0].

[1] http://support.apple.com/kb/HT5077

[0] http://www.lostpassword.com/hdd-decryption.htm

Re: Using Spotlight from the OS X Commandline

#26
post #14

Earlier quoted context omitted.

irrelevant for the vast majority of people In real life people do think of pieces of paper as having different levels of security or privacy. Some pieces of paper you can leave out on the coffee table, others get locked in a desk, and still others in a safety-deposit box. Also, as separate point, your use of the word "trade-off" assumes that there is no alternative other than giving the user some complex privacy-awar…

That comparison doesn’t work. At all.

Why not? It shows people are very aware of privacy and encryption in their day to day routine.

Re: Using Spotlight from the OS X Commandline

#27
post #21
post #20

Earlier quoted context omitted.

You can easily exclude folders or disks from spotlight indexing. System Preferences -> Spotlight -> privacy tab to overwrite then delete the spotlight indices, disable spotlight then overwrite and delete: $ sudo srm --simple -rf /.Spotlight-V100/ There's also whole disk encryption (unfortunately not particularly robust -- I don't understand the reason but something about how the login password is stored seems to make…

I do know how to turn off Spotlight, but thank you. My broader point is that it is becoming impossible to truly delete a file or maintain separation between different parts of your data unless you are very technical and meticulous . How many other features are there in OS X like Spotlight or Versions that we need to be aware of? The OS should be designed so that we don't need to be constantly on guard for these priva…

I misunderstood. In that case, yes, I totally agree. I'd suggest whole disk encryption but users will hate it, since if they forget their password the data is really gone. For reals.

Re: Using Spotlight from the OS X Commandline

#29
post #10

I am very fond of the Mac, but the developers of Spotlight and the recent Versions feature of OS X Lion have not given proper thought to users' security and privacy. Spotlight peeks inside files to create an index, and Version-supported apps maintain a changelog of file diffs. These OS X features save data in hidden locations, separate from the file. This means that: (a) it is very difficult to delete a file and be c…

Don't worry. Apple will solve that problem by completely hiding the filesystem from you :D.

Re: Using Spotlight from the OS X Commandline

#30
post #11
post #4

Earlier quoted context omitted.

`security` lets you manipulate your Keychains. `say` lets you do text-to-speech in command line.

say is pretty useful and fun. When I'm compiling or just telling the Terminal to do something tedious, I add a say command at the end and it will notify me when it's done. For example, if I want to install mercurial and git with homebrew: brew install git mercurial; say "The task is finished, Master."

I used to SSH into my wife's Mac and asked her to come over if we are in different rooms :)
Post reply on HN