Skip to content
Projekte

Über uns

Anti-cheat plugin for CTFd: tracks the activity of players and teams and catches AI agents, scripts, shared accounts, shared flags, flag brute-forcing and suspiciously fast solves.

KI und maschinelles Lernen

So werden diese Zahlen gemessen

What you can do

  • Client activity - on - Logs requests from self-identified AI agents (ChatGPT, Claude, Gemini, Perplexity, Cursor, browser-use, …), automation libraries and tools (python-requests, curl, Playwright, Selenium, sqlmap, …), CTFd API tokens, and in-page browser-automation marks such as navigator.webdriver. Player API tokens can be revoked from the same page.
  • Shared devices - on - Every browser gets a random device-ID cookie. Devices used by accounts on different teams are listed, a strong account-sharing signal that a VPN does not hide.
  • Flag brute-force lockout - on - A team (or user) that submits too many wrong flags on one challenge is locked out of that challenge for a while. Threshold, window and duration are configurable.
  • Flag sharing - on - For challenges you mark as having unique flags (an instancer, or a remote service that prints a per-session suffix accepted by a regex flag), reports the same flag submitted by two teams: who had it first, who reused it, and whether CTFd accepted it. A scan button checks everything submitted before, so you can audit a finished event too.

Gemessener Sternzuwachs

in 24h
0
in 7 days
+1
in 15 days
Verlauf wird gesammelt
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

Warden — anti-cheat plugin for CTFd

Tests CTFd 3.8 License: Apache-2.0

Built with ❤️ to bring the old CTF era back: real skills, fair play, no shortcuts.

Warden is an anti-cheat plugin for CTFd. It tracks the activity of every player and team during your CTF and shows you who is cheating: AI agents and scripts, shared accounts, flags passed between teams, honeypot flags, flag brute-forcing and suspiciously fast solves, with one page per team that puts it all together. It also gives you the tools to act: per-challenge lockouts and per-team challenge bans. It grew out of the anti-cheat tooling used at Securinets CTF Quals 2026.

Copy one folder into CTFd, restart, done. No theme changes, no CTFd core patches.

Features

Every feature can be switched on or off from Admin → Warden, without a restart. Every page can be filtered by player name, team name, challenge name and IP address.

Feature Default What it does
Client activity on Logs requests from self-identified AI agents (ChatGPT, Claude, Gemini, Perplexity, Cursor, browser-use, …), automation libraries and tools (python-requests, curl, Playwright, Selenium, sqlmap, …), CTFd API tokens, and in-page browser-automation marks such as navigator.webdriver. Player API tokens can be revoked from the same page.
Shared devices on Every browser gets a random device-ID cookie. Devices used by accounts on different teams are listed, a strong account-sharing signal that a VPN does not hide.
Flag brute-force lockout on A team (or user) that submits too many wrong flags on one challenge is locked out of that challenge for a while. Threshold, window and duration are configurable.
Flag sharing on For challenges you mark as having unique flags (an instancer, or a remote service that prints a per-session suffix accepted by a regex flag), reports the same flag submitted by two teams: who had it first, who reused it, and whether CTFd accepted it. A scan button checks everything submitted before, so you can audit a finished event too.
Honeypot flags on Decoy flags you plant where only a cheater would take them from: a comment in a web page, a string in a binary, hidden text that AI agents read. Anyone who submits one, on any challenge or on the one you chose, is recorded with their team, IP and time. They only see the usual "incorrect".
Fast solves always available Lists players who solved several challenges in a short time, by default 3 within 2 minutes, with the challenges and times. It reads CTFd's own solves, so it also works on a finished event. The numbers are configurable, and challenges meant to be instant, like a welcome flag, can be ignored.
Team pages always available One page per team (or player, in users mode) with everything Warden found about it: flags it copied and flags copied from it, solve bursts, devices and IP addresses shared with other teams, AI and script activity, lockouts and blocks. A Teams tab ranks teams by how many signals they have.
Challenge blocks always available Bar one team or user from one challenge, e.g. after revoking a solve for flag sharing. The challenge disappears from their list and submissions are refused.
Team privacy off Hides team rosters, member countries and the user list from other players. Admins and the team itself still see everything.

[!IMPORTANT] Client signals are hints, not proof. Headers can be forged, and scripts and API tokens are normal CTF tools. Use Warden's data to decide where to look, together with other evidence.

Screenshots

Overview Client activity
Overview: feature switches, lockouts and challenge blocks Client activity: AI agents, scripts and API tokens
Shared devices Flag sharing
Shared devices: one browser used by two teams Flag sharing: a unique flag submitted by two teams
Fast solves Honeypots
Fast solves: four challenges solved in twelve seconds Honeypots: decoy flags and the players who submitted them
Team page
Team page: every signal about one team

Install

This repository is the plugin. Put it in CTFd's plugins folder and restart CTFd:

cd CTFd/plugins
git clone https://github.com/0xZyyz/ctfd-warden

That's it: Warden creates its tables on startup, then appears under Admin → Warden. Any folder name works; just keep the same name once CTFd has started with it, because CTFd records the plugin's database version under that name.

If you run the official Docker image, mount the clone into the plugins folder the same way:

services:
  ctfd:
    image: ctfd/ctfd:3.8.9
    volumes:
      - ./ctfd-warden:/opt/CTFd/CTFd/plugins/ctfd-warden:ro

Requirements

  • CTFd 3.8.x with SQLite, MySQL/MariaDB or PostgreSQL. Tested on 3.8.0 and 3.8.9, and end-to-end on MariaDB with Redis and several workers. Older 3.x releases may work but are not tested.
  • Redis is recommended. It is the default in CTFd's docker-compose. With Redis, lockout counters are atomic across workers. Without it, Warden logs a warning and the lockout still works, but counters are per worker.
  • Behind a reverse proxy (nginx, Traefik, Cloudflare, a load balancer), configure CTFd's REVERSE_PROXY setting so CTFd sees the real client IP. Otherwise every player shows the proxy's IP on the Warden pages.

Themes

Warden works with CTFd's default core theme and with custom themes. The automation-signal script is injected through CTFd's plugin scripts, so your theme's base.html must render {{ Plugins.scripts }}, as every standard theme does.

Configuration

Everything is managed on Admin → Warden. Feature switches can also be forced from the environment, which is useful for deployments managed as code. A feature forced this way is shown as locked on the admin page.

Environment variable Feature
WARDEN_CLIENT_ACTIVITY Client activity
WARDEN_DEVICE_TRACKING Shared devices
WARDEN_FLAG_LOCKOUT Flag brute-force lockout
WARDEN_FLAG_SHARING Flag sharing
WARDEN_HONEYPOT_FLAGS Honeypot flags
WARDEN_TEAM_PRIVACY Team privacy

Use 1/0 (or true/false, on/off). Unset means the admin page decides.

Flag sharing

Flag sharing can only be detected when teams get different flags. Two common ways:

  • Remote services (nc, web): have the service add a random suffix to the flag for every connection, e.g. flag{some_string_<16 hex>}, and give the challenge a regex flag such as flag\{some_string_[0-9a-f]{16}\}. Logging the suffix on the server side also lets you trace any submitted flag back to one connection.
  • Instancers that put a different flag in every team's instance.

Then tick the challenge on Admin → Warden → Flag sharing. Warden compares every submission on watched challenges, accepted or not, with the earlier correct submissions of other teams.

Data Warden stores

Tell your players about it, for example in your rules. All of it can be deleted from the admin pages.

What Where Why
For flagged requests only: time, user, team, IP, User-Agent, Referer, method, path warden_client_events Client activity (sampled once per user and client every 10 minutes)
Random device ID, user, last IP, User-Agent, first and last seen warden_device_sessions + warden_device cookie (HttpOnly, 1 year) Shared devices
Lockouts: time, team, user, challenge, IP, attempt count warden_lockout_events Flag lockout
Shared flags: challenge, flag, both teams and players, result, IP, time warden_flag_shares Flag sharing
Honeypot hits: challenge, decoy flag, team, player, IP, time warden_honeypot_hits Honeypot flags
Settings, challenge blocks, fast solve limits CTFd's config table, keys warden_* Configuration

Ordinary browser requests are never logged. Warden sends nothing to third parties.

Development

The tests/, scripts/ and .github/ folders are for development only; CTFd ignores them. Tests run inside the official CTFd image, so only Docker is needed:

scripts/test-docker.sh                       # CTFd 3.8.9
CTFD_VERSION=3.8.0 scripts/test-docker.sh    # another CTFd release
scripts/test-docker.sh -k lockout            # extra pytest arguments

See CONTRIBUTING.md for the project layout and conventions, and SECURITY.md to report a vulnerability.

Credits

Built by Mohamed Aziz Rahmouni (0xZyyz) for Securinets CTF Quals 2026, and released so other organisers can use it.

If Warden keeps your CTF fair, give the repo a ⭐ so other organisers can find it too.

License

Apache-2.0, the same license as CTFd.

Ähnliche Projekte entdecken

Wird geladen…