EDUCATIONAL PURPOSE ONLY - Simplified Remote Access Tool for learning about network security and client-server architecture.
`mermaid graph TB subgraph "Server (Controller)" ServerMain[Server Main] CommandCenter[Command Center] ConnectionMgr[Connection Manager] DataProcessor[Data Processor] end
subgraph "Client (Target)"
ClientMain[Client Main]
SystemInfo[System Info Module]
Screenshot[Screenshot Module]
KeyLogger[Keylogger Module]
FileMgr[File Manager]
end
subgraph "Communication"
Socket[TCP Socket]
Encryption[Encryption Layer]
Protocol[Custom Protocol]
end
ServerMain --> CommandCenter
ServerMain --> ConnectionMgr
ConnectionMgr --> Socket
Socket --> Encryption
Encryption --> Protocol
Protocol --> Socket
Socket --> ClientMain
ClientMain --> SystemInfo
ClientMain --> Screenshot
ClientMain --> KeyLogger
ClientMain --> FileMgr
SystemInfo --> DataProcessor
Screenshot --> DataProcessor
`
`mermaid sequenceDiagram participant C as Client participant S as Server
S->>C: Connection Request
C-->>S: Connection Established
S->>C: Get System Info
C-->>S: System Information
S->>C: Take Screenshot
C-->>S: Screenshot Data
S->>C: Start Keylogger
C-->>S: Keylogger Started
S->>C: Get Keystrokes
C-->>S: Keystroke Data
S->>C: Upload File
C-->>S: File Received
S->>C: Execute Command
C-->>S: Command Output
S->>C: Disconnect
C-->>S: Connection Closed
`
`mermaid flowchart TD A[User Command] --> B{Command Type}
B -->|System Info| C[Gather System Data]
B -->|Screenshot| D[Capture Screen]
B -->|Keylogger| E[Start/Stop Logger]
B -->|File Ops| F[File Operations]
B -->|Shell| G[Execute Shell Commands]
C --> H[Serialize Data]
D --> H
E --> H
F --> H
G --> H
H --> I[Encrypt Data]
I --> J[Send to Server]
J --> K[Server Receives]
K --> L[Decrypt Data]
L --> M[Display Results]
`
RAT/ │ ├── server/ │ ├── server.py # Main server application │ ├── client_handler.py # Handle client connections │ ├── command_center.py # Command interface │ ├── connection_manager.py # Manage active connections │ ├── data_processor.py # Process received data │ ├── encryption.py # Encryption utilities │ ├── logger.py # Server logging │ └── config.py # Server configuration │ ├── client/ │ ├── client.py # Main client application │ ├── system_info.py # Gather system information │ ├── screenshot.py # Screenshot capture │ ├── keylogger.py # Keylogging module │ ├── file_manager.py # File operations │ ├── shell.py # Shell command execution │ ├── persistence.py # Persistence mechanisms │ ├── encryption.py # Client-side encryption │ ├── connection.py # Server connection │ └── config.py # Client configuration │ ├── shared/ │ ├── protocol.py # Communication protocol │ ├── encryption_utils.py # Shared encryption │ ├── data_structures.py # Data structures │ └── constants.py # Shared constants │ ├── utils/ │ ├── logger.py # Logging utilities │ ├── helpers.py # Helper functions │ └── validators.py # Input validation │ ├── docs/ │ ├── ARCHITECTURE.md # Architecture documentation │ ├── PROTOCOL.md # Protocol specification │ ├── INSTALLATION.md # Installation guide │ └── EDUCATIONAL_NOTES.md # Educational notes │ ├── tests/ │ ├── test_server.py │ ├── test_client.py │ ├── test_protocol.py │ └── test_encryption.py │ ├── configs/ │ ├── server_config.yaml │ └── client_config.yaml │ ├── requirements.txt └── README.md
| Module | Function | Description |
|---|---|---|
| System Info | get_system_info() | OS, CPU, RAM, IP info |
| Screenshot | capture_screen() | Take screenshots |
| Keylogger | start_keylogger() | Log keystrokes |
| File Manager | upload/download() | File transfer |
| Shell | execute_command() | Run shell commands |
| Persistence | install_persistence() | Maintain access |
` Message Format: ┌─────────┬─────────┬─────────┬─────────┐ │ Header │ Command │ Length │ Payload │ │ (4 bytes)│ (1 byte)│ (4 bytes)│ (N bytes)│ └─────────┴─────────┴─────────┴─────────┘
Commands: 0x01 - GET_SYSTEM_INFO 0x02 - TAKE_SCREENSHOT 0x03 - START_KEYLOGGER 0x04 - STOP_KEYLOGGER 0x05 - GET_KEYSTROKES 0x06 - UPLOAD_FILE 0x07 - DOWNLOAD_FILE 0x08 - EXECUTE_COMMAND 0x09 - DISCONNECT `
`�ash
git clone https://github.com/Jashwanth33/RAT.git cd RAT
pip install -r requirements.txt
python server/server.py
python client/client.py --server <server_ip> `
This tool is for EDUCATIONAL PURPOSES ONLY.
- This is a simplified version for learning about network security
- Unauthorized access to computer systems is illegal
- Always obtain explicit permission before testing
- The author is not responsible for misuse
- Use only in controlled lab environments
- Understanding client-server architecture
- Network socket programming
- Data serialization and encryption
- System information gathering
- Process and thread management
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - Educational Use Only
Jashwanth - GitHub