I need to quantify myself
June 10, 2012 9:32 AM   Subscribe

The mathematician Stephen Wolfram posted about his efforts at quantifying his activity over the past couple of decades. Of particular interest to me is his reference to having logged the keystrokes he's entered on his computer. Any idea how I could do that as well?

I have Mac OSX. Basically, I'm looking for a legitimate keylogger (assuming something like that exists).

Any ideas?
posted by dfriedman to Computers & Internet (5 answers total) 1 user marked this as a favorite
There are a million of these as hacks; what's impressive is Wolfram managed to run one consistently for years. The latest one I tried recently was Tom MacWright's minute-agent, visualized in this quick diagram. All he logs is a timestamp for every keypress. It's easy enough to build and run yourself if you're familiar with coding.
posted by Nelson at 10:25 AM on June 10, 2012

The keywords you're looking for are "keylogger" and "keystroke logger." They come in two flavors - hardware keyloggers, which are small USB devices that sit between your keyboard and pc and record keystrokes to internal memory, and software keyloggers that more or less sit between your operating system and an individual application on the computer.

There are a few security concerns to worry about in the later case. The first is that the software itself might be malicious. It's true that most of the software you install could easily capture your keystrokes and do bad things with them, so there's no particular reason to be worried about software designed to capture keystrokes. But, it's also true that installing software with obvious sketchy applications (spying on people, voyeurism, etc) may warrant a little more caution.

The second concern is that leaving a plaintext file sitting around with all your keystrokes in it means that someone might find it, either on your machine or on your backup media. I don't have any reason to believe that malware will be particularly targeting those files; however, if *I* were going to write a naughty secret-stealing virus, the output of the most common keylogger software would be high on my list of targets.

If it were me, I'd refuse to use any software that isn't open-source, able to encrypt the output files, and able to do so in a way that doesn't store all the information needed to decrypt them in an easily accessible place. (It should ask you for a passphrase when the computer boots, and should offer some promises about not writing anything sensitive to disk or swap.) Unfortunately, it doesn't look like such a thing exists for mac OSX right now, though, there are several options that do some of the above. A few google searches will turn up review articles comparing the leading contenders. If you're less paranoid than me, any of them are likely to work fine.

The final option is to grab a large storage capacity hardware keylogger such as this one (selected more or less at random). Then, once a year your mount it as a drive, encrypt the text file (with something like GPG), and store the encrypted text on your machine until you want to analyze it. Sure to work (assuming the hardware actually works), and a pretty small security risk.

Finding interesting stuff in all that raw data is a much bigger topic, and no doubt one for which askme would turn up many suggestions.
posted by eotvos at 10:26 AM on June 10, 2012

(also chipping in - I built a binary of minute-agent you can easily run on a Mac.
posted by tmcw at 10:35 AM on June 10, 2012 [2 favorites]

Hmm - on slight reflection, I realize that my own excessive paranoia may have lead to poor advice.

If you're the sort of person who would be comfortable either (a) keeping a text document on your computer with a list of all the passwords you type into a keyboard or (b) allowing your browser to remember all your passwords without a master passphrase, then ignore everything I said. (Arguably, both are entirely reasonable. If your pc is compromised, you're likely to be screwed no matter what.) In that case, pick whichever commercial software vendor seems least likely to go out of business soon, and have fun.

On preview, minute-agent looks awesome. That's a much better solution.
posted by eotvos at 10:55 AM on June 10, 2012

@eotovos: for that reason and others, minute-agent just counts keystrokes rather than recording them. If you're handy with Objective-C, you can mod it to make an actual-key-logger really easily. I did so and use it every once in a while for different analysis, but am keeping it unreleased due to the potential usage etc.
posted by tmcw at 12:53 PM on June 10, 2012

« Older Do exterminators often have to exterminate for...   |   Much more pain post spine decompression, why? Newer »
This thread is closed to new comments.