Skip to content

ibernal1815/python-keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Python Keylogger with Remote C2 Server

This project demonstrates a modular Python keylogger with optional screenshot capture and encrypted keystroke transmission to a Flask-based C2 server. It was developed strictly for educational, ethical, and red-team lab use.


🔧 Features

  • ✅ Cross-platform keylogging via pynput
  • 🌐 Secure client-server communication via HTTP POST
  • 🔐 Optional AES-encrypted logs
  • 🖼️ Optional screenshot capture of active window
  • ⚙️ Modular config system and sandbox test script

🧠 Purpose

This project is intended to demonstrate how endpoint data exfiltration can occur in adversarial simulations, helping security professionals develop better detection and mitigation strategies.

Tested only on self-owned systems in virtualized environments (macOS and Linux).


📁 Project Structure

python-keylogger/

  • keylogger/
    • logger.py # Keylogging logic
    • config.py # Configurable options
    • utils.py # Encryption, screenshots
    • init.py # Extra metadata
  • c2_server/
    • server.py # Flask server endpoint
    • logs/ # Log file storage
  • scripts/
    • run_local_test.py # Safe local test mode
    • client_stager.py # Simulated payload drop
  • screenshots/ # Screenshots from demo
  • .gitignore
  • README.md

About

Modular Python keylogger with AES-encrypted keystroke transmission, screenshot capture, and a Flask-based C2 server — built for adversarial simulation and endpoint detection research.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages