跳到正文
cccskills
免费在 GitHub 公开

solve-challenge

Start unfamiliar CTF challenges by examining files, descriptions, and remote services, then route the work to an appropriate specialist skill. Guides category changes when progress stalls, checks candidate answers, and hands off to a solution write-up skill.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

集成工具Playwright
查看安装方法

适用场景

  • Finding a starting point for unfamiliar CTF challenges
  • Choosing a specialist skill from files and service behavior
  • Reassessing categories when an approach stalls
  • Validating candidate flags and preparing a solution write-up

包含的文件(2)

  • SKILL.md10.7 KB
  • difficulty-routing.md7.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 scripts/install_ctf_tools.sh all

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

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.

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. 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:

# 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:

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.

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.

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:

CategoryInvokeWhen to Use
Web/ctf-webXSS, SQLi, SSTI, SSRF, JWT, file uploads, prototype pollution
Pwn/ctf-pwnBuffer overflow, format string, heap, ROP, sandbox escape
Crypto/ctf-cryptoRSA, AES, ECC, PRNG, ZKP, classical ciphers
Reverse/ctf-reverseBinary analysis, game clients, VMs, obfuscated code
Forensics/ctf-forensicsDisk images, memory dumps, event logs, stego, network captures
OSINT/ctf-osintSocial media, geolocation, DNS, public records
Malware/ctf-malwareObfuscated scripts, C2 traffic, PE/.NET analysis
AI/ML/ctf-ai-mlModel weights (.safetensors, .pt, .pth, .bin, .onnx), prompt injection, LoRA adapters, adversarial examples
Misc/ctf-miscJails, 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.
# 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

# 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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

ctf-ai-ml

免费

Investigate AI and machine learning CTF challenges by inspecting model weights, comparing training changes, and exploring adversarial inputs that cause misclassification. Includes references for prompt injection, model reconstruction, and identifying possible training data.

中文简介正在准备中。当前显示英语简介。

  • Inspecting model weights and LoRA adapters
  • Creating inputs that cause misclassification
  • Exploring prompt injection in LLM challenges
ljagiello/ctf-skills35022026年10月20日 更新

Analyze cryptography challenges in CTF security competitions by matching clues to known weaknesses in encryption, signatures, and random number generators. Use technique summaries and supporting code examples to work toward recovering plaintext or keys.

中文简介正在准备中。当前显示英语简介。

  • Find an approach to an RSA challenge
  • Investigate weaknesses in AES encryption
  • Recover or predict a random generator's state
ljagiello/ctf-skills35022026年10月20日 更新

Analyze CTF evidence such as disk images, memory dumps, logs, and network captures to recover files and trace activity. Includes techniques for finding hidden data in images, audio, and PDFs, plus hardware signal analysis.

中文简介正在准备中。当前显示英语简介。

  • Recovering deleted files from disk images
  • Tracing activity in memory dumps and Windows logs
  • Reconstructing communications and transferred data from PCAP files
ljagiello/ctf-skills35022026年10月20日 更新

Analyze malware in CTF security challenges using techniques for obfuscated scripts, executable files, encrypted traffic, and memory dumps. Follow references to extract configurations, identify command-and-control servers, and find indicators of compromise, such as suspicious domains.

中文简介正在准备中。当前显示英语简介。

  • Deobfuscating JavaScript and PowerShell in CTF challenges
  • Extracting malware configurations and server addresses
  • Investigating encrypted traffic in packet captures
ljagiello/ctf-skills35022026年10月20日 更新

ctf-misc

免费

Explore CTF puzzles that span categories or use unusual formats, including layered encodings, restricted Python or Bash environments, QR codes, audio signals, and logic games. Provides technique references for decoding clues and solving constraints.

中文简介正在准备中。当前显示英语简介。

  • Decoding layered text encodings and QR puzzles
  • Analyzing restricted Python or Bash environments
  • Extracting clues from Morse audio and radio signals
ljagiello/ctf-skills35022026年10月20日 更新

ctf-osint

免费

Investigate CTF clues through OSINT, research using publicly available information. Use image searches, social profiles, DNS records, and archived pages to identify locations, trace accounts, and connect evidence from multiple public sources.

中文简介正在准备中。当前显示英语简介。

  • Identifying a photo location from signs and landmarks
  • Tracing usernames and account history across platforms
  • Investigating DNS records and archived web pages
ljagiello/ctf-skills35022026年10月20日 更新

查看 ljagiello 的全部技能

报告此技能的问题