Keylogging on Linux
I was trying to track down a keylogger that would work on Linux and I was having a tough time. Finally I discovered lkl which records all input from port 0×60 (which is apparently the keyboard port number). It’s pretty simple to run but now I have to decide how I want to make this thing run at boot time. I was going to use the SysV-Init editor that comes with KDE but apparently that’s not what I’m looking for. Off to dig some more…
Right, I made a script and put it into /etc/init.d Hope that solves my problems. We’ll see if this actually works.
[later that day]
Well, the keylogger is working more or less. There were some problems where it told me that lkl was looking for a keymap file that didn’t exist. I had to manually copy the maps from the source package to /usr/local and then point lkl in that direction. Even then it appears the us_kmUP is malfunctioning. us_kmALT and us_km seem to be doing fine, but the uppercase map is spewing garbage into my log file.
I’ve decided not to worry about the garbage. It’s too much effort to investigate this problem for such a low priority thing. However, now I’ll have to decode everything I want to read by educated guessing and doing more keylogging to see what letters turn into what junk.
If anyone finds a better keylogger for Linux (maybe one with a more functional keymap), drop me a line in the comments. I’d totally appreciate the help - and so would all the other people who come here looking for answers.