pgc2 is a toy C2 channel example which leverages PostgreSQL's LISTEN and NOTIFY statements to transfer comands to execute to the implant and writing output back to the database for later display.
As this is just a toy example, pgc2 is currently only a barebones experiment.
- Clone the repository:
git clone https://github.com/cydave/pgc2.git && cd pgc2
- Build the docker images:
docker-compose build
- Run the database server:
docker-compose up db -d
- Run the server ("operator") in a new terminal:
docker-compose run -it server
- Run the worker ("implant"):
docker-compose up worker -d
- Invoke shell commands in the operator, the
cmd>
prompt will send a new job to execute on the implant and should print out the output.