Giter VIP home page Giter VIP logo

dojo's Introduction

DOJO

Deploy a pwn.hust.college dojo instance while pwn.hust.college is forked from pwn.college!

Details

The pwn.hust.college dojo infrastructure is based on CTFd. CTFd provides for a concept of users, challenges, and users solving those challenges by submitting flags. From there, this repository provides infrastructure which expands upon these capabilities.

The pwn.hust.college infrastructure allows users the ability to "start" challenges, which spins up a private docker container for that user. This docker container will have the associated challenge binary injected into the container as root-suid, as well as the flag to be submitted as readable only by the the root user. Users may enter this container via ssh, by supplying a public ssh key in their profile settings, or via vscode in the browser (code-server). The associated challenge binary may be either global, which means all users will get the same binary, or instanced, which means that different users will receive different variants of the same challenge.

Setup

curl -fsSL https://get.docker.com | /bin/sh
DOJO_PATH="./dojo"
git clone https://github.com/HUSTSeclab/dojo.git "$DOJO_PATH"
docker build -t pwncollege/dojo "$DOJO_PATH"
docker run --privileged -d -v "${DOJO_PATH}:/opt/pwn.college:shared" -p 22222:22 -p 8080:80 -p 10443:443 --name dojo pwncollege/dojo

Note that you can directly setup dojo with setup.sh.

Note

This command would map ports (22, 80, 443) in the container to the corresponding ports (22222, 8080, 10443) on the Docker host. If these ports are bound in you environment, you can disable these processes or revise these mapping ports.

This will run the initial setup, including building the challenge docker image. If you want to build the full 70+ GB challenge image, you can add -e DOJO_CHALLENGE=challenge to the docker args. Note that docker environment variables override the value in ./data/config.env. Refer to script/container-setup.sh for more information.

The dojo will initialize itself to listen on and serve from localhost.pwn.college (which resolves 127.0.0.1). This is fine for development, but to serve your dojo to the world, you will need to update this to your actual hostname in /opt/dojo/data/config.env.

It will take some time to initialize everything and build the challenge docker image. You can check on your container (and the progress of the initial build) with:

docker exec dojo dojo logs

Once things are setup, you should be able to access the dojo and login with username admin and password admin. You can change these admin credentials in the admin panel.

Customization

All dojo data will be stored in the ./data directory.

Once logged in, you can add a dojo by visiting /dojos/create. Dojos are contained within git repositories. Refer to the example dojo for more information.

Contributing

We love Pull Requests! ๐ŸŒŸ Have a small update? Send a PR so everyone can benefit. For more substantial changes, open an issue to ensure we're on the same page. Together, we make this project better for all! ๐Ÿš€

dojo's People

Contributors

connornelson avatar zardus avatar spencerpogo avatar mudongliang avatar robwaz avatar wumingzhilian avatar adamdoupe avatar tttturtle-russ avatar zeeshan12340 avatar shiftw041 avatar lowa9 avatar huyinhao avatar hitfzyangdianshi avatar zolutal avatar yang-pengmai avatar mahaloz avatar zxnb1018 avatar userabcw avatar xin-zheqi avatar sparrrgh avatar reubenbeeler avatar wyywwi avatar gitveg avatar godgun123 avatar ltfish avatar allennnn2022 avatar

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.