Skip to content

CTFd plugin allowing for individual Docker containers per team

License

Notifications You must be signed in to change notification settings

phannhat17/CTFd-Docker-Plugin

 
 

Repository files navigation


CTFd Docker Containers Plugin

A plugin that can create containerize challenges for your CTF contest

Table of Contents
  1. Getting Started
  2. Usage
  3. Demo
  4. Roadmap
  5. License
  6. Contact

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

To use this plugin you'll need

  • Know how to host CTFd w Docker
  • Know how to use Docker

Installation

  1. Map docker socket into CTFd container by modifying the docker-compose.yml file:

     services:
       ctfd:
         ...
         volumes:
         ...
           - /var/run/docker.sock:/var/run/docker.sock
         ...
    
  2. Clone this repository

  3. Rename "CTFd-Docker-Plugin" to "containers"

  4. Place containers folder inside CTFd/plugins directory

(back to top)

Usage

  1. Connect to Docker daemon:

    If the CTFd and the challenges host in the same machine, you just need to go to the plugin settings page /containers/settings and fill in everything you need except the Base URL field.

    If you host the CTFd and the challenges in different machines, you need to follow the instructions one that page I dont think its working XD, I'll try to fix that later

  2. Create the challenge:

    • Select container type and fill all the required fields

    • If you want regular scoring for the challenge, set the maximum and minimum values to the same amount and the decay to zero.

    • In the image field, it allows you to select the docker image already on the machine

    • In the Connect type field, it allows you to choose how to connect to the challenge such as via web or tcp

(back to top)

Demo

Admin can manage created containers, containers can also be filtered by challenge or player

Challenge view

Web TCP

(back to top)

Roadmap

  • Make the plugin work in user mode
  • Make the admin dashboard can filter by team/user or challenge
  • Make the plugin work with core-beta theme

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

Actually, this is just an upgrade of andyjsmith's plugin that I upgraded by myself. I haven't worked much with the Licenses on github so it might be a violation. If you have anything please contact me by email below, I will respond within 2 days!

Thanks again andyjsmith for creating this base plugin!

(back to top)

Contact

Phan Nhat - @Discord ftpotato - contact@phannhat.id.vn

Project Link: https://github.com/phannhat17/CTFd-Docker-Plugin

(back to top)

About

CTFd plugin allowing for individual Docker containers per team

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 56.5%
  • HTML 28.0%
  • JavaScript 15.5%