This guide will help you get the Educational RAT running quickly for your CyberSec class demonstration.
- Python 3.8+ installed on both server and client machines
- Network connectivity between server and client
- macOS systems (commands optimized for macOS)
# Download or clone the Educational RAT files
# Run the setup script
python3 setup.pyWhat setup.py does:
- ✅ Checks Python version compatibility
- ✅ Verifies required modules are available
- ✅ Creates necessary directories (
logs/,docs/) - ✅ Makes scripts executable
- ✅ Displays usage instructions
On the instructor's machine:
python3 server.pyServer configuration:
- Host:
0.0.0.0(accept connections from any IP) or specific IP - Port:
9999(default) or custom port - Authentication key: Auto-generated and displayed
Server output example:
=== Educational RAT Server ===
⚠️ FOR EDUCATIONAL PURPOSES ONLY ⚠️
Enter server host (default: 0.0.0.0): 0.0.0.0
Enter server port (default: 9999): 9999
Starting server on 0.0.0.0:9999
Press Ctrl+C to stop the server
=== Educational RAT Server Initialized ===
Server will run on 0.0.0.0:9999
Authentication key: abc123def456789
⚠️ EDUCATIONAL USE ONLY - NOT FOR MALICIOUS PURPOSES
Available commands: sysinfo, ls, pwd, whoami, ps, netstat, df, uptime, help
=========================================
Server listening on 0.0.0.0:9999
Waiting for client connections...
On the student's machine:
python3 client.pyClient configuration:
- Server host: IP address of instructor's machine
- Server port: Must match server port (default: 9999)
Client output example:
=== Educational RAT Client ===
⚠️ FOR EDUCATIONAL PURPOSES ONLY ⚠️
Enter server host (default: 127.0.0.1): 192.168.1.100
Enter server port (default: 9999): 9999
Connecting to server 192.168.1.100:9999
Press Ctrl+C to stop the client
=== Educational RAT Client Initialized ===
⚠️ FOR EDUCATIONAL PURPOSES ONLY ⚠️
This client demonstrates remote access concepts.
==========================================
Connected to server 192.168.1.100:9999
Authentication successful
Client information sent to server
Client started - waiting for commands...
In the server console, try these commands:
# Get system information
RAT> 192.168.1.100:54321 # sysinfo
# List current directory
RAT> 192.168.1.100:54321 # ls
# Show current user
RAT> 192.168.1.100:54321 # whoami
# List running processes
RAT> 192.168.1.100:54321 # ps
# Show connected clients
RAT> 192.168.1.100:54321 # clients
# Show help
RAT> 192.168.1.100:54321 # helpExample server output:
RAT> 192.168.1.100:54321 # sysinfo
Response from 192.168.1.100:54321:
--------------------------------------------------
{
"hostname": "student-macbook",
"os": "Darwin 22.6.0",
"architecture": "64bit",
"processor": "arm64",
"python_version": "3.10.12",
"current_user": "student",
"current_time": "2024-01-15 14:30:25",
"platform": "macOS-13.5-arm64-arm-64bit"
}
--------------------------------------------------
- Show the client-server connection process
- Demonstrate authentication handshake
- Explain TCP socket communication
- Use
sysinfoto gather system details - Use
lsto explore file systems - Use
psto monitor running processes - Use
dfto check disk usage
- Discuss authentication mechanisms
- Explain command whitelisting for security
- Show logging and monitoring importance
- Demonstrate safe command execution
- Explain the difference between this tool and malicious RATs
- Discuss authorization and legal boundaries
- Show how to detect such tools
- Practice responsible security testing
Problem: Client can't connect to server Solution:
- Check that server is running
- Verify IP address and port match
- Check firewall settings
- Ensure network connectivity
Problem: Authentication failed Solution:
- Verify server and client are using same port
- Check that authentication key matches
- Restart both server and client
Problem: Commands fail or timeout Solution:
- Check that commands are in whitelist
- Verify client has necessary permissions
- Check system resources
Problem: Module not found errors Solution:
- Ensure Python 3.8+ is installed
- Check that all required modules are available
- Run
python3 setup.pyto verify dependencies
Educational-RAT/
├── README.md # Main documentation
├── setup.py # Setup script
├── server.py # Command & Control server
├── client.py # Target machine client
├── logs/ # Log files directory
│ ├── rat_server.log # Server activity logs
│ └── rat_client.log # Client activity logs
└── docs/ # Documentation directory
├── technical_documentation.md # Detailed technical info
└── quick_start_guide.md # This file
- Educational Use Only: This tool is for learning purposes
- Authorization Required: Only use on systems you own or have permission to test
- Legal Compliance: Follow all applicable laws and regulations
- Ethical Use: Practice responsible security testing
- No Persistence: Tool doesn't install or persist on systems
- Visible Activity: All actions are logged and visible
After using this Educational RAT, students should understand:
- ✅ How client-server communication works
- ✅ Basic network programming concepts
- ✅ System administration and monitoring
- ✅ Security vulnerabilities and defense
- ✅ Authentication and authorization
- ✅ Ethical hacking principles
- ✅ Python network programming
- ✅ Command-line interface design
- Review Documentation: Read
README.mdanddocs/technical_documentation.md - Experiment Safely: Try different commands and observe behavior
- Modify Code: Add new educational commands or features
- Security Analysis: Analyze the tool's security features and limitations
- Class Presentation: Use the tool to demonstrate security concepts
🎉 Congratulations! You now have a working Educational RAT for your CyberSec class!
Remember: With great power comes great responsibility. Use this tool ethically and legally for educational purposes only.