Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

-

Table of Contents

C2 Protocol Introduction

...

Operation NameDescription

ACKNOWLEDGE

Operation used by MiNiFi C2 agents to acknowledge the receipt and execution of a C2 server requested operation

CLEAR

Clears flow connection queues or repositories on the C2 agent
CONSUME

Consumes a heartbeat with an agent to avoid sending from other agents. Allows multiplexing responses from a

condensed agent response.

DESCRIBE

Currently Unused
EXECUTEExecutes commands on the agent's operating system. This feature may be disabled for any agent.

HEARTBEAT

Heartbeat provides status and operational capabilities to C2 server(s)
PAUSEPauses the execution of flows on

UPDATE

Updates components of the C2 agent or the flow configuration.
REPLICATEReplicates agent state between agents, with the ability to place agents in standby mode until they are needed.

RESTART

Restarts C2 agents
RESUMEResumes the execution of flows on the C2 agent

START

Starts components within the C2 agents
STOP Stops components within the C2 agent
SUBSCRIBEAllows servers or agents to subscribe to an agent's heartbeat , requesting specific information for the next
heartbeat.
TRANSFER

Transfers an object between the C2 agent and C2 designator.

UPDATEUpdates components of the C2 agent or the flow configuration.

C2 Requirements

The requirements are an evolving list that have grown organically from an implementation. Any other portions of a heartbeat are considered optional.

...

Advanced Tables - JSON Table
outputwiki
{"operation" : "heartbeat",
"requested_operations": [ {
"operation" : "restart",
"operationid" : "string",
"name": "component name",
}

]

}

Acknowledgements.

...


Pause
  Pauses the execution of flows on the C2 agent (if the agent is running and is not in paused state), while the agent keeps running and heartbeating.


Advanced Tables - JSON Table
outputwiki
{"operation" : "acknowledgeheartbeat",
"operationidrequested_operations": [ {
"operation" : "pause",
"operationid" : "string",
}

]

}


Resume
  Resumes the execution of flows on the C2 agent if the agent is in paused state.


Advanced Tables - JSON Table
outputwiki
{"operation" : "heartbeat",
"requested_operations": [ {
"operation" : "resume",
"operationid" : "string",
}

]

}


Acknowledgements.

 Acknowledgements occur through a separate URL. This URL will receive a POST that contains the following payload, which acknowledges that the operation ID was received and executed.

Advanced Tables - JSON Table
outputwiki
{"operation": "acknowledge",
"operationid" : " : "string" 
}



MQTT Protocol

MQTT can be used as a connecting protocol in lieu of a RESTFul Service. Additionally, MQTT can be used within an enclave and then as conversion to RESTFul to support MQTT → HTTP comms. 

...

N/A
Operation NameDescriptionoperand/namecontent/args

ACKNOWLEDGE

Operation used by MiNiFi C2 agents to acknowledge the receipt and execution of a C2 server requested operation
N/A
CLEARClear repositoriesrepositoriesN/A

CLEAR

Clears the connection queuesconnection

connection1=<connection name>, connection2=<connection 2>  ...


Will also accept a list

<connection name1>,<connection name2>, ...

CONSUMEConsumes a heartbeat within an agent to avoid sending from other agentsN/AN/A

DESCRIBE

Return metricsmetricsmetricsClass=<metric class to obtain>
DESCRIBEconfigurationN/AN/A
DESCRIBEmanifestN/AN/A
DESCRIBEpolicy events – Based on the defined policies

EXECUTEExecutes commands per the agent's defined policiescommandarguments
HEARTBEATheartbeat operation – may contain embedded heartbeats.

HEARTBEATnonce of combined heartbeats

UPDATE

Update flowconfigurationlocation=<URL to updated flow file>
UPDATEUpdate c2 propertiesc2

configkey1=configvalue1, configkey2=configvalue2 ...

*configkey1 is a configuration option that is updated and its new value

UPDATEUpdate configuration options defined within agent policies


PAUSEPauses C2 agentsN/AN/A
REPLICATEReplicates an Agent's state to another agent; with standby true the replicant is paused and awaits restart.agentstandby=true/false
REPLICATETells agents to replicate state to nearby agentsserver

RESTART

Restarts C2 agentsN/AN/A
RESUMEResumes C2 agentsN/AN/A

START

Starts components within the C2 agents<name of component to start>N/A
STOPStops components within the C2 agent<name of component to stop>N/A
SUBSCRIBE

Subscripts a C2 server to internal respondables ( Metrics , configuration, and policy/audit events ) .

These will be placed into the heartbeat

enable/disablesubscribe=metrics, subscribe=configuration, subscribe=auditevents
TRANSFERTransfers an object between the C2 agent and C2 designator.N/AN/A

UPDATE

Update flowconfigurationlocation=<URL to updated flow file>
UPDATEUpdate c2 propertiesc2

configkey1=configvalue1, configkey2=configvalue2 ...

*configkey1 is a configuration option that is updated and its new value

UPDATEUpdate configuration options defined within agent policies

UPDATEUpdate agentagent

location=<URL to agent binary or diff>

partial=true/false ( optional)

UPDATEUpdate agentagent

location=<URL to agent binary or diff>

partial=true/false ( optional)

RESTART

Restarts C2 agentsN/AN/A
REPLICATEReplicates an Agent's state to another agent; with standby true the replicant is paused and awaits restart.agentstandby=true/false
REPLICATETells agents to replicate state to nearby agentsserver

START

Starts components within the C2 agents<name of component to start>N/A
STOPStops components within the C2 agent<name of component to stop>N/A
SUBSCRIBE

Subscripts a C2 server to internal respondables ( Metrics , configuration, and policy/audit events ) .

These will be placed into the heartbeat

enable/disablesubscribe=metrics, subscribe=configuration, subscribe=auditevents
TRANSFERTransfers an object between the C2 agent and C2 designator.N/A

Operations and their operands for agents (Version 3)

...