🖥️ Educational Python RAT (Server & Client)
🚀 Features
Client/Server communication via TCP sockets
AES (Fernet) encrypted communication using cryptography
Command execution on the client system
System information reporting (hostname, username, OS, current directory)
Basic heartbeat check to keep connection alive
Multi-threaded server (supports multiple clients)
📦 Requirements
Python 3.8+
cryptography library
Install dependencies:
pip install cryptography
🛠 Usage 1️⃣ Start the Server
Run the server with:
python rat_server.py <encryption_key> <bind_ip> <bind_port>
Example:
python rat_server.py mysecretkey 0.0.0.0 4444
2️⃣ Start the Client
Run the client with:
python rat_client.py <encryption_key> <server_ip> <server_port>
Example:
python rat_client.py mysecretkey 127.0.0.1 4444
The encryption key must match on both server & client.
This project is intentionally simplified (e.g., fixed salt for KDF, limited error handling).
Do not deploy this on production systems.
Available Commands: dir or ls - List directory contents
cd - Change directory
ipconfig or ifconfig - Network information
whoami - Current user
pwd or cd - Current directory
exit or quit - Close connection