
HTTP-based command and control server with end-to-end encryption, agent management, and a built-in web frontend for sending commands and viewing outputs.

$\textcolor{red}{\text{THIS TOOL IS FOR ETHICAL USE ONLY!}}$
Mothership C2 is a command and control server written in python
here is a sample screenshot of the frontend. Builtin terminal and way for creating and deleting agents! To run the frontend go into webapp and run docker compose up
documentation for the API
All endpoints for the client side require the admin JWT.
/api/configconfigure the database if database is on another host other than the default
{
"host": "localhost",
"port": "6379",
"db": "0"
}
example response:
{"response": "config updated!"}
/api/db/priv_keyget the private key for the database to allow for decrypting of command responses.
Example response:
{"response": "server private key"}
/api/connections/<agent_id>/commandsend a command to an agent.
{
"command": "string",
"directory": ""
}
Example output:
200
/api/connections/listlist all connections in the database.
Example response:
{"response": ["agent1", "agent2"]}
/api/connections/<agent_id>/outputGet the output of the command.
Example response:
{"response": decrypted}
/api/connections/<agent_id>/closeClose a connection with an agent.
Example response:
{"response": "deleted agent123!"}
/api/connections/createCreate a new agent ID for a new agent to connect with.
Example response:
{"response": "a52a7cca-5ca9-46ed-98c0-3ee694a97e45"}
/api/connections/<agent_id>/infoGet info on a connection such as OS, public key, command, command output, command history, server side public key.
Example response:
{"response":
{
"history": "",
"OS": "linux",
"pubKey": "0x000000",
"serverKey": "0x00000"
}
}
/api/connections/registerRegister an agent
{
"hashedID": "string",
"public_key": "string",
"target_os": "string"
}
/api/connections/<hashed_agent_id>/commandAgent gets shell command to execute. Commands that the agent gets are encrypted see the code for the agent on how it decrypts commands.
Example response:
{"response": "command"}
/api/connections/<hashed_agent_id>/outputSend the command output, outputs are encrypted and decrypted by the API when a client requests for them.
{
"command_output": "string"
}