CTFs as you need them
 
 
 
 
Go to file
Kevin Chung b8d0f80d01
2.2.0 (#1188)
2.2.0 / 2019-12-22
==================

## Notice
2.2.0 focuses on updating the front end of CTFd to use more modern programming practices and changes some aspects of core CTFd design. If your current installation is using a custom theme or custom plugin with ***any*** kind of JavaScript, it is likely that you will need to upgrade that theme/plugin to be useable with v2.2.0. 

**General**
* Team size limits can now be enforced from the configuration panel
* Access tokens functionality for API usage
* Admins can now choose how to deliver their notifications
    * Toast (new default)
    * Alert
    * Background
    * Sound On / Sound Off
* There is now a notification counter showing how many unread notifications were received
* Setup has been redesigned to have multiple steps
    * Added Description
    * Added Start time and End time,
    * Added MajorLeagueCyber integration
    * Added Theme and color selection
* Fixes issue where updating dynamic challenges could change the value to an incorrect value
* Properly use a less restrictive regex to validate email addresses
* Bump Python dependencies to latest working versions
* Admins can now give awards to team members from the team's admin panel page

**API**
* Team member removals (`DELETE /api/v1/teams/[team_id]/members`) from the admin panel will now delete the removed members's Submissions, Awards, Unlocks

**Admin Panel**
* Admins can now user a color input box to specify a theme color which is injected as part of the CSS configuration. Theme developers can use this CSS value to change colors and styles accordingly.
* Challenge updates will now alert you if the challenge doesn't have a flag
* Challenge entry now allows you to upload files and enter simple flags from the initial challenge creation page

**Themes**
* Significant JavaScript and CSS rewrite to use ES6, Webpack, yarn, and babel
* Theme asset specially generated URLs
    * Static theme assets are now loaded with either .dev.extension or .min.extension depending on production or development (i.e. debug server)
    * Static theme assets are also given a `d` GET parameter that changes per server start. Used to bust browser caches.
* Use `defer` for script tags to not block page rendering
* Only show the MajorLeagueCyber button if configured in configuration
* The admin panel now links to https://help.ctfd.io/ in the top right
* Create an `ezToast()` function to use [Bootstrap's toasts](https://getbootstrap.com/docs/4.3/components/toasts/)
* The user-facing navbar now features icons
* Awards shown on a user's profile can now have award icons
* The default MarkdownIt render created by CTFd will now open links in new tabs
* Country flags can now be shown on the user pages

**Deployment**
* Switch `Dockerfile` from `python:2.7-alpine` to `python:3.7-alpine`
* Add `SERVER_SENT_EVENTS` config value to control whether Notifications are enabled
* Challenge ID is now recorded in the submission log

**Plugins**
* Add an endpoint parameter to `register_plugin_assets_directory()` and `register_plugin_asset()` to control what endpoint Flask uses for the added route

**Miscellaneous**
* `CTFd.utils.email.sendmail()` now allows the caller to specify subject as an argument
    * The subject allows for injecting custom variable via the new `CTFd.utils.formatters.safe_format()` function
* Admin user information is now error checked during setup
* Added yarn to the toolchain and the yarn dev, yarn build, yarn verify, and yarn clean scripts
* Prevent old CTFd imports from being imported
2019-12-22 23:17:34 -05:00
.github Issue template (#455) 2017-11-14 16:40:36 -05:00
CTFd 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
docs 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
migrations 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
scripts Fix several issues in Vagrant provisioning (#1046) 2019-09-08 13:04:48 -04:00
tests 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
.codecov.yml Fix admin cannot modify verified status in Edit User (#777) 2018-12-04 00:35:51 -05:00
.dockerignore Adding .dockerignore and making docker-entrypoint consider DATABASE_URL (#312) 2017-07-13 02:43:17 -04:00
.flaskenv 1.2.0 (#627) 2018-05-03 18:04:39 -04:00
.gitignore 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
.prettierignore Format all the things (#991) 2019-05-11 21:09:37 -04:00
.travis.yml 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
CHANGELOG.md 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
CONTRIBUTING.md Documentation improvements (#963) 2019-04-21 12:00:21 -04:00
Dockerfile 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
LICENSE Update LICENSE 2018-07-29 03:16:54 -04:00
Makefile 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
README.md Reduce default gunicorn worker count to reduce memory usage (#968) 2019-04-25 15:05:20 -04:00
Vagrantfile Fix several issues in Vagrant provisioning (#1046) 2019-09-08 13:04:48 -04:00
development.txt Improve caching (#1014) 2019-06-15 02:07:24 -04:00
docker-compose.yml Make ctfd user usable for mysql connection (#1028) 2019-06-21 00:55:44 -04:00
docker-entrypoint.sh Use /dev/shm for worker-tmp-dir in gunicorn in Docker (#1003) 2019-05-25 01:25:24 -04:00
export.py 2.0.0 (#741) 2018-11-19 23:16:14 -05:00
import.py 2.0.0 (#741) 2018-11-19 23:16:14 -05:00
manage.py 2.0.0 (#741) 2018-11-19 23:16:14 -05:00
package.json 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
populate.py 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
prepare.sh Fix several issues in Vagrant provisioning (#1046) 2019-09-08 13:04:48 -04:00
requirements.txt 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
serve.py 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
setup.cfg Starting to write tests 2017-01-07 02:44:31 -05:00
webpack.config.js 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00
wsgi.py Fix flask run by not monkey patching for gevent in wsgi.py (#1101) 2019-09-05 19:50:52 -04:00
yarn.lock 2.2.0 (#1188) 2019-12-22 23:17:34 -05:00

README.md

Build Status CTFd Slack Documentation Status

What is CTFd?

CTFd is a Capture The Flag framework focusing on ease of use and customizability. It comes with everything you need to run a CTF and it's easy to customize with plugins and themes.

CTFd is a CTF in a can.

Features

  • Create your own challenges, categories, hints, and flags from the Admin Interface
    • Dynamic Scoring Challenges
    • Unlockable challenge support
    • Challenge plugin architecture to create your own custom challenges
    • Static & Regex based flags
      • Custom flag plugins
    • Unlockable hints
    • File uploads to the server or an Amazon S3-compatible backend
    • Limit challenge attempts & hide challenges
    • Automatic bruteforce protection
  • Individual and Team based competitions
    • Have users play on their own or form teams to play together
  • Scoreboard with automatic tie resolution
    • Hide Scores from the public
    • Freeze Scores at a specific time
  • Scoregraphs comparing the top 10 teams and team progress graphs
  • Markdown content management system
  • SMTP + Mailgun email support
    • Email confirmation support
    • Forgot password support
  • Automatic competition starting and ending
  • Team management, hiding, and banning
  • Customize everything using the plugin and theme interfaces
  • Importing and Exporting of CTF data for archival
  • And a lot more...

Install

  1. Install dependencies: pip install -r requirements.txt
    1. You can also use the prepare.sh script to install system dependencies using apt.
  2. Modify CTFd/config.py to your liking.
  3. Use flask run in a terminal to drop into debug mode.

You can use the auto-generated Docker images with the following command:

docker run -p 8000:8000 -it ctfd/ctfd

Or you can use Docker Compose with the following command from the source repository:

docker-compose up

Check out the wiki for deployment options and the Getting Started guide

Live Demo

https://demo.ctfd.io/

Support

To get basic support, you can join the CTFd Slack Community: CTFd Slack

If you prefer commercial support or have a special project, feel free to contact us.

Managed Hosting

Looking to use CTFd but don't want to deal with managing infrastructure? Check out the CTFd website for managed CTFd deployments.

MajorLeagueCyber

CTFd is heavily integrated with MajorLeagueCyber. MajorLeagueCyber (MLC) is a CTF stats tracker that provides event scheduling, team tracking, and single sign on for events.

By registering your CTF event with MajorLeagueCyber users can automatically login, track their individual and team scores, submit writeups, and get notifications of important events.

To integrate with MajorLeagueCyber, simply register an account, create an event, and install the client ID and client secret in the relevant portion in CTFd/config.py or in the admin panel:

OAUTH_CLIENT_ID = None
OAUTH_CLIENT_SECRET = None

Credits