Keystroke logging, often referred to as keylogging or keyboard capturing, is the action of recording (logging) the keys struck on a keyboard, typically covertly, so that a person using the keyboard is unaware that their actions are being monitored. Data can then be retrieved by the person operating the logging program. A keystroke recorder or keylogger can be either software or hardware.
While the programs themselves are legal, with many designed to allow employers to oversee the use of their computers, keyloggers are most often used for stealing passwords and other confidential information.
Keylogging can also be used to study keystroke dynamics or human-computer interaction. Numerous keylogging methods exist, ranging from hardware and software-based approaches to acoustic cryptanalysis.
Source: https://en.wikipedia.org/wiki/Keystroke_logging
As a student who likes the field of security, I always wondered how one could programmatically implement such a tool. The tool is a simple, well commented project for anyone who is purely interested in the educational part only!! like me. Therefore, I bear no responsibility, in case someone, somehow, uses this tool, for any malicious purpose. I hope you like my project and found it interesting. Also this program does not send any of the keystrokes over a network, it only stores them in a local file.
https://docs.github.com/en/site-policy/acceptable-use-policies/github-active-malware-or-exploits
The following packages must be installed.
sudo apt-get install build-essential cmake git gcc
First download the program from GitHub and go to the simple-keylogger folder.
% git clone https://github.com/constarg/simple-keylogger.git
% cd simple-keylogger/
After installation the program must be built. In order to build the program, the following instructions must be
followed.
% mkdir build
% cd build/
% cmake ../
% make
The cmake should be from version 3.20 and above, if you do not have this version please go to the following site and download the latest version: https://cmake.org/download/
After this the program will be installed and ready to run.
- Auto detect keyboard.
- Work with multiple keyboards.
- Detect any new keyboard on air.
- Linux
Captured keystrokes stored at ~/.local/share/keylogger/logs/