Linux keyloggers

cool_penguin_smallKeyloggers are useful when you want to record the keys pressed on your system. These utilities keep monitoring the keyboard device and log any key pressed. We will explore some keyloggers for Linux in this article.

1. logkeys

logkeys is the most well-known among Linux keyloggers and is available in the default repositories of many distros. The software is a bit old but still works (with best results for 105-key PC keyboards without Asian extensions). The logs are well formatted with timestamps.

To install on Ubuntu:

$ sudo apt-get install logkeys

To use logkeys, download the keymap closely matching your language and keyboard. I used en_GB.map.

Run logkeys as sudoer:

$ sudo logkeys -s -m en_GB.map -o ./keys
// For US keymap
$ sudo logkeys -s -u -o ./keys

logkeys options:

-s : start
-m : specify keymap
-o : log file path
-u : use en_US keymap
-d : device file
-k : kill
-? : help

You can start logkeys at system startup.

2. SKeylogger

Stands for Simple key logger. The utility is written in C and keeps reading the keyboard input device for new entries.

To install on Ubuntu:

$ git clone https://github.com/gsingh93/simple-key-logger
$ cd simple-key-logger
$ make

Run SKeylogger as root:

$ sudo ./skeylogger

The default log file is /var/log/skeylogger.log. SKeylogger supports few options:

-h : help
-l : log file path
-d : device file (/dev/input/eventX)

3. keysniffer

My own kernel module to log pressed keys in debugfs.

2 thoughts on “Linux keyloggers”

  1. does anyone really try these? ive tried the 4 most talked about ones and nothing. zilch.zip. nyet. they dont work at all or atleast reliably. if anyone is running ubuntu 14.04 and has recently gotten any keylogger to work, show me. because i say they all suck. and i am not going to make one just to test some tcl scripts. where are all the evil nerds when you need them? do i have to beg the NSA for one?

    1. This is the author of keysniffer (the third and software on the list). Did you try it? It works on all kernels. You just need to compile it on your system. Do raise a bug in the project’s GitHub page if you find any issue.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s