A custom, lightweight Command and Control (C2) framework designed to demonstrate asynchronous communication between a central web dashboard and native Windows C++ agents.
Disclaimer: This project was developed strictly for educational purposes, security research, and authorized testing. Do not use this software on systems where you do not have explicit permission.
- Asynchronous C2 Architecture: Implements a pull-based beaconing mechanism, eliminating the need for open ports on the target machine.
- Native Windows Agent: Written in C++ utilizing the native
WinHTTPAPI for stealthy, low-level network communication. - Secure Operator Dashboard: A Vanilla JS Single Page Application (SPA) secured with JSON Web Tokens (JWT) to prevent unauthorized access.
- RESTful Python Backend: Built with Flask and SQLAlchemy (SQLite) serving as the central State Machine and data broker.
- Real-Time Terminal UI: Features a dynamic, auto-scrolling terminal interface for executing commands and viewing outputs seamlessly.
The framework operates on a decoupled architecture, ensuring the operator and the target never communicate directly:
- The Agent (C++): Runs on the target Windows machine. It registers itself with the server and periodically polls (beacons) the
/tasks/<agent_id>endpoint to retrieve pending commands. - The Server (Python/Flask): Acts as the intermediary. It validates operator JWTs, stores commands in the SQLite database as
pending, and updates them tocompletedonce the agent posts the execution results back. - The Dashboard (JS/HTML): The operator's interface. It continuously polls the secure API to provide a real-time view of online agents and their execution history.
- Backend: Python 3, Flask, SQLAlchemy, PyJWT
- Frontend: HTML5, CSS3, Vanilla JavaScript (Fetch API)
- Agent: C++, Windows API (WinAPI), WinHTTP
- Database: SQLite

- Python 3.8+
- Visual Studio 2019/2022 (with C++ Desktop Development workload)
Clone the repository and set up the Python environment:
git clone https://github.com/hananelk26/EchoLink-C2-Framework.git
cd EchoLink-C2-Framework/Serverpip install flask flask-sqlalchemy pyjwtpython app.pydatabase automatically and listen on http://0.0.0.0:5000.
- Open
Agent.slnin Visual Studio. - Set the build configuration to Release | x64.
Note: Ensure the IP address in the
Agent.cppWinHTTP configuration matches your C2 server's IP.
- Build the solution. The compiled
.exewill be generated in thex64/Releasefolder.
- Open your web browser and navigate to
http://localhost:5000. - Log in using the default operator credentials (configurable in
app.py). - Execute the compiled C++ Agent on a Windows machine.
- The agent will appear as Online in the left sidebar.
- Select the agent and use the terminal interface to send standard Windows CMD commands (e.g.,
whoami,ipconfig,dir).
Currently, the agent communication is performed over standard HTTP (Plaintext). Future iterations will include XOR-based payload encryption and HTTPS (TLS) support for evasion and secure transit.
