Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitLabGitLab/daveyd347/self-hosted-ctf-platform
Vulnerability ScannersContainer SecurityStatic Code Analysis (SAST)Web Application ExploitationConfiguration AuditingCTFPenetration TestingDevSecOpsSecret DetectionLearning & EducationLabs & Practice
5h 58m agoNot yet reviewed
GitLab
daveyd347/self-hosted-ctf-platform

self-hosted-ctf-platform

Self-hosted CTF: original web challenges + scoreboard, deployed with Docker Compose via GitLab CI and a GitOps agent. Flags derived from one CI secret; every pipeline deploys the stack and auto-solves every challenge.

View RepositoryWebsite
Share

Self-Hosted CTF Platform

A complete capture-the-flag event you can run yourself: four original web challenges, a scoreboard, and the GitLab CI/CD + GitOps machinery that builds, scans, deploys and plays the whole thing on every commit.

pipeline status coverage report

What it showcases

  • Docker Compose deployments: one compose.yaml runs six hardened containers, with no bind mounts, so the same file deploys to a laptop, a CI Docker-in-Docker service, or a remote host over SSH.
  • Container orchestration: a single nginx ingress, a private internal network per challenge (no egress, no lateral movement), health checks, depends_on ordering, resource limits, read-only root filesystems, dropped capabilities, non-root users, and a persistent volume that survives redeploys.
  • Environment and secrets management: every flag, the session key and the admin token are derived from one seed held as a masked CI/CD variable. Flags are never committed, never baked into images (Trivy checks), never written to disk on the deploying machine, and the scoreboard only ever sees their hashes.
  • GitOps-style updates: main is the desired state. A pull-based agent (ctfops reconcile, a systemd timer) deploys a commit only after its pipeline passed, verifies it, and rolls back automatically if it doesn't come up healthy. Rolling back on purpose is git revert.
  • A pipeline that tests what it ships: CI deploys the exact images it pushed, then registers a team, exploits every challenge with its reference solver, submits the flags and checks the scoreboard, proves network isolation from inside each container, and recreates the scoreboard to prove data survives.

Architecture

flowchart LR
    players((Players)) -->|":8000"| gw
    players -->|":9001-9004"| gw
    subgraph host["Docker host (compose project 'ctf')"]
        gw["gateway<br/>nginx, rate limits"]
        subgraph sbnet["network: scoreboard (internal)"]
            sb["scoreboard<br/>Flask + SQLite"] --- vol[("scoreboard-data")]
        end
        subgraph c1["net-paper-trail (internal)"]
            pt["paper-trail"]
        end
        subgraph c2["net-cookie-jar (internal)"]
            cj["cookie-jar"]
        end
        subgraph c3["net-bookworm (internal)"]
            bw["bookworm"]
        end
        subgraph c4["net-fetch-docs (internal)"]
            fd["fetch-docs"]
        end
        gw --> sb & pt & cj & bw & fd
    end

Only the gateway sits on a routable network. Each challenge is alone on an internal network, so a player who gets code execution in one challenge can reach neither the scoreboard, nor the other challenges, nor the internet. ctfops verify-isolation proves this in CI from inside every container.

ServiceImageNotes
gatewaynginx-unprivileged (pinned digest)Single ingress. 2 req/s per client on flag submission, 1 req/s on login/register, per-IP connection caps, no version banner. Resolves upstreams lazily, so one challenge being replaced never takes the platform down.
scoreboardPython 3.13 / Flask / gunicornTeams, flag submission (HTML + JSON API), ranking with first bloods, event window, admin stats. scrypt passwords, hashed API tokens, CSRF tokens, CSP.
paper-trail, cookie-jar, bookworm, fetch-docsone shared challenge.DockerfileIntentionally vulnerable apps, one per container. The reference solver is stripped from the image.

The challenges

All original. Point values live in ctf.toml, the single source of truth for the event.

ChallengePointsDescription
Paper Trail100A billing portal with a guest account.
Cookie Jar150A staff noticeboard that remembers you with a cookie.
Bookworm200A library catalogue with a search box.
Fetch Docs200An internal docs viewer with a homemade path filter.
Spoilers: the intended bugs
ChallengeVulnerabilityReference exploit
Paper TrailInsecure direct object reference: invoices check login, not ownershiplog in as guest, walk invoice ids down to #1001
Cookie JarUnsigned client-side session (base64 JSON)decode the cookie, set "role": "admin", re-encode
BookwormSQL injection (SQLite)UNION SELECT from sqlite_master to find a hidden table, then dump it
Fetch DocsPath traversal past a one-pass ../ filter....// collapses to ../; read /proc/self/environ, where the flag was handed to the process

Each exploit is implemented in challenges/<id>/solve.py and runs in every pipeline.

Quick start (local)

Requires Docker with the Compose plugin and Python 3.11+.

pip install -r requirements-dev.txt
export PYTHONPATH=src

python -m ctfops new-seed > .ctf-seed && chmod 600 .ctf-seed   # gitignored; it IS every flag
python -m ctfops compose up -d --build --wait                    # build and start all six containers
python -m ctfops smoke --host localhost                          # play the CTF end to end

Open http://localhost:8000, register a team, and start hacking on ports 9001-9004. python -m ctfops compose down -v removes everything, including the scoreboard data.

ctfops compose ... is docker compose ... with the derived secrets injected into Compose's process environment. Each container receives only its own secret; a container started without one refuses to start, so a deploy that forgot the seed fails loudly instead of serving a guessable flag.

The pipeline

StageJobsWhat it proves
lintpython-lint, dockerfile-lint, compose-configRuff, Hadolint, Compose parses; ctfops validate checks that ctf.toml, compose.yaml, gateway/nginx.conf and the challenge folders describe the same platform, and that every service keeps its hardening and isolation
testunit-tests, secret_detection, semgrep-sast100+ tests (each challenge exploited in-process by its solver, >90% coverage gate); GitLab Secret Detection: no flag or seed was committed; SAST on the platform code
buildbuild-imagesdocker compose build + push of all six images, tagged with the commit SHA
scantrivy-images, trivy-configFails on fixable critical CVEs and on any secret found inside an image; Dockerfile misconfigurations
verifydeploy-ephemeralDeploys the pushed images to a Docker-in-Docker host with a throwaway seed, then: health, security headers, challenge list, every challenge solved and scored, bad flags and bad tokens rejected, admin auth, gateway rate limiting, isolation probes, and a scoreboard recreate that must keep its data
releasepromote-latest (main)Moves :latest to the verified images
deploydeploy-production (main, manual)Push-mode deploy over SSH; only appears once DEPLOY_HOST is configured

Everything runs on GitLab shared runners with the job token: no external credentials or servers. Merge request pipelines never see the real seed.

Deploying for real

See docs/deploying.md: seed handling, host preparation, the pull-based GitOps agent (deploy/systemd/), the push-mode job, and putting TLS in front.

Adding a challenge

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    755
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    510
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    415
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    343
  • 5

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    258

Explore all tools

Browse our collection of tools

View all tools →