set AGENT_ID=agent-win01 set API_TOKEN=5GwBz6jLHUwwxStu705UGQAMElgb6tjFBz76dW1tZzc set CONTROLLER_URL=http://192.168.10.8:8000
This project provides a lightweight remote Linux shell system with:
- controller_secure.py – FastAPI backend
- agent_terminal (C++ binary) – Executes commands on the remote machine
- remote_shell_secure_tunnel.py – Interactive operator client
Built for private networks, lab automation, and controlled testing.
malware-analysis-/
│
├── controller_secure.py
├── remote_shell_secure_tunnel.py
├── agent_terminal_updated.cpp
├── agent_terminal # compiled binary
├── controller.db
└── README.md
Install dependencies:
sudo apt update
sudo apt install g++ libcurl4-openssl-dev nlohmann-json3-dev -y
pip install fastapi uvicorn requestsexport API_TOKEN="5GwBz6jLHUwwxStu705UGQAMElgb6tjFBz76dW1tZzc"
python3 controller_secure.pyExample:
[SERVER START] private listening on 127.0.0.1:8000
g++ agent_terminal_updated.cpp -o agent_terminal -lcurl -std=c++17export AGENT_ID="agent-001"
export API_TOKEN="5GwBz6jLHUwwxStu705UGQAMElgb6tjFBz76dW1tZzc"
export CONTROLLER_URL="http://127.0.0.1:8000"
./agent_terminalExample output:
[AGENT] Starting. ID=agent-001, OS=Linux
export API_TOKEN="5GwBz6jLHUwwxStu705UGQAMElgb6tjFBz76dW1tZzc"
python3 remote_shell_secure_tunnel.pyYou should see:
[INFO] Controller: http://127.0.0.1:8000
[INFO] Target agent: agent-001
[INFO] Detected agent OS: Linux
Remote shell started. Type 'exit' to quit.
> ls
> pwd
> cat /etc/hostname
> ifconfig
Agent will run them and send results back to controller.
- System works on local / private networks only
- Uses API key authentication
- Do not run agent as root
- Intended for testing, labs, and research only
| Component | Function |
|---|---|
| controller_secure.py | Secure FastAPI backend |
| agent_terminal.cpp / agent_terminal | Remote agent executing commands |
| remote_shell_secure_tunnel.py | Interactive command sender |
| controller.db | (Optional) minimal storage |