Skip to content

Jury System for a attack-defence ctf games

License

Notifications You must be signed in to change notification settings

SibirCTF/2019-jury-system

 
 

Repository files navigation

fhq-jury-ad

Build Status Docker Pulls Docker layers Github Stars Github Stars Github Forks

Jury System for a attack-defence ctf game. Or you can use for training.

scoreboard scoreboard-info

Download and basic configuration

$ sudo apt install git-core
$ cd ~
$ git clone http://github.com/freehackquest/fhq-jury-ad.git fhq-jury-ad.git
$ nano ~/fhq-jury-ad.git/jury.d/game.conf
$ nano ~/fhq-jury-ad.git/jury.d/server.conf
$ nano ~/fhq-jury-ad.git/jury.d/scoreboard.conf
$ nano ~/fhq-jury-ad.git/jury.d/mysql_storage.conf

Config files (look comments in file):

  • ~/fhq-jury-ad.git/jury.d/game.conf - basic game configurations, start/end/name/flag live time

  • ~/fhq-jury-ad.git/jury.d/mysql_storage.conf - basic db connection configurations

  • ~/fhq-jury-ad.git/jury.d/scoreboard.conf - basic scoreboard configurations html folder, port for web

  • ~/fhq-jury-ad.git/jury.d/server.conf - basic server just a which type of storage will be used (in current time worl only mysql)

  • BUILD: Ubuntu/Debian

  • BUILD: MacOS

  • BUILD: Docker

Configure database

After configure database options here:

$ nano ~/fhq-jury-ad.git/jury.d/mysql_storage.conf

Prepare to start with clean all previous data

Previously data-flags will be clean

$ cd ~/fhq-jury-ad.git/fhq-jury-ad
$ ./fhq-jury-ad clean

Run jury-ad

$ ./jury-ad start

Scoreboard

url: http://{HOST}:{PORT}/

Where

  • {HOST} - host or ip, where jury system started
  • {PORT} - scoreboard/flag port, where jury system started

Service statuses

  • up - put-check flag to service success
  • down - service is not available (maybe blocked port or service is down)
  • corrupt - service is available (available tcp connect) but protocol wrong could not put/get flag
  • mumble - waited time (for example: 5 sec) but service did not have time to reply
  • shit - checker not return correct response code

Acceptance of flag

  • Acceptance of flag: http://{HOST}:{PORT}/flag?teamid={TEAMID}&flag={FLAG}

Where

  • {HOST} - host or ip, where jury system started
  • {PORT} - scoreboard/flag port, where jury system started
  • {TEAMID} - number, your unique teamid (see scoreboard)
  • {FLAG} - uuid, so... it's flag from enemy server

Example of send flag (curl):

$ curl http://192.168.1.10:8080/flag?teamid=keva&flag=123e4567-e89b-12d3-a456-426655440000

http-code responses:

  • 400 - wrong parameters
  • 200 - flag accept
  • 403 - flag not accept (reason: old, already accepted, not found)

About

Jury System for a attack-defence ctf games

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 81.5%
  • Python 10.9%
  • JavaScript 2.7%
  • CSS 1.6%
  • CMake 1.3%
  • HTML 0.8%
  • Other 1.2%