Generate realistic, flag-embedded PCAP files for CTF competitions. A PCAP (packet capture) file records network traffic that participants analyze using tools like Wireshark to find hidden flags.
- 12 scenarios (10 attack + 2 tutorials) across 5 categories -- from SYN port scans and SQL injection to DNS tunneling and reverse shells
- 3 difficulty levels controlling background noise ratio, flag encoding complexity, and flag splitting across packets
- CTFd integration for pushing challenges, flags, and PCAPs directly to a CTFd instance via its API
- Batch generation with ZIP download for producing multiple challenges at once
- In-browser PCAP preview with packet statistics, protocol breakdown, and flag verification
- Auto-generated writeups with scenario explanations and Wireshark display filters
- Challenge export as ctfcli-compatible
challenge.ymlfiles - Docker-first -- the entire application runs in containers with no host dependencies beyond Docker
- Built with Flask, Scapy, HTMX, and Bootstrap 5
-
Clone the repository:
git clone https://github.com/profzeller/ctf-pcap-generator.git cd ctf-pcap-generator -
Configure environment:
cp .env.example .env
-
Build the Docker image:
make build
-
Start the application:
make run
-
Open your browser at http://localhost:5000. You should see a scenario selection page where you can pick an attack type, choose a difficulty, and generate your first PCAP.
For Windows commands (if make is not available), troubleshooting, and advanced configuration, see the Deployment Guide.
Windows note: If you do not have
makeinstalled, you can usedocker compose buildanddocker compose updirectly. The deployment guide lists thedocker composeequivalent for everymakecommand.
| Guide | Description |
|---|---|
| Deployment Guide | Prerequisites, installation, first run, troubleshooting |
| Scenario Reference | All 12 scenarios with protocols, categories, and Wireshark filters |
| Configuration Reference | Every environment variable with types, defaults, and valid values |
| CTFd Integration Guide | Connect to CTFd, push challenges and flags via API |
| For Professors | Competition planning checklists and starter scenario packs |
| Contributing | Development setup, code style, and how to submit changes |
| Changelog | Release history and notable changes |
This project is licensed under the Apache License 2.0 -- see LICENSE for details.