Keylogging Software

Inspired by Stephen Wolfram’s post a while back, I would like to install a keylogging software on my computer as well to track all my keystrokes.

Most of the software that does this kind of thing is spyware designed at stealing people’s information or surveilling kids/spouses/employees. Obviously, I’m a bit hesitant of installing any of that. They also tend to be very expensive.

The best review of keylogging software I found is here:
http://foliovision.com/2010/01/keyloggers-mac-os-x. But the guy has a different use case (recovering writing in the browser when something goes wrong) so I don’t know how well it translates for self-tracking. It is also a few years old already.

The two main program he recommends are the reasonably priced BackTrack and the open-source logkext.

Backtrack has pretty bad reviews and judging from his responses to some issues the developer seems to be a bit unpleasant. LogKext is on Github but it doesn’t seem well-maintained.

Has anyone had experiences with any of these programs? Or used other ones? Perhaps written their own?

I have written a rough, self-tracking-focused keylogger as part of the Telepath project that Yoni and I were working on: http://www.nickwinter.net/telepath

The Telepath experiment is on hold right now, but the keylogging works. It also captures mouse movements, focused application titles, accelerometry, and light levels, and it can take webcam photos if you really want that (although I’d have to enable it for you). My version also really beeps at me when I type bad-writing adverbs and plays the drums whenever the accelerometer notices sharp motion, which I find hilarious, but which is not inflicted on other users. All the log files are stored locally and it doesn’t do any networking. (It does use a small-but-noticeable amount of CPU because I wanted the timing to be extra precise.)

The caveat is that the log files it generates are full of precise timing information, so that it’s not easy to read them–they’re pretty raw and designed for some scripts to process and do machine learning on, so they look like this:

[1371227112.077378,"keyDown","l",0.03542938,0.003984064] [1371227112.082514,"keyDown","e",0.03406112,0.005634338] [1371227112.08862,"keyDown","a",0.03687565,0.003984064] [1371227112.122852,"keyUp","l",0.04016225,0.02455942] [1371227112.145655,"keyDown","r",0.01596336,0.03212055] [1371227112.193424,"keyUp","e",0.02787325,0.003984094] [1371227112.223676,"keyDown","n",0.05326014,0.04559968] [1371227112.243925,"keyUp","a",0.03826929,0.0207018] [1371227112.276419,"keyUp","r",0.03406105,0.003984064] [1371227112.314229,"keyDown","i",0.03542928,0.01992032] [1371227112.32228,"keyUp","n",0.01780682,0.02182162] [1371227112.436801,"keyDown","n",0.03224521,0.006900584] [1371227112.50824,"keyDown","g",0.03856694,0.01736614] [1371227112.516851,"keyUp","i",0.04094877,0.003984064] [1371227112.57439,"keyDown","<space>",0.03020957,0.01690295]

Anyway, if you want, you can download the Telepath app from my website and look at the logs it makes in ~/Library/Application Support/Telepath. It’s only 610 lines of Objective-C, and the keylogging is less than 100 lines of that. Keylogging itself is very easy. Formatting the logs to do what you want is not hard, but everyone wants something different, so you might not find what you want, especially because most people still think keylogging=spyware. If you want to write your own program to do this, I’d be happy to suggest how to do it with some sample code, except I’m going to go get married and run around China for a month, so I’ll be out of touch until mid-July.

I stumbled across this software on Github a while back. Looks interesting, but a bit beyond my technical expertise: SelfSpy

1 Like

Nick,
Thanks for the link to your app. I downloaded it and set it up. The log files are fine. I would just like to have it run and do something with the data at a later point. The only thing I’m slightly worried about is that the log files aren’t encrypted. Although, I guess someone would have to know what they’re looking for to extract passwords from the log files…(btw, how big does that file get after a while?)

Congratulations on the marriage by the way & enjoy China!

And thanks for the offer on helping me to code it myself. I won’t have time until September, but I might get back to you about that after:)

Ernesto,
Thanks for the link! SelfSpy looks absolutely perfect! I’ll set this up as well.

SelfSpy looks pretty sweet–way more effort into that one than mine. That said, I did run into some snags getting it running and didn’t ever get around to fixing it, and a few people were asking about the Telepath tracker app, so in case anyone is interested, I open-sourced it: https://github.com/nwinter/telepath-logger

If you need a keylogger program, you can search the Internet and find many. I have used parental control program of anykeylogger(www.anykeylogger.com),it works well,you can also find other fine programs on the Internet.

Does anyone have suggestions for OS X Mavericks key logging software?