Skip to content
A CTF framework(in Flask) for HackTheBox style machines.
Python HTML CSS Other
Branch: master
Clone or download
Latest commit 00ce2aa Oct 4, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
screenshots added screenshots Jul 7, 2019
.gitignore Added User and Root Submission IP Column in Database Jul 27, 2019
Dockerfile fixed docker integration Jul 7, 2019
LICENSE Create LICENSE Jul 22, 2019 Update Oct 2, 2019
docker-compose.yml updated the docker-compose so the box will not start again if we manu… Oct 2, 2019

RootTheBox CTF Framework

A CTF framework(in flask) for HackTheBox style machines.
A live demo of the app is available at:
You can login and mess around as 2 users: admin:admin and test:test.(i.e. username:password)


  • Flask Blueprints
  • Flask-admin for Admin views and easy realtime management
  • Easily deployable on Heroku.
  • A page to show relevant details about the machine such as name, IP, OS, points and difficulty level.
  • User Registration, account management, Forgot password, Notifications, Full Fledged Logging
  • Hash submission (currently 2 hashes: user and root)
  • Real time scoreboard tracking

How To Use


Installation and first run

  1. Git clone the repo and cd into it
$ git clone
$ cd RTB-CTF-Framework/
  1. Create virtual environment to deal with dependencies and requirements.
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
$ cd src/
  1. With virtual environment activated, install requirements, init db and run !
[venv]$ pip install -r requirements.txt 
[venv]$ python # Only required on first run
[venv]$ python

Deployment using Heroku

  1. Create your heroku app using heroku cli tool.

    Follow the official guide by Heroku:

  2. Provision Database add-on.

    Add the following add on to your new app:

  3. Creating database instance. In your heroku app directory,

    $ heroku run bash
    [heroku]$ python
  4. Your app should be live now. You can run heroku open to open it in browser.

For Your CTF

Using this as simple as anything.

  1. Just configure your CTF settings in

  2. DO NOT FORGET to change admin credentials from

  3. See database instance creation steps under How To Use.

Bonus: You can manage the database CRUD operations from admin views GUI as well as issue notifications.

Warning: If you make any change to logging/config class/score settings. It's highly recommended to create a new DB instance.


Please see: issues and the below To-do list


  • Freeze Scoreboard automatically past running time specified
  • Support for more hashes
  • Testing Password reset functionality
  • More info for home.html
  • Need to implement account.html (not a priority)

  • db relationship between User and Score Tables (priority | issue: #5)
  • isAdmin column in User table and Admin views (priority)
  • Notifications
  • Use Flask Blueprints
  • Finalize black theme?
  • Error messages not appearing in /submit
  • Implement machine.html to server a page where one can download/serve machines


You can’t perform that action at this time.