Skip to content

Repository files navigation

🐟 flagfish

The CTF platform that can prove things.

Provable anti-cheat, a scoreboard you can rewind to any moment, and correctness tested against real Postgres.

LicenseGoPostgresStatus

The globe board: challenges placed in countries, a captured one lit green, a rival's solve pulsing in live

🎯 Catch flag sharing with proof

Every other platform gives you a hunch. flagfish gives you a database row. Unique per-team flags mean every solve is stamped with the team the flag was issued to — so "Team B submitted Team A's flag" is attributed_account_id <> account_id, not an argument you have to win. Detection is silent, so the cheater never learns to adapt. How it works →

Anti-cheat: flag sharing, IP overlap, and provable unissued solves

⏪ Rewind the scoreboard to any moment

Scores are stamped when they're earned, never recomputed on read. The board at any past instant is a query, not a reconstruction — which gets you an exact freeze, exact final standings, and an animated replay of the entire event for free. How it works →

Scoreboard with freeze and time-travel

🔒 Correct when a thousand people hit submit at once

The hard bugs in a CTF are races — and flagfish backs every one with a database constraint, not a Go mutex, then proves it against real Postgres.

100 goroutines submit the same flag → exactly one solve
100 goroutines race a first blood → exactly one winner
wrong answers (≈99% of submissions) → zero challenge locks taken

A mutex fixes one process; a constraint fixes all of them, forever. The 24 races we test →

Submitting a flag; the challenge value decays the instant it lands

🌍 A board worth putting on the projector

The challenge board is a view the organizer picks — and the built-in alternate is a WebGL globe. Challenges live in countries; solve everything in one and your team captures it. Rival solves and first bloods pulse on the map live, and the globe brings its own dark ops-center skin to the whole portal while it leads. The plain list stays one click away for every player, and a browser without WebGL falls back to it automatically. The design →

🛠️ Everything an organizer needs, already built

A 17-screen admin console with no placeholders — live submissions, statistics, manual awards, a one-click pause switch, unique-flag pools, brackets, a markdown CMS, anti-cheat dossiers, and backup / restore / CTFd-import over HTTP.

Live submissions logStatistics dashboard
GameplayRun the eventOperate it
Users & teams modeLive submissions + stats/metrics + /readyz
Dynamic + static scoringManual awards & penaltiesReal-time SSE
Per-account unique flagsOne-click pause switchOpenAPI 3.1 + RFC 7807
First blood, hints, prereqsAnti-cheat dossiersArgon2id auth, API tokens
Freeze, brackets, ?as_of=Backup / restore / importTrigger-based audit trail

Quickstart

$ cp deploy/.env.example deploy/.env # set your secrets
$ task deploy-up # flagfish + Postgres + MinIO → http://localhost:8000
$ flagfish admin create --email you@example.com # instance live + first admin, in one step

Full runbook, TLS, and backups: deploy guide → · every knob: configuration →

Status

Pre-1.0, and honest about it. Feature-complete for a jeopardy CTF and heavily tested — the invariant, concurrency, and authorization suites all run against real Postgres on every change. What it doesn't have yet: a tagged release, a stable-API promise, or a real event behind it.

No CTF has been run on flagfish — be the first. Great for a small or internal competition today; for a marquee event with prize money, wait for 1.0.

Docs & design

Every stack choice has an ADR explaining what it cost, and the long-form design lives in docs/design/. New here? Start with Why flagfish.

License

Apache-2.0, with an explicit patent grant. Contributions welcome — see CONTRIBUTING.md; security reports go to SECURITY.md.

About

🐟🚩 Self-hosted CTF platform in one Go binary — race-free scoring, a rewindable scoreboard, and anti-cheat that catches flag sharing.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages