nettitude / PoshC2

A proxy aware C2 framework used to aid red teamers with post-exploitation and lateral movement.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an API for PoshC2

b4b857f6ee opened this issue · comments

Hello,

I can't found in the doc if we can interact with PoshC2 using a script of something like it? So a 3rd part sofware can interacte with it like an API or something.

Thank you :)

Hi b4, so ultimately all the operations of PoshC2 on the server side are controlled via its database, be that in the sqlite version or the postgres one. So long as the C2Server.py is running and polling data, you can achieve what you need by making a basic SQL query in most cases.

There's no API as such at present exposing simple endpoints to perform tasks and no idea if its on the timeline, that's a question for @m0rv4i and @benpturner. I could totally see it being a sensible enhancement request to at least expose some more trivial server side endpoints to it. Say Get Tasks, Get Implants, Set Implant task or similar.

If you have something in mind though already and have worked on it, feel free to submit a pull request for review.

Leaving open in-case @m0rv4i or @benpturner want to comment :)

Thanks @Console.

Unfortunately there's no API at present but it's something that's on our radar, I'll edit this issue to make it a feature request that people can vote on.

If you have a particular use case or example feel free to comment or ping me on slack and we can see if we can figure out a workaround for you in the mean time!

Thank you all for your answers.
I'm thinking about using it in building environnement for SOC testing or CyberRange.
To make the server side of PoshC2 control by another script or by API :).
For exemple this dev : https://github.com/d3vzer0/reternal-quickstart control the Empire 3 because you can use the API or python script to interact with it.
I was thinking about this kind of use case.
I have send an email for slack :)