Commander: command and control (C2) server
Commander
Commander is a command and control framework (C2) written in Python, Flask, and SQLite. It comes with two agents written in Python and C.
Features
- Fully encrypted communication (TLS)
- Multiple Agents
- Obfuscation
- Interactive Sessions
- Scalable
- Base64 data encoding
- RESTful API
Agents
- Python 3
- The python agent supports:
- sessions, an interactive shell between the admin and the agent (like ssh)
- obfuscation
- Both Windows and Linux systems
- download/upload files functionality
- The python agent supports:
- C
- The C agent supports only the basic functionality, for now, the control of tasks for the agents
- Only for Linux systems
Flows
Below you can find a normal flow diagram
Normal Flow
In the case where the environment experiences a major failure like a corrupted database or some other critical failure, the re-registration mechanism is enabled so we don’t lose our connection with our agents.
More specifically, in the case where we lose the database, we will not have any information about the uuids that we are receiving thus we can’t set tasks on them, etc… So, the agents will keep trying to retrieve their tasks and since we don’t recognize them we will ask them to register again so we can insert them in our database and we can control them again.
Below is the flow diagram for this case.