Code Monkey home page Code Monkey logo

volgactf-final-devenv's Introduction

VolgaCTF Final devenv

A platform to develop & test an A/D CTF service and its checker.

VolgaCTF Final is an automatic checking system (ACS) for A/D CTF contests.

Prerequisites

A general outlook

This repository contains a docker-compose configuration for several containers, namely redis, master, checker and service, which provide a development and testing environment.

Network

master must be able to communicate with redis and checker containers.

checker must be able to communicate with master and service containers.

Setup

$ pip3 install ecdsa && python3 env_vars.py
$ cp docker-compose.example.yml docker-compose.yml

The commands above generate a few secrets (for flag signing) as well as create a docker-compose.yml file from a sample. This file may require further customization (see Development section).

Running

$ docker-compose up

Run containers in foreground (add -d flag to run in background). One may need to launch any docker-compose command as a superuser.

Usage

Provided that everything is installed correctly, a dashboard is available on http://127.0.0.1:8000. dashboard

The form at the top left helps specify common settings. Note that Checker host and Team host fields stand for a checker and a service container hostnames or IP addresses, so that other checkers and/or services may be used, regardless of whether they belong to the very docker-compose deployment or not.

The form at the top in the middle help specify Recurring mode settings:

  • Flag lifetime stands for the number of seconds a flag is considered "live";
  • Round timespan stands for an interval between subsequent PUSH operations (rounds);
  • Poll timespan stands for an interval between subsequent PULL operations;
  • Poll delay stands for the number of seconds before first PULL operation in a new round.

The form at the top on the right help specify Onetime mode settings. The only field here is Round.

The section on the right is populated with all pushed flags so that a PULL operation may be initiated. Note that PULL button is active only when an antecedent PUSH operation was successful.

Detailed logs comprise the section at the bottom.

Advanced

The forms' default values can be customized in an environment section of the master container:

docker-compose.yml

  ...
  master:
    image: 'volgactf/volgactf-final-devenv-master'
    environment:
      - DEFAULT_CHECKER_HOST=awesome-checker
      - DEFAULT_TEAM_HOST=awesome-service
      - DEFAULT_TEAM_NAME=Roosters
      - DEFAULT_SERVICE_NAME=Jinn The Ripper
      - DEFAULT_FLAG_LIFETIME=180
      - DEFAULT_ROUND_TIMESPAN=90
      - DEFAULT_POLL_TIMESPAN=25
      - DEFAULT_POLL_DELAY=10
      - LOG_HISTORY=50  # number of log entries to store
      - FLAG_HISTORY=10  # number of flags to store
  ...

Development

To develop & test a service along with a checker, service and checker sections in docker-compose.yml should be modified accordingly:

docker-compose.yml

  ...
  checker:
    # image: 'volgactf/volgactf-final-devenv-checker:1.0.0'
    image: 'awesome/awesome-checker:1.0.0'

  service:
    # image: 'volgactf/volgactf-final-devenv-service:1.0.0'
    image: 'awesome/awesome-service:1.0.0'
  ...

See also

  1. master image source
  2. service image source
  3. checker image source
  4. checker protocol

License

MIT @ VolgaCTF

volgactf-final-devenv's People

Contributors

aspyatkin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.