⚠️ Authorized Use Only: This project is intended strictly for educational purposes and controlled laboratory environments where you own or have explicit permission to access all systems involved.
This project demonstrates a Python-based client-server architecture for remote communication and command execution in an authorized testing environment.
The project consists of three main components:
c2_server.py— Handles incoming client connections.payload.py— Client-side application that connects to the server.client.py— Interface used to interact with connected clients.
Before running the project, make sure Python is installed on your system.
The following Python packages are required:
requestsflaskprompt_toolkit
git clone https://github.com/engrtaimooor/Remote-Reverse-Shell
cd Remote-Reverse-ShellCreate a virtual environment:
python3 -m venv c2_envLinux/macOS:
source c2_env/bin/activateWindows:
c2_env\Scripts\activatepip install -r requirements.txtOpen the first terminal and run:
python c2_server.pyThe server listens for incoming connections on port 4444.
Open a second terminal and run:
ngrok http 4444Ngrok will generate a public forwarding address.
Copy the generated address and update the connection configuration in:
payload.pyclient.py
Use only systems and networks where you have explicit authorization.
Open a third terminal and run:
python client.pyOnce an authorized client connects to the server, the connection will appear in the server terminal.
The client interface can then be used to interact with the connected system within the scope of the authorized lab environment.
The Python application can optionally be packaged as a Windows executable for deployment in an authorized testing environment.
Install the tool:
pip install auto-py-to-exeRun:
auto-py-to-exeThis provides a graphical interface for converting Python applications into executable files.
Install PyInstaller:
pip install pyinstallerBuild the executable:
pyinstaller --onefile --noconsole payload.pyThe generated executable will be available in the dist directory. Rename it from payload.exe to something else like accountdetails.txt
.
├── c2_server.py
├── payload.py
├── client.py
├── requirements.txt
└── README.md
This project is created for educational purposes and authorized security testing only.
Do not use this software to access computers, networks, or systems without explicit permission from their owners. Unauthorized access to computer systems may be illegal and unethical.
The developer assumes no responsibility for misuse of this project.