Golfing with Dragons: Building Secure Environments for CTFs
summary
Built a Jeopardy-style CTF called ghidra golf that runs arbitrary competitor Java/Python scripts against binaries, threat-modeling rogue competitor, availability, broken challenges. Controls include static scans with Bandit and Yara, image scanning with Trivy, runtime hardening (drop capabilities, seccomp, non-root, read-only mounts), LinPEAS/OpenSCAP checks, and network isolation via Cloudflare tunnels. Monitoring with Prometheus and Grafana detects spikes — one 30 MB static binary caused a 20–22 minute CPU surge with 10–30 simultaneous players and was fixed by redeploying a dynamic build.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:57DevSecOps & Capture The Flags Competitions
- 2:46Ghidra Golf - A Spin on Jeopardy Style CTF
- 4:44Threat Modeling YOUR Competition
- 5:18Rogue Competitors - How to safely enable arbitrary code execution
- 6:14Infrastructure Availability
- 7:29Resolving Broken Challenges
- 8:39Infrastructure Monitoring - Identifying Broken Challenge
- 10:16Implementing Controls Throughout the Competition
- 14:03Example - Bandit Scans
- 15:38Example - YARA Rule Implementation
- 19:15Example - Hardening Runtime
- 22:06Example - Privilege Escalation Opportunities in Images
- 24:20Isolated Host-Container Overlay Networks
