Skip to content
chrollo-03Public

About

A Capture The Flag (CTF) competition platform written entirely in Go.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

goCTF

A production-grade Capture The Flag (CTF) competition platform written entirely in Go.

Features

  • Blazing Fast: Built with Go for high performance and low resource usage.
  • Real-time: Live scoreboard and notifications via WebSockets.
  • Secure: AES-256-GCM flag encryption, audit logging, and built-in CSRF/XSS protection.
  • Customizable: Support for custom themes and a powerful plugin system.
  • Advanced Scoring: Static and dynamic (decay) scoring modes with bracket support.
  • Developer Friendly: Comprehensive REST API v1 with Swagger documentation.
  • Easy Deployment: Single binary or Docker-based setup.
  • Data Portability: CTFd-compatible JSON/ZIP import and export.

Tech Stack

  • Language: Go 1.22+
  • Router: Chi
  • Database: PostgreSQL (via Sqlx)
  • Cache/Session: Redis
  • Templates: Go html/template + HTMX + Alpine.js
  • Real-time: Gorilla WebSocket

Getting Started

Prerequisites

  • Go 1.22 or higher
  • PostgreSQL
  • Redis

Installation

  1. Clone the repository:

    git clone https://github.com/chrollo-03/goCTF.git
    cd goCTF
  2. Copy the example configuration:

    cp configs/goctf.example.yaml configs/goctf.yaml
  3. Build the project:

    go build -o bin/goctf ./cmd/goctf
    go build -o bin/goctf-cli ./cmd/goctf-cli
  4. Run the server:

    ./bin/goctf --config configs/goctf.yaml
  5. Visit http://localhost:8080/setup to complete the initial setup.

CLI Usage

The goctf-cli tool provides management commands:

# Create an admin user
./bin/goctf-cli user create --name=admin --email=admin@example.com --password=secret --role=admin

# Flush the cache
./bin/goctf-cli cache flush

# Create a full backup
./bin/goctf-cli backup create --output=backup.zip

Documentation

Detailed documentation can be found in the /docs directory:

License

This project is licensed under the MIT License.

About

A Capture The Flag (CTF) competition platform written entirely in Go.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages