Coder Social home page Coder Social logo

adamyi / geegle3 Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 0.0 15.52 MB

Monorepo for infrastructure and challenges of SECedu CTF 2019.

License: Apache License 2.0

Python 6.97% HTML 13.67% Go 19.64% Shell 1.68% C 7.65% JavaScript 1.78% TypeScript 4.40% CSS 17.00% Hack 0.62% PHP 4.07% Jsonnet 8.50% Starlark 14.03%
ctf ctf-challenges ctf-platform ctf-framework ctf-scoreboard geegle

geegle3's Introduction

UPDATES: We now have an updated infra open-sourced with more features and standard CTFd integration here: https://github.com/adamyi/CTFProxy

Geegle3

Monorepo for infrastructure and challenges of SECedu CTF 2019.


Infra

Everything is behind the settings of a fictional company, Geegle. Geegle has its own BeyondCorp-like zero-trust network via UberProxy. We have a working email server that supports company internal emails as well as inbound and outbound emails at geemail-backend, geemail-frontend, geemail-client, gsmtpd. All challenge descriptions are sent to team through emails. Challenge emails are unlocked as players progress in the CTF. Every challlenge has its own unified configuration file called challenge.libsonnet.See chals/pwn/geelang/challenge.libsonnet for an example. Its emails, container services, static files, flags, etc. are all in that single file. We have a shared server that every player connects to, as well as separate team servers for each of the team. The clustertype in configuration determines whether a specific service should run on the shared server or in a separate team server. This makes it possible that some services are shared to facilitate inter-team communication while some services offer isolation between teams.

Players send their flag to [email protected] to claim points. They can also interact with xssbot through company internal emails.

Binary challenges are also tunneled through UberProxy with websocket. See cli-relay, cli-static, and uberproxy/websocket.go. Static files are served using shared infra sffe, a general-purpose static file front-end on top of SSTable (leveldb).

Other infra services we have include: scoreboard, dns (internal DNS service used by all containers to help connect to uberproxy), gaia (internal authentication service), gae (a service like Google App Engine and Amazon Lambda), requestz (a simple network debugging service), mss (internal KV databse service integrated with Geegle services authentication).

Everything (Golang, Python, C, TypeScript, Bash, JSONNet, Java, PHP) are built with bazel. Containers images are pushed to GCR, while docker-compose files are auto-generated as well.

Challenges

See https://docs.google.com/spreadsheets/d/15xOhZdRnNxNbSMNUSxPG_8K92lHa4z5SKJWPPTy5tAc/edit


Running Your Own CTF

If you want to use the same Geegle infrastructure to host your own CTF, we are more than happy to support you. Simply remove all challenges from chals directory and put in your own challenges, and change the root BUILD file accordingly.

Please do let us know if you use Geegle infra to host your own CTF. We can't wait to hear about the amazing work you have done :)

SSL Certificates

Please put your HTTPS certificates and keys to infra/uberproxy/certs/ and change infra/uberproxy/ssl.go accordingly.

Building Container Images

Please build using Linux AMD64. Cuz it's hard to set up cross-compiling for C programs on mac, ceebs.

Build only:

bazel build //:all_containers

Build and tag locally (so that you can use docker-compose to boot them up):

bazel run //:all_containers

Commits submitted to master branch will be automatically pushed to gcr.io/geegle, our container repo

If you are deploying your own CTF using this infra, please change BUILD file to push to a different container registry, since gcr.io/geegle is not public.

Deploying

Master Server (Shared Server)

bazel build //infra/jsonnet:cluster-master-docker-compose
docker-compose -f dist/bin/infra/jsonnet/cluster-master-docker-compose.json up -d

Team Server (Separate Isolated Server)

bazel build //infra/jsonnet:cluster-team-docker-compose
docker-compose -f dist/bin/infra/jsonnet/cluster-team-docker-compose.json up -d

Test Server (All-in-one Server)

bazel build //infra/jsonnet:all-docker-compose
docker-compose -f dist/bin/infra/jsonnet/all-docker-compose.json up -d

LICENSE

Copyright (c) 2019 Adam Yi, Adam Tanana, Lachlan Jones

To check the author for an individual challenge/infra service, check CODEOWNERS.

Open-sourced with love, under Apache 2.0 License.

geegle3's People

Contributors

adamtanana avatar adamyi avatar chroosh avatar dependabot[bot] avatar lachjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

geegle3's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.