一键导入
ctf-solver
Solve CTF (Capture The Flag) challenges by analyzing challenge descriptions, source code, and interacting with challenge environments to capture flags.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Solve CTF (Capture The Flag) challenges by analyzing challenge descriptions, source code, and interacting with challenge environments to capture flags.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Find and fix a bug or issue — from any source (GitHub issue, error message, user report, or observed behavior)
Review code changes or a pull request — delegates to specialist agents for code quality, security, performance, and documentation.
Safely refactor code with test coverage as a safety net
Scan changes, commit, push, and create a PR — with confirmation at each step
Test-Driven Development loop — write a failing test first, then the minimum code to pass it, then refactor. Repeat.
Write comprehensive tests for new or changed code. Use automatically when new features are added, functions are created, or behavior is modified.
| name | ctf-solver |
| description | Solve CTF (Capture The Flag) challenges by analyzing challenge descriptions, source code, and interacting with challenge environments to capture flags. |
| compatibility | Requires network access to challenge environment. Python3 with requests library recommended. |
| metadata | {"category":"security","difficulty":"variable"} |
| tags | ["security","ctf","capture-the-flag","challenge","exploit"] |
| triggers | ["ctf challenge","capture the flag","ctf solve","ctf writeup"] |
IMPORTANT: This skill activates when a user provides a CTF challenge with a description, source code, and/or environment endpoint. Your goal is to act as an expert CTF player and capture the flag.
ALWAYS prefer Python scripts for testing and exploitation:
requests for HTTP interactionssocket with timeouts for TCP connections (never interactive)NEVER use blocking/interactive commands:
nc / netcat (blocks waiting for input)vim / nano / editors (requires interaction)less / more (requires interaction)ssh without -o BatchMode=yesInstead use:
requests for HTTPsocket with timeouts for TCPcurl for simple HTTP requestscat, head, tail for file viewingecho "data" | commandThink like a competitive CTF player:
sqlmap to automate the exploitation process and quickly extract the flag, this allows you to focus on understanding the vulnerability and the challenge rather than spending time on coding an exploit that may not be necessary.Recognize and adapt your approach based on challenge type:
| Category | Key Indicators | Primary Techniques |
|---|---|---|
| Web | URL endpoint, HTTP, HTML/JS/PHP source | SQLi, XSS, SSRF, SSTI, auth bypass, path traversal |
| Pwn | Binary file, TCP connection, C source | Buffer overflow, ROP, format string, heap exploitation |
| Crypto | Encrypted data, crypto code, math operations | Frequency analysis, padding oracle, RSA attacks, hash collisions |
| Reverse | Binary/executable, obfuscated code | Disassembly, debugging, deobfuscation, patching |
| Forensics | File dump, network capture, disk image | File carving, steganography, memory analysis |
| Misc | Anything else | OSINT, esoteric languages, puzzles |
Read everything carefully:
┌─────────────────────────────────────────────────────────────┐
│ CHALLENGE INPUTS │
├─────────────────────────────────────────────────────────────┤
│ 1. Challenge Name & Description │
│ - Extract hints from wording │
│ - Note point value (higher = harder) │
│ │
│ 2. Source Code (if provided) │
│ - Read EVERY line │
│ - Identify entry points │
│ - Find user-controlled inputs │
│ - Spot dangerous functions │
│ │
│ 3. Environment / Attachments │
│ - Map available endpoints │
│ - Identify technologies (headers, errors) │
│ - Note versions for known CVEs │
└─────────────────────────────────────────────────────────────┘
For each input, ask:
Build your exploit iteratively:
Hypothesis → Minimal PoC → Verify → Expand → Capture Flag
↑ │
└────────── Adjust if fails ─────────┘
Common flag locations:
/flag, /flag.txt, /home/*/flag)After capturing the flag, document:
## Challenge: [Name]
**Category**: [Web/Pwn/Crypto/Rev/Forensics/Misc]
### Vulnerability
[What was the vulnerability]
### Exploitation
[Step-by-step exploitation]
### Payload
[Final working payload]
### Flag
FLAG{the_captured_flag}
The challenge is solved when:
Do not stop until you have the flag or have exhausted all reasonable approaches.
1. READ the challenge description carefully
2. ANALYZE all provided source code line by line
3. MAP the attack surface (inputs, endpoints, functions)
4. IDENTIFY potential vulnerabilities
5. WRITE Python scripts to test exploits
6. ITERATE if initial attempts fail
7. EXTRACT the flag
8. DOCUMENT the solution