This project is a remote access trojan with a client-server architecture for multithreaded remote command execution and communication. It consists of a server that can manage multiple client connections and send various commands to be executed on the client machines.
- Server
- Client
- Shared Library
- Multi-client support
- Remote command execution (PowerShell commands)
- Echo functionality
- Message popup on client machines
- Screenshot capability
- Client listing
- Error handling and logging
To start the server:
- Navigate to the server directory
- Run
cargo run
The server will start and listen for incoming connections on 127.0.0.1:8080
.
Note: If you want to make the server accessible from other machines:
- Change the binding address in
main.rs
from127.0.0.1:8080
to0.0.0.0:8080
. - Ensure port 8080 (or whichever port you choose) is open in your firewall.
- If you're behind a router, set up port forwarding for port 8080 to your local machine's IP address.
Be aware of the security implications of exposing your server to the network.
To start a client:
- Navigate to the client directory
- Run
cargo run
for debug mode orcargo run --release
for release mode
The client will attempt to connect to the server at 127.0.0.1:8080
. If the connection fails, it will continuously retry.
Important notes:
- If you're connecting to a server on a different machine, you need to change the IP address in the client's
main.rs
file to the public IP address of the server. - When compiled in release mode (
cargo run --release
orcargo build --release
), the client will run silently in the background without opening a console window. This behavior is achieved through the#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
attribute inmain.rs
.
Once the server is running and clients are connected, you can use the following commands:
echo <ip> <message>
: Send a message to a specific client and receive an echo backechoall <message>
: Echo a message to all connected clients (generally intended for ensuring client connectivity)run <ip> <command>
: Execute a PowerShell command on a specific clientpopup <ip> <message>
: Display a popup message on a specific client's machinescreenshot <ip>
: Take a screenshot of a specific client's screenlist
: List all connected client IPshelp
: Show this help message
echo 192.168.1.100 Hello, client!
run 192.168.1.100 Get-Process
popup 192.168.1.100 Your attention is required!
list
main.rs
: Server initialization and main loopclient.rs
: Client struct and handlingcommand_handler.rs
: Parsing and execution of commandstools.rs
: Implementation of various command functionalitiesbanner.rs
: ASCII art banner displayerror.rs
: Error handling and custom error typestypes.rs
: Type definitions used across the projectlib.rs
: Shared functionality between client and server
The project is currently functional with all features working. However, the project remains in development, and future changes are coming.
- Implement secure authentication and encryption beyond basic XOR
- Add more robust error handling and recovery mechanisms
- Implement a more user-friendly interface for the server
- Add support for file transfers between server and clients
Contributions to improve the project are welcome. Please ensure to follow good coding practices and add appropriate tests for new features.
This software is provided as-is, without any guarantees or warranties. Use at your own risk.