We already have Metasploit up as a listening post, which kinda works for now. But we want to have our own, because that is just a lot more fun.
Of course, there are probably 100+ custom C2 frameworks out there, but building our own is more fun. https://www.thec2matrix.com/matrix If you're feeling lazy, just fork someone else's and use it, which is totally valid, or make your own.
This resource is pretty great to describe what you would do to make your own. https://shogunlab.gitbook.io/building-c2-implants-in-cpp-a-primer/chapter-1-designing-a-c2-infrastructure
For this section, all you are tasked to do is to implement a standalone app with an "API" to communicate with your implant that uses whatever database you are most comfortable with. This app should be able to:
- Recieve a task, list of tasks, or a command to run
- Listen for requests via a given protocol
- If a request is properly authenticated for a specific machine, respond with list of tasks
- Continue listening for requests
- Upon receiving task responses, display output
- Log everything
There is a huge amount of variation you can build in here, I recommend using HTTP requests, Python, Flask, and MongoDB for now. Ensure you build this as modular as possible so you can change out future protocols if you feel like it.