A CTF platform used in IceCTF 2016
 
 
 
 
Go to file
John Hammond 13f1ef7717 Corrected default config setting as StrictRedis uses None for password if there is not one set 2020-04-16 16:00:54 -04:00
daemons Added support for Redis password in the configuration file 2020-04-16 15:58:44 -04:00
data forgot validationerror 2016-08-12 17:19:48 +01:00
docs some docs 2015-11-28 22:11:12 -05:00
routes fix #16, whoops 2016-10-02 20:37:16 +00:00
service add systemd unit files 2016-12-05 20:56:35 +00:00
static style fixes 2016-08-12 12:30:44 +01:00
templates put shell back 2016-08-28 01:32:21 +00:00
utils country.alpha3 -> country.alpha_3 2017-04-27 12:39:59 +02:00
.gitignore some fixes 2016-08-05 20:08:25 +00:00
LICENSE update README and LICENSE 2016-09-06 20:39:27 +00:00
README.md Update README.md 2017-09-27 08:54:37 +02:00
app.py Added support for Redis password in the configuration file 2020-04-16 15:58:44 -04:00
config.py Corrected default config setting as StrictRedis uses None for password if there is not one set 2020-04-16 16:00:54 -04:00
ctftool Added support for Redis password in the configuration file 2020-04-16 15:58:44 -04:00
daemon_manager.py added initial ssh support 2016-07-31 18:39:27 +00:00
exceptions.py moved so much stuff around and rewrote the api 2016-07-31 17:27:20 +00:00
requirements.txt fixing parameters, more secure 2016-08-12 10:49:41 +01:00
secrets.example Create secrets.example 2017-09-25 08:35:49 +02:00
yeshello.py fix 2016-05-26 23:16:08 -04:00

README.md

ColdCore

This is the platform for IceCTF. It is based off of the platform for TJCTF, TJCSec/ctf-platform, although with hefty changes.

Installation

Install dependencies with pip3 install -r requirements.txt.

Edit config.py to your liking. The variable names should be fairly self-explanatory.

You're going to want to create a file called secrets. It will look like this:

mailgun_url: https://api.mailgun.net/v3/tjctf.org
mailgun_key: key-asdflkjasdhflkjsdahflkhsdaklfjhasd
recaptcha_key: asdlkfjhasdlkjfhlsdakjfh
recaptcha_secret: sdakjfhsdalkfjhsdalkfjh
key: this can be anything you want, it is your flask secret_key
shell_host: shell
shell_username: shellaccounts
shell_privkey: path to private key used to log in

For production, create a file called database as well, with the settings

host: localhost
database: ctf
user: user
password: password

Then initiate the database with ./ctftool database create-tables.

To run the server with production settings, set the environment variable PRODUCTION=1 before running the server.

You can create some problem YAML files that look like this:

name: Problem Name
alias: problem alias
author: ME!
category: Binary
description: binary binary binary binary. i love binary
points: 250
flag: "flag{whatever}"

Then add them with ./ctftool challenges add problem.yml and it'll get put in the database.

Run python3 app.py and you have a server running. You probably want to deploy it with gunicorn or similar, long-term.

ctftool

You can run ./ctftool challenges scan ../ctf-problems/ and get a fully populated database with information from all the problem.yml files, and automatically generated static file names, and automatic substitutions for static file links in problem.yml. More documentation on this to come soon.

Contributing

There are some missing features in the platform, and if you would like to contribute, feel free to send pull requests!

If you find any issues or would like to send a feature request feel free to create an issue.