pentester: Skill for Claude Code

.agents/skills/third-party/ctf-web/SKILL.md

ctf-web is a skill for Claude Code, Codex from fb0sh/pentester. It costs 56 tokens per session (2,858 once invoked), scanned A, a copy of ctf-web, MIT.

A practical knowledge base for web challenges in Capture the Flag (CTF) competitions, including PHP mistakes, injection techniques, source-code checks, and common flag locations.

In plain words
What is it for?
It is for examining challenge websites, reviewing PHP source, checking hidden files and paths, and testing issues such as weak comparisons, code injection, template injection, and unsafe deserialization.
Why use it?
It helps solve challenge-specific puzzles when general web-security advice is too broad. It provides concrete values, payload patterns, and checks to try and verify.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is fb0sh/pentester's own configuration. It tells Claude Code and Codex how to work on pentester itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pentester configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/ctf/flag.

Reuse

Borrowing it

Nothing to install: this file belongs to fb0sh/pentester. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fb0sh/pentester/main/.agents/skills/third-party/ctf-web/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fb0sh/pentester

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ctf-web

README.md
[![agentmods](https://agentmods.dev/badge/skills/fb0sh/pentester/ctf-web/github.svg)](https://agentmods.dev/skills/fb0sh/pentester/ctf-web)
Your own site
<a href="https://agentmods.dev/skills/fb0sh/pentester/ctf-web"><img src="https://agentmods.dev/badge/skills/fb0sh/pentester/ctf-web/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ctf-web

Your own site · 80×15
<a href="https://agentmods.dev/skills/fb0sh/pentester/ctf-web"><img src="https://agentmods.dev/badge/skills/fb0sh/pentester/ctf-web.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,858 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.02858
Opus 5.5 $0.00022 $0.01143
Sonnet 5.5 $0.00011 $0.00572
Haiku 4.5 $0.00006 $0.00286

Measured 1mo ago against content hash 4b81b251d5d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ctf-web scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to ctf-web — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/third-party/ctf-web/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CTF Web 攻击知识库

针对 CTF Web 题目的实战知识库,提供具体绕过值、payload 模板、代码审计 checklist,而非渗透测试方法论。

与 web-security-advanced 的区别:

  • web-security-advanced → 渗透测试方法论(怎么系统性测试一个 Web 应用)
  • ctf-web → CTF 实战知识库(PHP 弱比较用什么值、空格怎么绕过、eval 输出怎么回显)

核心原则

  1. 精确值优于方法论 — 提供可直接使用的绕过值和 payload,而非"可以尝试"的建议
  2. 工具验证 — 所有 payload 必须用 fetch 或 python_execute 工具实际发送验证,不猜测结果
  3. 路径选择 — 多条利用路径时,优先选过滤最少、最简单的
  4. 失败记录 — 某个 payload 失败后立即记录,不重复尝试

First-Pass 工作流(CTF Web 题标准流程)

  1. 访问目标 URL,查看页面源码、HTTP 头、Cookie
  2. 如源码含 highlight_file → 用 python_execute + strip_tags 提取纯源码(fetch 输出可能误读)
  3. 检查 robots.txt、.git/、.svn/、备份文件(index.php.bak、www.zip 等)
  4. 目录扫描(常见:/flag、/admin、/login、/upload、/api)
  5. 如有源码 → 进入代码审计模式(见 php-code-audit-checklist.md)
  6. 如无源码 → 主动探测注入点、上传点、文件包含

场景路由

场景 参考文档 核心内容
⭐ PHP 伪协议读文件(遇到文件包含/参数传文件名时优先尝试) 见下方「PHP 伪协议速查」 php://filter 直接读源码/flag
源码提取 source-code-extraction.md strip_tags 提取、php://filter、.phps、备份文件、完整性校验
PHP 弱比较/类型绕过 php-bypass-cheatsheet.md 0e 开头 MD5 值大全、数组绕过、extract() 覆写
⭐ MD5 弱比较碰撞(md5(a)==md5(b) 弱比较) php-bypass-cheatsheet.md ⚠️ 0e 后必须纯数字!直接用 QNKCDZO+240610708 等已验证值
⭐ preg_replace/str_replace 双写绕过 见下方「双写绕过速查」 NSSNSSCTFCTF → 替换后 = NSSCTF
命令注入空格绕过 command-injection-bypass.md ${IFS}/$IFS$9/</%09/%0a 全表
eval/RCE 技巧 eval-and-rce-techniques.md system/exec/passthru 区别、highlight_file 输出顺序、无回显外带
SSTI 注入链 ssti-injection-chains.md Jinja2/Twig/ERB/Mako 等注入链速查
反序列化利用链 deserialization-playbook.md PHP/Java/Python 反序列化、SoapClient CRLF
文件上传 → RCE web-security-advanced → web-playbook-08-file-vulnerabilities.md .htaccess 绕过、日志投毒、多语言 Webshell
CTF 快速参考 web-ctf-quick-reference.md flag 位置、常见链形状、响应头 hint
PHP 代码审计 php-code-audit-checklist.md 输入入口→过滤→危险函数→输出分析

⭐ PHP 伪协议速查(文件包含/参数传文件名时优先尝试)

触发条件:当题目出现以下任一特征时,先试 php://filter 再想其他方法:

触发特征 示例
参数接受文件名/路径 ?file=xxx / ?page=xxx / ?num=xxx / ?path=xxx
include / require / include_once 源码中有这些函数
页面展示源码 highlight_file() / show_source()
题目要求"读文件"或"找 flag" 明确要读取服务器文件

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 176 lines · 56 tokens per session scan A 4b81b251d5d5

Subscribe to this mod's changes

ctf-web is a skill published in the GitHub repository fb0sh/pentester (24 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 2,858 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to ctf-web, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

transilience-report-style

Threat Intelligence Report Design System — ReportLab-based PDF generation for A4 reports with Transilience branding, typography, and layout standards.

transilienceai/communitytools · 31 tokens

firewall-review

Evidence-safe firewall ruleset audit reference specification — 22 documented detector patterns (17 vendor-agnostic plus 5 FortiGate-specific), a 15-check semantic catalogue, CIS Fortinet FortiGate Benchmark guidance, a custom customer-policy benchmark, and consolidated network-team Excel profiles including grouped…

transilienceai/communitytools · 100 tokens

pentest-engagement

Run a professional penetration engagement OR a network vulnerability scan from a scope. WEB mode (apex domains / app URLs) — mandatory surface expansion, systematic OWASP attack-class coverage, reversible active exploitation, authoritative validation, Transilience PDF. NETWORK mode (a list of IPs/CIDRs, e.g. 1500…

transilienceai/communitytools · 140 tokens

coordination

Pentest coordination — orchestrates executor and validator agents with context-controlled spawning. Entry point for all engagements.

transilienceai/communitytools · 24 tokens

hackerone

HackerOne bug bounty automation - parses scope CSVs, deploys parallel pentesting agents per asset, validates PoCs, and generates platform-ready submission reports.

transilienceai/communitytools · 36 tokens

pci-secure-software

Automated PCI Secure Software Standard (SSS) v2.0 readiness gap-assessment of an application from its source code and documentation. Deterministically enumerates every applicable Test Requirement from a pinned catalog, gathers source/doc evidence, and emits an evidence-bound per-requirement verdict (MET / NOTMET /…

transilienceai/communitytools · 162 tokens