К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

solve-challenge — скилл для Claude Code: что делает и как установить

Проводит первичную разведку CTF-задачи, определяет её категорию и направляет к профильному ctf-* скиллу. Нужен, когда у вас есть файлы, сервис или лишь краткое описание.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add ljagiello/ctf-skills --skill solve-challenge -a claude-code
Открыть на GitHub

Что делает solve-challenge

Скилл начинает с разбора файлов, ссылок, подсказок и удалённых сервисов. Затем сопоставляет типы файлов, ключевые слова и поведение сервиса с категорией задачи: web, pwn, crypto, reverse, forensics, osint, malware, ai-ml или misc. После этого он вызывает подходящий ctf-* скилл с профильными приёмами.

Для площадок CTFd скилл проверяет API и запрашивает у пользователя токен доступа, чтобы работать через API. На площадках без подходящего API он использует Playwright MCP для входа, чтения условий, загрузки вложений и отправки флага. Если категория уже ясна, лучше сразу вызвать профильный ctf-* скилл, потому что solve-challenge нужен именно для маршрутизации и разведки.

Нужен агент с доступом к файловой системе, bash, Python и интернету. Инструменты ставятся заранее через общий скрипт или по мере работы с конкретной категорией.

Какие задачи решает

  • разобрать файлы CTF-задачи перед анализом
  • определить категорию по расширению, описанию и поведению сервиса
  • проверить CTFd и перейти к навигации через API
  • открыть JS-интерфейс площадки через Playwright MCP
  • направить задачу к нужному ctf-* скиллу

Примеры запросов агенту

  • Используй скилл solve-challenge для архива `challenge.zip` и определи, с чего начать.
  • Запусти solve-challenge для сервиса `nc host port` и выбери категорию задачи.
  • Разбери через solve-challenge описание CTF-задачи и приложенный файл `sample.pcapng`.

Как установить solve-challenge

1Через Skills CLI (Vercel)

npx skills add ljagiello/ctf-skills --skill solve-challenge -a claude-code

2Вручную: положить файлы

~/.claude/skills/solve-challenge/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/solve-challenge/

Из того же набора11

Весь набор →
ctf-reverse ljagiello Справочник по реверс-инжинирингу для CTF: помогает агенту разбирать скомпилированные бинарники, распаковывать протекторы и анализировать виртуальные машины. Claude Code CX Codex Cursor +1 10 100установок ctf-web ljagiello Скилл направляет агента при решении веб-задач в CTF: от разведки инъекций и обхода авторизации до SSRF и фаззинга API. Claude Code CX Codex Cursor +1 9 700установок ctf-pwn ljagiello Справочник по бинарной эксплуатации для CTF-задач. Помогает собирать эксплойты при переполнениях буфера и повреждениях памяти. Claude Code CX Codex Cursor +1 9 400установок ctf-crypto ljagiello Скилл помогает разбирать криптографические задачи CTF: от RSA и AES до атак на хеши, подписи, PRNG и ZKP. Claude Code CX Codex Cursor +1 9 200установок ctf-osint ljagiello Помогает исследовать публичные источники, аккаунты, домены и изображения в CTF-задачах. Пригодится, когда зацепки разбросаны по вебу и соцсетям. Claude Code CX Codex Cursor +1 9 100установок ctf-forensics ljagiello Набор техник цифровой криминалистики и анализа сигналов для CTF: образы дисков, дампы памяти, PCAP, стеганография, Windows-артефакты и side-channel атаки. Claude Code CX Codex Cursor +1 9 000установок ctf-misc ljagiello Скилл даёт шпаргалки по редким CTF-задачам: побегам из песочниц, экзотическим кодировкам и сигналам. Пригодится, когда задание не сводится к чистому вебу или бинарному эксплойту. Claude Code CX Codex Cursor +1 8 800установок ctf-malware ljagiello Скилл помогает разбирать вредоносные образцы и сетевой трафик в CTF-задачах. Пригодится для PE, .NET, обфусцированных скриптов, PCAP и C2-протоколов. Claude Code CX Codex Cursor +1 8 700установок

Похожие

requesting-code-review Hermes Agent (adapted from obra/superpowers + MorAlekss) Конвейер проверки кода перед коммитом: статический аудит безопасности, контроль регрессий по тестам, запуск субагента-ревьюера и цикл автоисправления. Claude Code CX Codex Cursor +1 467установок privacy-policy phuryn Скилл помогает составить подробную политику конфиденциальности с учётом GDPR, CCPA и других требований. Пригодится при создании политики для нового продукта или обновлении документов по защите данных. Claude Code CX Codex Cursor +1 3 500установок websocket-engineer https://github.com/Jeffallan Скилл помогает проектировать WebSocket- и Socket.IO-системы: сообщения, комнаты, presence и масштабирование через Redis. Claude Code CX Codex Cursor +1 6 800установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. Claude Code 499 069установок ponytail-review DietrichGebert Скилл проверяет изменения глубже обычного diff: читает связанный код, ищет ошибки, риски, проблемы нагрузки и недостающие тесты. Пригодится для ревью PR и коммитов. Claude Code CX Codex Cursor +1 56 300установок ponytail-audit DietrichGebert Проверяет репозиторий и ранжирует ошибки, риски и лишний код. Подойдёт, если нужен разовый разбор без автоматических правок. Claude Code CX Codex Cursor +1 44 800установок security-audit cloudflare Проверяет кодовую базу на уязвимости и ищет нарушения границ доверия. Пригодится перед релизом или для точечного разбора опасных участков кода. Claude Code CX Codex Cursor +1 52 200установок security-and-hardening addyosmani Помогает проектировать защиту и проверять код на уязвимости при работе с вводом, авторизацией, сессиями и внешними сервисами. Подойдёт перед релизом и при создании функций, которые обрабатывают недоверенные данные. Claude Code CX Codex Cursor +1 69 400установок

Вопросы о solve-challenge

Как установить solve-challenge в Claude Code?

Выполните npx skills add ljagiello/ctf-skills --skill solve-challenge -a claude-code, затем повторите npx skills add ljagiello/ctf-skills --skill solve-challenge -a claude-code. Файл скилла будет расположен в ~/.claude/skills/solve-challenge/SKILL.md.

Что делает solve-challenge?

Скилл проводит первичную разведку CTF-задачи, выбирает её основную категорию и передаёт работу профильному ctf-* скиллу. Он обрабатывает наборы файлов, удалённые сервисы, ссылки и краткие описания.

Что требуется для работы solve-challenge?

Нужен агент с файловой системой, bash, Python и доступом к интернету. Для CTFd скилл запрашивает токен API у пользователя.

Исходный текст

SKILL.md · MIT
---
name: solve-challenge
description: Solves CTF challenges by performing first-pass triage, identifying the dominant category, and routing execution to the right specialized ctf-* skill. Use when the user gives you a challenge bundle, a remote service, a suspicious file, or only a vague challenge description and you must determine where to start. Do not use it when the category is already clear and a specialized skill can be invoked directly; this is the dispatcher and recon entrypoint, not the deepest reference for category-specific techniques.
license: MIT
compatibility: Requires filesystem-based agent (Claude Code or similar) with bash, Python 3, and internet access. Orchestrates other ctf-* skills.
allowed-tools: Bash Read Write Edit Glob Grep Task WebFetch WebSearch Skill
metadata:
  user-invocable: "true"
  argument-hint: "[category] [challenge-file-or-url]"
---

# CTF Challenge Solver

You're a skilled CTF player. Your goal is to solve the challenge and find the flag.

## Environment Setup

Two setup strategies depending on your workflow:

### Pre-install (recommended before competitions)

Use the central installer entrypoint:

```bash
bash scripts/install_ctf_tools.sh all
```

Run a narrower mode when you only want one tool group:

```bash
bash scripts/install_ctf_tools.sh python
bash scripts/install_ctf_tools.sh apt
bash scripts/install_ctf_tools.sh brew
bash scripts/install_ctf_tools.sh gems
bash scripts/install_ctf_tools.sh go
bash scripts/install_ctf_tools.sh manual
```

The full package lists now live in [scripts/install_ctf_tools.sh](../scripts/install_ctf_tools.sh).

### On-demand (during challenges)

Each category skill's `SKILL.md` has a **Prerequisites** section listing only the tools needed for that category. Install as you go.

## Workflow

Before selecting or escalating a model, read
[difficulty-routing.md](difficulty-routing.md). Use its evidence-based scoring,
stop-loss rules, and tier gates throughout the workflow.

### Step 0: CTFd Platform Detection

If the CTF platform URL is known, check if it runs CTFd and switch to API-driven navigation:

```bash
# Detect CTFd (look for /api/v1/ and /themes/core/)
curl -s "$CTF_URL/api/v1/" | head -5
curl -s "$CTF_URL" | grep -oE '/themes/core/'
```

If CTFd is detected, **ask the user for their API token** (generated from CTFd Settings > Access Tokens). The token is not provided by default — the user must create one in the CTFd web UI first. Once provided, set the environment variables and proceed via API:

```bash
export CTF_URL="https://ctf.example.com"
export CTF_TOKEN="ctfd_..."  # Ask user for this
```

Invoke `/ctf-misc` and load its `ctfd-navigation.md` for the full API reference and Python client class.

#### CTF Platform Interaction via Playwright MCP

When the platform is **not** CTFd, has no usable API, or gates challenges behind a
JS-rendered UI / login, drive the platform in a real browser with **Playwright
MCP** (`https://github.com/microsoft/playwright-mcp`). This lets the agent read
challenge text, download attachments, keep a login session, and submit flags
directly through the site.

```text
browser_navigate "https://ctf.example.com/challenges"
browser_snapshot                 # list challenges, points, categories (rendered)
browser_click <challenge ref>    # open a challenge card
browser_snapshot                 # read description, hints, attachment links
browser_click <attachment ref>   # download the challenge file (saved by the browser)
# ... solve the challenge ...
browser_type <flag input ref> "flag{...}"
browser_click <submit ref>
browser_find text="Correct"      # cheaper than a full snapshot to check the verdict
```

`browser_find` (text or regex over the accessibility tree) is the right tool
whenever you only need to confirm one value — reserve full `browser_snapshot`
for when you need element refs to click or type into.

Login sessions (cookies/localStorage) persist across tool calls, so authenticate
once and every later navigation is authorized. For general browser-automation
tooling see [../ctf-web/tools-mcp.md](../ctf-web/tools-mcp.md#playwright-mcp-browser-automation).

**Prefer a native API when one exists** (CTFd token flow above is faster and more
reliable); use Playwright MCP for platforms without an API or when the challenge
list only renders client-side.

### Step 1: Recon

1. **Explore files** -- List the challenge directory, run `file *` on everything
2. **Triage binaries** -- `strings`, `xxd | head`, `binwalk`, `checksec` on binaries
3. **Fetch links** -- If the challenge mentions URLs, fetch them FIRST for context
4. **Connect** -- Try remote services (`nc`) to understand what they expect
5. **Read hints** -- Challenge descriptions, filenames, and comments often contain clues

### Step 2: Categorize

Determine the primary category, then invoke the matching skill.

**By file type:**
- `.pcap`, `.pcapng`, `.evtx`, `.raw`, `.dd`, `.E01` -> forensics
- `.elf`, `.exe`, `.so`, `.dll`, binary with no extension -> reverse or pwn (check if remote service provided -- if yes, likely pwn)
- `.py`, `.sage`, `.txt` with numbers -> crypto
- `.apk`, `.wasm`, `.pyc` -> reverse
- `.safetensors`, `.pt`, `.pth`, `.bin`, `.onnx` -> ai-ml
- Web URL or source code with HTML/JS/PHP/templates -> web
- Images, audio, PDFs with no obvious content -> forensics (steganography)

**By challenge description keywords:**
- "buffer overflow", "ROP", "shellcode", "libc", "heap" -> pwn
- "RSA", "AES", "cipher", "encrypt", "prime", "modulus", "lattice", "LWE", "GCM" -> crypto
- "XSS", "SQL", "injection", "cookie", "JWT", "SSRF" -> web
- "disk image", "memory dump", "packet capture", "registry", "power trace", "side-channel", "spectrogram", "audio tracks", "MKV" -> forensics
- "find", "locate", "identify", "who", "where" -> osint
- "obfuscated", "packed", "C2", "malware", "beacon" -> malware
- "prompt injection", "LoRA", "adversarial", "model weights", "embedding" -> ai-ml
- "jail", "sandbox", "escape", "encoding", "signal", "game", "Nim", "commitment", "Gray code" -> misc

**By service behavior:**
- Port with interactive prompt, crash on long input -> pwn
- HTTP service -> web
- netcat with math/crypto puzzles -> crypto
- netcat with restricted shell or eval -> misc (jail)

### Step 3: Invoke the Category Skill

Once you identify the category, **invoke the matching skill** to get specialized techniques:

| Category | Invoke | When to Use |
|----------|--------|-------------|
| Web | `/ctf-web` | XSS, SQLi, SSTI, SSRF, JWT, file uploads, prototype pollution |
| Pwn | `/ctf-pwn` | Buffer overflow, format string, heap, ROP, sandbox escape |
| Crypto | `/ctf-crypto` | RSA, AES, ECC, PRNG, ZKP, classical ciphers |
| Reverse | `/ctf-reverse` | Binary analysis, game clients, VMs, obfuscated code |
| Forensics | `/ctf-forensics` | Disk images, memory dumps, event logs, stego, network captures |
| OSINT | `/ctf-osint` | Social media, geolocation, DNS, public records |
| Malware | `/ctf-malware` | Obfuscated scripts, C2 traffic, PE/.NET analysis |
| AI/ML | `/ctf-ai-ml` | Model weights (`.safetensors`, `.pt`, `.pth`, `.bin`, `.onnx`), prompt injection, LoRA adapters, adversarial examples |
| Misc | `/ctf-misc` | Jails, encodings, RF/SDR, esoteric languages, constraint solving |

You can also invoke `/ctf-<category>` to load the full skill instructions with detailed techniques.

### Step 4: Pivot When Stuck

If your first approach doesn't work:

1. **Re-examine assumptions** -- Is this really the category you think? A "web" challenge might need crypto for JWT forgery. A "forensics" PCAP might contain a pwn exploit to replay.
2. **Try a different category skill** -- Many challenges span multiple categories. Invoke a second skill for the cross-cutting technique.
3. **Look for what you missed** -- Hidden files, alternate ports, response headers, comments in source, metadata in images.
4. **Simplify** -- If an exploit is too complex, check if there's a simpler path (default creds, known CVE, logic bug).
5. **Check edge cases** -- Off-by-one, race conditions, integer overflow, encoding mismatches.

**Common multi-category patterns:**
- Forensics + Crypto: encrypted data in PCAP/disk image, need crypto to decrypt
- Web + Reverse: WASM or obfuscated JS in web challenge
- Web + Crypto: JWT forgery, custom MAC/signature schemes
- Reverse + Pwn: reverse the binary first, then exploit the vulnerability
- Forensics + OSINT: recover data from dump, then trace it via public sources
- Misc + Crypto: jail escape requires building crypto primitives under constraints
- OSINT + Stego: social media posts with unicode homoglyph steganography (Cyrillic lookalikes encode bits)
- Web + Forensics: paywall bypass (curl reveals content hidden by CSS overlays)
- Misc + Crypto + Game Theory: multi-phase interactive challenges with AES decryption → HMAC commitment → combinatorial game solving (GF(256) Nim)
- Crypto + Geometry + Lattice: multi-layer challenges progressing from spatial reconstruction → subspace recovery → LWE solving → AES-GCM decryption
- Forensics + Signal Processing: power traces / side-channel analysis requiring statistical analysis of measurement data
- Forensics + Network + Encoding: timing-based encoding in PCAP (inter-packet intervals encode binary data)

### Step 5: Generate Write-up

After solving the challenge, invoke `/ctf-writeup` to generate a standardized submission-style writeup — concise, reproducible, and ready for competition organizers or teammates to validate.

## Flag Formats

Flags vary by CTF. Common formats:
- `flag{...}`, `FLAG{...}`, `CTF{...}`, `TEAM{...}`
- Custom prefixes: check the challenge description or CTF rules for the format (e.g., `ENO{...}`, `HTB{...}`, `picoCTF{...}`)
- Sometimes just a plaintext string with no wrapper

**Validation rule (important):**
- If you find multiple flag-like strings, treat them as candidates and validate before finalizing.
- Prefer the token tied to the intended artifact/workflow (not random metadata noise or obvious decoys).
- Do a corpus-wide uniqueness check and include the source file/path when reporting.

```bash
# Search for common flag patterns in files
grep -rniE '(flag|ctf|eno|htb|pico)\{' .
# Search in binary/memory output
strings output.bin | grep -iE '\{.*\}'
```

## Quick Reference

```bash
# Recon
file *                                    # Identify file types
strings binary | grep -i flag             # Quick string search
xxd binary | head -20                     # Hex dump header
binwalk -e firmware.bin                   # Extract embedded files
checksec --file=binary                    # Check binary protections

# Connect
nc host port                              # Connect to challenge
echo -e "answer1\nanswer2" | nc host port # Scripted input
curl -v http://host:port/                 # HTTP recon

# Python exploit template
python3 -c "
from pwn import *
r = remote('host', port)
r.interactive()
"
```

## Challenge

$ARGUMENTS

© ljagiello · MIT · ljagiello/ctf-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой