Skip to content

Latest commit

 

History

History
243 lines (189 loc) · 6.94 KB

quick_start_guide.md

File metadata and controls

243 lines (189 loc) · 6.94 KB

Educational RAT - Quick Start Guide

🚀 Quick Start

This guide will help you get the Educational RAT running quickly for your CyberSec class demonstration.

Prerequisites

  • Python 3.8+ installed on both server and client machines
  • Network connectivity between server and client
  • macOS systems (commands optimized for macOS)

Step 1: Setup (2 minutes)

# Download or clone the Educational RAT files
# Run the setup script
python3 setup.py

What setup.py does:

  • ✅ Checks Python version compatibility
  • ✅ Verifies required modules are available
  • ✅ Creates necessary directories (logs/, docs/)
  • ✅ Makes scripts executable
  • ✅ Displays usage instructions

Step 2: Start the Server (1 minute)

On the instructor's machine:

python3 server.py

Server 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...

Step 3: Start the Client (1 minute)

On the student's machine:

python3 client.py

Client 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...

Step 4: Execute Commands (Interactive)

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 # help

Example 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"
}
--------------------------------------------------

🎓 Educational Demonstration Ideas

1. Network Communication Lesson

  • Show the client-server connection process
  • Demonstrate authentication handshake
  • Explain TCP socket communication

2. System Administration Lesson

  • Use sysinfo to gather system details
  • Use ls to explore file systems
  • Use ps to monitor running processes
  • Use df to check disk usage

3. Security Concepts Lesson

  • Discuss authentication mechanisms
  • Explain command whitelisting for security
  • Show logging and monitoring importance
  • Demonstrate safe command execution

4. Ethical Hacking Lesson

  • Explain the difference between this tool and malicious RATs
  • Discuss authorization and legal boundaries
  • Show how to detect such tools
  • Practice responsible security testing

🔧 Troubleshooting

Connection Issues

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

Authentication Failures

Problem: Authentication failed Solution:

  • Verify server and client are using same port
  • Check that authentication key matches
  • Restart both server and client

Command Execution Errors

Problem: Commands fail or timeout Solution:

  • Check that commands are in whitelist
  • Verify client has necessary permissions
  • Check system resources

Python Import Errors

Problem: Module not found errors Solution:

  • Ensure Python 3.8+ is installed
  • Check that all required modules are available
  • Run python3 setup.py to verify dependencies

📁 File Structure

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

⚠️ Important Reminders

  1. Educational Use Only: This tool is for learning purposes
  2. Authorization Required: Only use on systems you own or have permission to test
  3. Legal Compliance: Follow all applicable laws and regulations
  4. Ethical Use: Practice responsible security testing
  5. No Persistence: Tool doesn't install or persist on systems
  6. Visible Activity: All actions are logged and visible

🎯 Learning Outcomes

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

🚀 Next Steps

  1. Review Documentation: Read README.md and docs/technical_documentation.md
  2. Experiment Safely: Try different commands and observe behavior
  3. Modify Code: Add new educational commands or features
  4. Security Analysis: Analyze the tool's security features and limitations
  5. 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.