Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API for PoshC2 #208

Open
b4b857f6ee opened this issue Nov 18, 2020 · 3 comments
Open

Add an API for PoshC2 #208

b4b857f6ee opened this issue Nov 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@b4b857f6ee
Copy link

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 :)

@b4b857f6ee b4b857f6ee added the bug Something isn't working label Nov 18, 2020
@Console Console added enhancement New feature or request and removed bug Something isn't working labels Nov 18, 2020
@Console
Copy link
Contributor

Console commented Nov 18, 2020

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 :)

@riskydissonance
Copy link
Collaborator

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!

@riskydissonance riskydissonance changed the title [QUESTION] - Interaction Add an API for PoshC2 Nov 18, 2020
@b4b857f6ee
Copy link
Author

b4b857f6ee commented Nov 18, 2020

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants