Skip to content

Latest commit

 

History

History
77 lines (39 loc) · 1.49 KB

File metadata and controls

77 lines (39 loc) · 1.49 KB

🖥️ Educational Python RAT (Server & Client)

⚠️ Disclaimer: This project is for educational purposes only (learning about sockets, encryption, and client-server communication). Do NOT use it on systems you don’t own or have explicit permission to test. Unauthorized use of RATs is illegal.

🚀 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

⚠️ Security Notes

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