██╗ ██╗ █████╗ ██████╗ ██████╗ ██╗ █████╗ ██████╗██████╗
██║ ██║██╔══██╗██╔══██╗██╔══██╗██║██╔══██╗██╔════╝╚════██╗
███████║███████║██████╔╝██████╔╝██║███████║██║ █████╔╝
██╔══██║██╔══██║██╔══██╗██╔═══╝ ██║██╔══██║██║ ██╔═══╝
██║ ██║██║ ██║██║ ██║██║ ██║██║ ██║╚██████╗███████╗
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚══════╝This repository contains a Python-based proof of concept (PoC) for a lightweight and stealthy Command and Control (C2) framework named HarpiaC2.
It demonstrates how a bot client can connect to a central operator (C2 server), receive remote shell commands, execute them on the infected machine, and return the output securely.
HarpiaC2 simulates a real-world Command and Control scenario — typically used in Red Team operations and botnet control structures. Bots (clients) connect to the C2 server and await instructions.
- The server listens for incoming bot connections.
- The bot client connects, authenticates via a secure key exchange, and awaits OS-level commands.
Once connected, operators can interact with bots, execute shell commands remotely, and receive results in real time.
The screenshot shows:
- Left: C2 operator issuing commands
- Right: Bot client executing and returning the result
- Python 3.x
- Socket Programming (
socket) - Command Execution (
subprocess) - Secure AES Encryption with DH Key Exchange (
cryptography) - ANSI Coloring with
colorama
HarpiaC2/
├── multi_c2_server.py # Main C2 controller (multi-bot)
├── bot_client.py # Bot implant/client
├── c2_console.py # Legacy console (single bot mode)
├── modules/
│ ├── commands.py # System info and command execution
│ └── recon.py # trigger commands
├── utils/
│ ├── aes_crypto.py # AES encryption layer
│ ├── key_exchange.py # Diffie-Hellman key exchange
│ └── helpers.py # Banners, logging, utils
├── assets/
│ └── image/
│ └── print_screen_terminal.png
├── logs/ # Command logs per bot
├── .gitignore
└── README.mdOpen a terminal and run:
python multi_c2_server.pyOn another machine or terminal, run:
python bot_client.pyThe bot will connect automatically, perform key exchange, and await commands.
- Multi-bot connection support ✅
- Encrypted communication (AES/DH) ✅
- Command execution with output ✅
- Terminal logging by bot ✅
- Persistent installation option ✅
- Easy to expand and customize ✅
© 2025 – iKenpachi | Projeto HarpiaC2 🦅
