DISCLAIMER: THIS PROJECT WAS MADE PURELY FOR LEARNING PURPOSES. I SHALL NOT BE HELD RESPONSIBLE FOR ANYTHING THE PROJECT IS USED FOR. USE AT YOUR OWN RISK.
A simple keylogger proof of concept built with python for the course Information Security(CSL 466). The project uses:
Features:
-
Cross-platform support
-
Requires admin requirements on linux machines.
-
Install Poetry
Follow the instructions at https://python-poetry.org/docs/#installation
-
Clone this repository and cd into the project directory
git clone https://github.com/blakeinstein/keylogger && cd keylogger
-
Set up env using poetry
poetry install
-
Read the help document
poetry run keylogger -h
-
Run the keylogger with default arguments
poetry run keylogger
-
Install python 3.10
-
Clone this repository and cd into the project directory
git clone https://github.com/blakeinstein/keylogger && cd keylogger
-
(Optional) Setup a virtual env
-
Install dependencies
pip install -r requirements.txt
-
Read the help document
python keylogger/main.py -h
-
Run the keylogger with default arguments
python keylogger/main.py
The project works
-
On Linux, by reading
/dev/input/input*
, hence the root requirment. -
On Windows, using a keyboard hook available from the user32 lib available in
user32.dll
via the win32api. -
On MacOS, using a similar platform library called carbon. (Untested)
On every new key stroke, the program simply logs the key, if the key matches the terminate key, the program exits unhooking all created hooks.