pentester-waf-bypass

pentester-waf-bypass is a skill for Claude Code, Codex from fb0sh/pentester. It costs 64 tokens per session (1,457 once invoked), scanned A, original, MIT.

A guide for authorized security testing when a web application firewall blocks a harmless test request. A WAF is a filter that checks web traffic for patterns associated with attacks, while a CTF is a legal security challenge.

In plain words
What is it for?
Use it to analyze decoding, parsing, normalization, and filtering differences during authorized testing of SQL injection, cross-site scripting, or command-injection defenses.
Why use it?
It helps testers understand why a filter and the application may interpret the same request differently. The workflow focuses on low-impact checks and avoids damaging data or installing backdoors.

Skill for Claude CodeCodex

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fb0sh/pentester/pentester-waf-bypass
Any agent
npx skills add fb0sh/pentester --skill pentester-waf-bypass
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 pentester-waf-bypass

README.md
[![agentmods](https://agentmods.dev/badge/skills/fb0sh/pentester/pentester-waf-bypass.svg)](https://agentmods.dev/skills/fb0sh/pentester/pentester-waf-bypass)
Your own site
<a href="https://agentmods.dev/skills/fb0sh/pentester/pentester-waf-bypass"><img src="https://agentmods.dev/badge/skills/fb0sh/pentester/pentester-waf-bypass.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00064 $0.01457
Opus 5 $0.00032 $0.00728
Sonnet 5 $0.00013 $0.00291
Haiku 4.5 $0.00006 $0.00146

Measured 6d ago against content hash de0a31b8345a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pentester-waf-bypass 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 6d 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.

.agents/skills/pentester-waf-bypass/SKILL.md · 147 lines

How it starts

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

WAF 绕过与过滤器差异分析

本文用于 CTF、靶场、代码审计和明确授权的安全测试。测试时优先使用 SELECT 1whoamialert(1) 等低影响验证载荷,避免破坏数据、写入后门或访问无关敏感信息。

1. 核心分析模型

多数 WAF 绕过源于以下差异

  1. 解码次数差异 — WAF 与后端的解码次数不同
  2. 语法解析差异 — WAF 与解释器的语法解析规则不同
  3. 规范化差异 — WAF 检查原始请求,后端处理规范化后的请求
  4. 检查覆盖差异 — WAF 只检查部分参数、请求体或 Content-Type
  5. 匹配模式差异 — 黑名单匹配过于简单
  6. 重组可能性差异 — 过滤结果仍能重新组合成危险语句

分析任何过滤器时,按以下链路观察:

原始请求
  ↓
代理服务器解析
  ↓
URL / Unicode / HTML 实体解码
  ↓
WAF 规则匹配
  ↓
Web 框架参数解析
  ↓
应用程序二次处理
  ↓
数据库、Shell、模板引擎或浏览器解释

绕过测试的重点是确定:

  • WAF 检查的是原始值还是解码后的值
  • 请求会经历几次解码
  • 大小写是否统一
  • 注释和空白是否规范化
  • 重复参数取第一个、最后一个还是全部
  • 后端最终执行的字符串是什么

2. PHP WAF 绕过

preg_replace 双写绕过(关键技巧)

preg_replace()循环替换直到没有匹配为止,但如果关键词被替换后拼出了新的关键词,只会替换内层,外层保留。

核心原理preg_replace('/NSSCTF/', '', 'NSSNSSCTFCTF') → 删除中间的 NSSCTF → 剩下 NSS + CTF = NSSCTF

通用模板

假设过滤关键词为 X(如 NSSCTF)
构造输入: X拆成两半, 在中间嵌入完整X
即: X前半 + X + X后半

示例:
过滤 NSSCTF → 输入 NSS + NSSCTF + CTF = NSSNSSCTFCTF
过滤 flag   → 输入 fl + flag + ag = flflagag
过滤 cat    → 输入 ca + cat + t = cacatt
过滤 system → 输入 sys + system + tem = syssystemtem

为什么简单的大小写绕过不适用于 preg_replace

  • preg_replace('/NSSCTF/', '', 'NssCTF')Nss 不匹配 NSS(无 i 修饰符)→ 原样输出 NssCTF
  • NssCTF !== "NSSCTF"(严格比较失败)→ 不通过
  • 只有双写绕过才能让替换后恰好得到原始关键词字符串

识别场景

  • 源码含 preg_replace('/关键词/', '', $input) 且需要 $input 替换后等于关键词本身 → 立即用双写绕过
  • 不要尝试大小写绕过(替换后不等于原关键词)或编码绕过(编码字符串不等于原关键词)

函数名混淆

  • Base64 编码恢复:$f=base64_decode('c3lzdGVt');$f('id');
  • 字符串拼接:$f='sys'.'tem';$f('id');
  • 可变函数:$a='sys';$b='tem';$a$b('id');

关键字绕过

  • 拆分路径:'/va'.'r/ww'.'w/ht'.'ml'
  • 注释绕过:sys/**/tem('id');
  • 反转字符串:$f=strrev('metsys');$f('id');

3. SQL 注入绕过

关键字绕过

  • 大小写混合:SeLeCt 代替 SELECT
  • 内联注释:S/*!ELECT*/
  • 双重编码:%2565%65e
  • 等价函数:GROUP_CONCAT 替代 concat_ws

注释符变体

  • -- - 代替 --
  • --+ 代替 --
  • # 代替 --

4. 命令注入绕过

分隔符变体

  • 换行符:id\nwhoami
  • 管道符:id|whoami
  • 逻辑运算:id&&whoami
  • 子 shell:$(id)`id`

Read the full file on GitHub · 147 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. 6d ago First seen · 147 lines · 64 tokens per session scan A de0a31b8345a

Subscribe to this mod's changes

pentester-waf-bypass is a skill published in the GitHub repository fb0sh/pentester (23 stars, last pushed 1mo ago), licensed MIT. It adds 64 tokens to every session and 1,457 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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