Disclaimer: This is purely for educational purposes only.
HTTPyLogger
This is my implementation of a keylogger in Python that exfiltrates the logged keystrokes via GET requests to the attacker’s C2 server. The code can be found here
Setup
Run:
1
$ pip3 install -r requirements.txt
Usage
Running the script requires root access:
1
$ sudo ./HTTPyLogger.py
Change the URL in the script to the address of the C2 server. in my case I’ll be demonstrating it with 127.0.0.1:8080.
Setup the HTTP server:
1
$ sudo python3 -m http.server 8080
To generate traffic, start typing as usual. When the “Enter” key is pressed, a base64 encoded string of the logged keys will be sent to the attacker’s server
We can now take these strings, decode them, and access the victim’s keystrokes: