ctf-attack-defense
БесплатноЗапускает вложенные скриптыНе проверенUse when the user mentions attack-defense, A/D, tick-based CTF, defending a service, patching a gamebox or service, flag ids, an exploit farm, SLA scoring…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Attack-Defense (tick-based)
You get a vulnerable service + a gamebox. Every tick the organizer's checker tests your service (SLA points) and plants fresh flags; you steal flags from other teams' instances (attack points) while patching your own. Score = attack + defense, compounded every tick until the event ends.
Operating rules (in force all event)
- Remote gate, A/D flavor: the router's remote gate stands, but A/D is
high-volume automation — get one pre-authorization per event
("A/D remote OK for
<event>") covering team subnets, gameboxes, and the scoreboard API. Nothing outside the event network, ever. - Organizer bundle is untrusted: source, checker, and bot are challenge
artifacts. Execute them under
podmanisolation or on the gamebox/VPN box, never bare on the host. Neversudothem. - No DoS: crashing other teams' services violates every A/D rulebook and wastes their ticks — exploits are surgical input, not floods.
- Never debug an exploit against another team's box: you have a local replica; use it. Probing half-working exploits at other teams leaks your 0-day in their pcaps and marks you in organizer logs.
Triage — event anatomy (first 30 minutes)
Inventory what the organizers handed us; each artifact routes somewhere:
| Handout | Meaning | Read |
|---|---|---|
| Service source bundle (tar/zip) | Your service, patchable in place | references/defense.md |
| Binary-only service | Binary patch or validating proxy | references/defense.md (binary section) |
| Checker / bot script | The SLA contract — what must keep working | references/runbook.md |
| Flag ids per team (list/JSON/page) | Attack targets for the farm | references/offense.md |
| VPN config + team IP map | Network layout, subnets, your box | references/infra.md |
| Scoreboard URL + API/token | Submission endpoint | references/infra.md |
| Rules: tick length, scoring formula | Rhythm and priorities | references/runbook.md |
5-minute checklist (expanded in references/runbook.md):
1. unpack bundle -> services/<svc>/orig/ # never edit orig/
2. find the checker; read what it asserts # this IS the SLA contract
3. podman-compose replica up; checker-wrap.sh green # offline lab ready
4. fetch flag ids -> farm/ids.json; teams.txt # attack targets cached
5. farm.py --dry-run vs your own instance # farm loop proven
Playbook — doctrine: fix SLA first, then farm
Why defense first, in this order:
- Defense points are a ratchet: SLA and defense score accrue every tick whether or not you exploit anything. A dead or checker-failing service bleeds points every single minute it is broken — usually faster than a small team can win them back by attacking.
- The replica is the lab: until the service runs locally and the checker is green, you cannot safely test patches OR exploits — nothing else scales.
- Offense compounds after: once the farm and submission queue run unattended, attack points accumulate with zero humans in the loop; humans go back to patching and mining traffic.
Order: (1) stock service up, checker green; (2) baseline capture + farm skeleton dry-run; (3) first minimal patches; (4) first exploit modules; (5) steady per-tick rhythm.
| Phase | Preconditions | Command | Reference |
|---|---|---|---|
| Local replica | bundle unpacked | podman-compose up -d (in compose/) |
references/runbook.md |
| Verify SLA | service listening | scripts/checker-wrap.sh -n <svc> -- ./check.sh |
references/runbook.md |
| Make patch | vuln located in source | diff -ruN orig/src patched/src > patches/NNN-x.patch |
references/defense.md |
| Deploy | checker green on replica | rsync -a patched/src/ box:svc/ → restart → re-check |
references/defense.md |
| Cache ids | ids published | fetch → farm/ids.json (jq normalize) |
references/offense.md |
| Farm dry-run | ids + teams + 1 exploit | python3 scripts/farm.py --root farm --dry-run |
references/offense.md |
| Farm live | submit cmd tested | python3 scripts/farm.py --root farm --interval <tick> --submit-cmd ./submit.sh |
references/infra.md |
| Monitor | verdicts.log growing | alert on 2 consecutive FAIL | references/infra.md |
Per-tick rhythm (assume 5-minute ticks)
| Moment | Action |
|---|---|
| T+0 | Farm fires (systemd timer, ≤20s jitter); flags queue and submit |
| T+0:30 | Read SLA verdict; 2 consecutive FAIL → patcher drops everything, rollback |
| T+1 | Triage captures/ for incoming exploits; adapt + patch same bug |
| T+2 | Patch queue: next minimal patch; checker-green before any deploy |
| T+4 | Farm hit-rate check; retire dead exploit modules |
Endgame: farm runs to the last tick; freeze risky patches near the end;
defense weight rises as public exploits spread (details: references/runbook.md).
References
- repo
docs/attack-defense/README.md— human team playbooks (3-person: beginner / intermediate / exp
Установить ctf-attack-defense в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ctf-attack-defense?
Use when the user mentions attack-defense, A/D, tick-based CTF, defending a service, patching a gamebox or service, flag ids, an exploit farm, SLA scoring, service checker or bot, red vs blue team CTF, or farming flags from other teams while keeping their own service alive. Covers patch doctrine, checker/SLA verification, traffic capture and mining, flag-id extraction, and farm infrastructure. Router skill `ctf` owns workspace, flag log, and submission basics.
Как установить скилл ctf-attack-defense?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ctf-attack-defense запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic