Skip to content

Challenge infrastructure used for the DownUnderCTF competition

License

Notifications You must be signed in to change notification settings

semanadeinformatica/kube-ctf

 
 

Repository files navigation

kube-ctf

Pre-configured kubernetes infrastructure with load balancing and some network hardening enabled. Also contains per-team challenge assignment for web challenges. Inspired by kCTF.

How to Setup

  1. Create the cluster
./scripts/cluster-deploy
  1. Configure the cluster and IAM resources.
./scripts/cluster-configure
  1. Create config/values.yaml and populate it with values.
domain:
  challenges: <root domain where challenges are hosted> # challenges will be a subdomain of this

replicas:
  challenge-manager: 2

containerRegistry: gcr.io/example # don't include the slash at the end

cert:
  email: <contact email> # required for letsencrypt
  cfDNSToken: <cloudflare dns token> # used to configure dns-01 certificate validation
  1. Deploy the helm stack.
helm install kubectf -f config/values.yaml chart/
  1. Upload the sample whoami challenge
GOOGLE_APPLICATION_CREDENTIALS=<sevice account json> ./scripts/process-isolated-challenges

How to Write Isolated Challenges

TODO

TODO

  • ./scripts/process-isolated-challenges already exists to process the challenge templates and upload them to Google Cloud Datastore. We should integrate this with GitHub actions in order to do automatic deployments on push.
  • Interface this with CTFd
  • TLS termination for challenges, which can be done by adding cert-manager.

Authors

About

Challenge infrastructure used for the DownUnderCTF competition

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 69.1%
  • Shell 15.9%
  • Python 6.4%
  • Smarty 5.0%
  • HTML 1.9%
  • Dockerfile 1.2%
  • JavaScript 0.5%