MITRE CTF Scoreboard is a fully featured CTF platform with scoreboard and registration application built with Ruby on Rails. It is used for MITRE Capture the Flag competition website.
- Install ruby (using a ruby version manager like rvm is recommended).
- In your terminal run
gem install bundler
- Install postgres to your system (and create a role with your system username
sudo -u postgres -i
thencreateuser --interactive
). - Setup Recaptcha. This can be done by getting a site key from here and then setting the
RECAPTCHA_SITE_KEY
andRECAPTCHA_SECRET_KEY
environment variables for the application. The steps for this will vary based on your hosting platform. - Run
bundle install
to install dependencies - Run
bundle exec rake db:create
to create the database - Run
bundle exec rake db:schema:load
to load the database schema - Run
bundle exec rake db:seed
to load demo data - Run
bundle exec rails s
to launch the server in development mode - Open the webpage shown in your terminal from the last command in your browser.
- Login to the registration app
http://localhost:3000
as email:root@root.com
, password:ChangeMe123
or email:ctf@mitre.org
, password:Test123456
and change the password. - Access the administration panel at
http://localhost:3000/admin
to configure the application.
Note: for specific deployment steps check the wiki.
- Install ruby (using a ruby version manager like rvm is recommended).
- In your terminal run
gem install bundler
- Install postgres to your system (and create a role with your system username
sudo -u postgres -i
thencreateuser --interactive
). - Setup Recaptcha. This can be done by getting a site key from here and then setting the
RECAPTCHA_SITE_KEY
andRECAPTCHA_SECRET_KEY
environment variables for the application. The steps for this will vary based on your hosting platform. - Run
bundle install
to install dependencies - Run
bundle exec rake db:create
to create the database - Run
bundle exec rake db:schema:load
to load the database schema - Run
bundle exec rails c
to launch Rails console, then run those commands:user = User.create(email: 'your.mail@example.com', password: 'your_password', admin: true)
to create a admin user- validate your email address or use
user.confirm
to avoid confirmation user.save
to save the user- exit Rails console
- Run
bundle exec rails s -e production
to launch the server in production mode - Open the webpage shown in your terminal from the last command in your browser.
- Login to the registration app
http://localhost:3000
as the admin user you created. - Access the administration panel at
http://localhost:3000/admin
to configure the application.
Automated emails can be setup by adding
min hour * * * /bin/bash -l -c 'cd /path/to/ctf-scoreboard && RAILS_ENV=production bundle exec rake email:automated_email --silent'
where min
, hour
, and path/to/ctf-scoreboard
are replaced with the values you prefer.
If the project is being hosted on Heroku a daily task can be created using the Heroku Scheduler to run rake email:automated_email
Gameboard
Administration: dashboard
Administration: add challenge
More screenshots available on the wiki.
This application is licensed under Apache License 2.0.