CTFd Documentation

website·Indexed 37 days ago

https://docs.ctfd.io/

Documentation for CTFd, a platform for hosting Capture The Flag events. Includes guides on managing challenges and pages via ctfcli, configuring scoring and flags (static, regex, and programmable), theme customization using Alpine.js and Yarn, and integrations with Slack, Discord, and MajorLeagueCyber.

Tokens
41.2K
Snippets
171
Records
388
Agent score
68%

What's inside CTFd

  1. Overview of CTFd Custom Webhooks

    Custom Webhooks allow CTFd to send HTTP requests to user-defined endpoints when specific events occur within the application. The process involves an initial verification via a GET request; once verified, subsequent event notifications are sent via POST requests. Webhooks are available in CTFd Enterprise and specific Hosted CTFd tiers.
  2. Overview of Application Target Challenges

    Application Target challenges allow each participant (user or team) to have their own isolated instance of an application. These instances can be deployed, redeployed, and accessed by their owners. Note that any user who knows the URL/hostname can access the instance. This feature is exclusively available on Hosted or Self-Hosted Enterprise CTFd Instances.
  3. Overview of CTFd HTTP Flags

    HTTP flags allow CTFd to delegate flag verification to an external server. Instead of storing the flag value directly in CTFd, the system sends the user's submission to a configured HTTP endpoint, which determines whether the flag is correct. This feature is available in CTFd Enterprise and specific Hosted CTFd tiers.
  4. Overview of CTFd theme customization

    CTFd allows users to customize the appearance of their instance using custom themes. The primary base theme is core-beta, which is a rewritten version of the CTFd core theme that can be cloned, customized, and uploaded.
  5. Overview of CTFd Enterprise Playground

    Playground is a CTFd Enterprise application designed to securely process arbitrary code submitted by users and return the output, as well as securely send webhooks. It achieves this by executing code in isolated, time-restricted containers using Docker security (e.g., seccomp). Because it executes untrusted code, the Playground server should be treated as a potentially compromised system and isolated from other sensitive resources.
  6. Introduction to the CTFd Framework

    CTFd is an open-source Capture The Flag (CTF) framework designed for ease of use and customizability, used by clubs, universities, and companies to host competitions or workshops. It is written in Python and built using the Flask web framework. For users who do not wish to self-host, a managed hosting service is available at https://ctfd.io/. The platform supports plugins and themes to allow organizers to customize the behavior and appearance of the event.
  7. Overview of Automatic Challenge Deployment Service

    The Automatic Challenge Deployment Service allows administrators of Hosted and Enterprise CTFd installations to manage and deploy Capture The Flag challenges as Docker containers. These containers are deployed on CTFd's infrastructure and are accessible via a URL/hostname to any user with that information. Note that this service is for shared challenge instances; for per-user instances, use Application Target Challenges.
  8. Install and use CTFd.js for theme development

    CTFd.js is a JavaScript library designed for CTFd themes to interact with the CTFd API. It provides API wrappers, UI utilities, and vendored third-party libraries to simplify theme development.
    npm install @ctfdio/ctfd-js
  9. CTF Challenge Difficulty Framework Overview

    CTF challenges are categorized into six difficulty levels (0-5) to ensure event content is balanced and accessible. Challenges are typically divided into the following categories: Forensics, Cryptography, Web, Reversing, and Exploitation.
  10. Understand CTFd User Roles: Admin vs User

    CTFd defines two primary user roles with distinct permission levels:

    1. Admin: Administrative users with access to the Admin Panel. They can manage challenges, pages, and global configuration, as well as create, edit, or delete any user or team account. Admins also have access to sensitive API endpoints.
    2. User: Regular participants with access only to the main site. They can only modify their own profile. If a user is a team captain, they are the only ones permitted to edit their team's profile. Users cannot access the Admin Panel or sensitive API endpoints.
  11. Understand CTFd Enterprise Admin Roles and Permissions

    Administrative roles are a feature exclusive to CTFd Enterprise. All users assigned a role have at least read-only access to the Admin Panel. Roles define specific permissions that restrict or grant the ability to modify various aspects of the platform.
  12. Categorize and theme challenges using Tags

    Tags are short text strings used to categorize challenges in CTFd. They are visible to users when viewing the challenges list. Additionally, some CTFd themes use tags to apply specific CSS classes to challenges, allowing for basic visual theming based on the assigned tag.