Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
/ pgc2 Public archive

PostgreSQL based C2 experiment

Notifications You must be signed in to change notification settings

cydave/pgc2

Repository files navigation

pgc2

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.

How to play

  1. Clone the repository: git clone https://github.com/cydave/pgc2.git && cd pgc2
  2. Build the docker images: docker-compose build
  3. Run the database server: docker-compose up db -d
  4. Run the server ("operator") in a new terminal: docker-compose run -it server
  5. Run the worker ("implant"): docker-compose up worker -d
  6. 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.