Show HN: keysniffer – Linux kernel module to log pressed keys in debugfs
github.com
github.com
> keysniffer is intended to track your own devices and NOT to trespass on others.
This sounds inconsistent...
What's the threat model you have where evil kernel modules are installed on your machine, yet they don't do things like siphon off your files, read passwords out of the memory of running processes, add entries to /root/.ssh/authorized_keys if and only if the current process's name is "sshd", etc.?
Antilogging is but one tiny component of defense in depth and worth investigating if you're doing anything interesting with a computer. 'Doing something interesting' although is not to be misconstrued as 'doing something bad'. It just means how can any meaningful work get done if low hanging fruit like keystrokes can (and are) being siphoned off?
It helps to see how machines are actually being compromised like this...I've seen it on my machine and sometimes entire office building are being siphoned like this. I typically report this, but I would much rather get to the root as to how it's possible in the first place :(
For the pedants:
Some more advanced antiloggers are minus ring-0 and physically remap the keys so that `A` doesn't mean A at all. Infact if I typed this, a load of garbage would be displayed on the screen. The only reason we see valid output is because of a software abstraction layer translating the 'garbage' back to it original symbolic meaning. This is how we thwart such a kernel logger as described in this thread.
(/dev/input/XXXX also gives more structured output than just raw key events IIRC.)