API
Blueprint that contains all of the API endpoints used internally by users and externally by agents.
- src.c2.views.api.add_command()
API endpoint that allows the agent terminal to add commands to the Command table in the database
- Returns
a json RPC object containing any finished jobs and the new job ID
- Return type
dict
- src.c2.views.api.command_out()
API endpoint that allows an agent to send output of commands back to the server
- Returns
status to the agent of whether it received the output
- Return type
str
- src.c2.views.api.get_command()
API endpoint that allows an agent to fetch commands from the server
- Returns
none if there are no commands to retrieve,
else the command and it’s ID :rtype: str
- src.c2.views.api.register_agent()
API endpoint that allows an agent to register itself to the server
- Returns
the new agent ID
- Return type
str
- src.c2.views.api.scripts()
API endpoint that allows an agent to retrieve scripts from the server
- Returns
files that the agent requested
- Return type
file
- src.c2.views.api.ssh_keys()
API endpoint that allows an agent to send back exfiltrated private ssh keys
- Returns
status to the agent of whether it received the keys
- Return type
str