Skip to content

Repository files navigation


Consortium Logo


Modern C2 framework built for extensibility

Python Version Pytest

Home  ·  Getting Started  ·  Server Usage  ·  Client Usage
Server API  ·  Framework API  ·  Framework Reference  ·  Scripts

Consortium is a programming language agnostic, and networking protocol agnostic command and control (C2) framework that is designed to be collaborative, highly extensible, and modular. The framework ships with its own listeners and agents while also allowing users to rapidly develop their own highly customized listeners and agents.

Caution

Consortium is actively being developed and is currently considered to be in the alpha phase of development. As such it should be noted that:

  1. Backwards incompatible/breaking changes may be made at any time.
  2. The framework is currently not feature-complete.
  3. Documentation may be lacking and incomplete in some areas.

Feel free to raise any problems, feature requests, or bug reports via the GitHub issues section.

Features

  • Asynchronous multiplayer/multiserver support: Multiple clients can connect to the same server to perform all C2 related operations, including the sharing of agent sessions. Control RBAC permissions via user roles.
  • High extensibility and automation, externally and natively: Programmatic automation is possible through the server's REST API or websockets events API. Alternatively, users can write plugins and event hooks that interact directly with the server's internal services.
  • Language-agnostic modular listener-agent design: Consortium ships with its own listeners and agents. Custom listeners and agents can be added to the framework. Agents can be written in any language while listeners can be written in python to natively interact with the server, or written in a different language to interact with the server through its REST API.

Getting Started

Consortium can be installed manually on the host, or run in Docker. Pick one of the two paths below. Both read their configuration from the same data/ directory.

Manual install Docker install
Requires Python 3.14+, uv, Git, Docker Docker, Git
Best for Developing the framework or writing components Running a server without provisioning Python

Full instructions for both are in the installation documentation. A manual install can also be done for you by a script.

Automatic Installation

The install scripts in scripts/ perform a manual install for you. They report which prerequisites are present and which are missing, ask before installing the missing ones with winget (Windows), apt (Debian based Linux), or Homebrew (macOS), and then install Consortium's dependencies.

git clone https://github.com/not-sekiun/Consortium.git
cd Consortium

Then run the script for your platform from the repository root.

Windows

powershell -ExecutionPolicy Bypass -File scripts\install.ps1

Linux and macOS (as your normal user, not with sudo)

bash scripts/install.sh

Both take --check-only (-CheckOnly on Windows) to report without installing anything, and --yes (-Yes) for an unattended run. Afterwards, start the server and client as shown under Manual Installation.

Manual Installation

Consortium requires Python 3.14+ and uses the uv package manager to handle its dependencies. Git is recommended for installing and updating the framework. Docker is required by bundled agent generators that compile their payloads inside a container.

  1. Install Python 3.14+
  2. Install uv
  3. Install Git
  4. Install Docker

Important

Make sure your installed tools are visible on your system PATH, and that the Docker engine is running before starting an agent generator that needs it.

Note

Docker is only needed for agent generators that compile in a container. The server, client, listeners, plugins, event hooks, and every other agent run without it.

Clone the repository and install dependencies.

git clone https://github.com/not-sekiun/Consortium.git
cd Consortium
uv sync --all-packages

The Consortium C2 framework runs on a client-server model. Start the server first before starting any compatible client to connect to the server.

Start the Consortium server. By default, it binds to 0.0.0.0:9999.

uv run consortium.py server

Afterwards, start the Consortium client. By default, it connects to 127.0.0.1:9999

uv run consortium.py client

To update, pull the latest changes and install any new dependencies.

git pull
uv sync --all-packages

Docker Installation

Requires Docker (Docker Engine on Linux, or Docker Desktop on Windows and macOS) and Git. Python and uv are not needed on the host.

Clone the repository, then build the image and start the server. The API is published on port 9999.

git clone https://github.com/not-sekiun/Consortium.git
cd Consortium
docker compose up -d --build

Once the server reports healthy under docker compose ps, connect with the client, which runs from the same image.

docker compose run --rm client

Note

docker compose up starts the server only. The client is declared under a Compose profile because it needs an interactive terminal, which docker compose run provides.

The data/ directory is mounted from the host, so configuration, payloads, agents, and logs are shared with a manual install and survive docker compose down. Listeners bind their ports after the container has started, so publish the range you intend to use by uncommenting the port range in docker-compose.yml.

To update, pull the latest changes and rebuild.

git pull
docker compose up -d --build

Documentation

Complete Framework Documentation and Self-Hosted Documentation

Warning

The current documentation page is still heavily a WIP and is largely incomplete.

Complete documentation is available at the official Consortium documentation site.

Alternatively, you can install dependencies to host and view the documentation locally. From the project root folder, run:

uv sync --all-packages --group docs
uv run zensical serve

Server REST API Documentation

Note

The REST API documentation is only accessible to the local host.

Automatically generated REST API endpoint documentation is available at /doc and /redoc from the server's root URL.

Start the server first.

uv run consortium.py server

Then open a web browser to either URL.

REST API documentation at /docs (http://localhost:9999/docs by default)

REST API documentation for "docs" endpoint

REST API documentation at /redoc (http://localhost:9999/redoc by default)

REST API documentation for "redoc" endpoint

Server Events Websocket API Documentation

The Consortium server provides a WebSocket Events API for server-initiated push events. Complete documentation is located at the official Consortium documentation site

WebSocket API documentation for zensical

Alternatively, to host and view this documentation locally, refer back to this section

Client Documentation

There are several ways to get help information and command documentation within the client.

  1. General help menu: To view all commands for a particular interpreter in the client type help.
  2. Command summary: To view the summary for a specific command, which includes all of its arguments, type help <command>.
  3. Command help: To get comprehensive help for a specific command, including any built-in examples, type <command> --help or <command> -h.

Client help demo

Contributing

I am currently not accepting any code contributions to the Consortium framework, the current code base is too unstable. However, I am accepting feature requests, bug reports, and other issues through the GitHub issues section.

Credits

This project makes heavy use of the following libraries and frameworks.

  • FastAPI for the REST API and websockets server.
  • Prompt-toolkit for the client CLI interface.
  • Rich for modernizing and beautifying displays in the terminal
  • Websockets for the event based communication for the client.

Many other pre-existing C2 frameworks provided the inspiration and motivation to create this one.

About

Consortium is a modular command-and-control framework for adversarial simulation with a language-and-protocol-agnostic orchestration core.

Topics

Resources

Stars

328 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages