SuperAPI AI Directory

waf-bypass-methodology

General & other

View repository

Updated 10-16 08:02

About this skill

Unified WAF bypass methodology

Core principle of WAF bypass: the WAF and the backend application parse the same HTTP request differently; exploit this difference so the WAF "sees" a legitimate request while the backend "sees" the malicious payload.

In-depth reference


Phase 0: WAF identification

0.1 Detect whether a WAF is present

# 发送明显恶意请求,观察响应
curl -s "http://TARGET/?id=1' OR '1'='1" -D-
curl -s "http://TARGET/?id=<script>alert(1)</script>" -D-
curl -s "http://TARGET/?cmd=;id" -D-

# 对比正常请求和恶意请求的响应差异
# WAF 拦截特征:403/406 状态码、特定拦截页面、不同的 Server 头

0.2 WAF fingerprinting

Feature WAF product
Server: cloudflare / cf-ray header Cloudflare
X-Sucuri-ID header Sucuri
Response contains ModSecurity ModSecurity
Response contains 安全狗 / safedog SafeDog
Response contains 宝塔 / bt.cn BT Panel WAF
X-Powered-By-Anquanbao Anbai WAF
Response contains yunsuo Yunsuo
Alibaba Cloud 403 page Alibaba Cloud Shield
Tencent Cloud specific 403 Tencent Cloud WAF

General bypass check flow

Payload 被拦截 → 403/拦截页
├── 1. 编码绕过
│   ├── 双重 URL 编码
│   ├── Unicode 编码
│   └── 混合大小写 + NULL 字节
├── 2. HTTP 层
│   ├── 分块传输
│   ├── Content-Type 切换
│   ├── HTTP 方法切换
│   └── HTTP/2
├── 3. 参数层
│   ├── 参数污染 (HPP)
│   ├── 数组/JSON 嵌套
│   └── Multipart 包裹
├── 4. Payload 变形
│   ├── 空格替代(注释/Tab/换行)
│   ├── 函数名替代
│   ├── 拼接/编码函数
│   └── 通配符/变量
└── 5. 逻辑层
    ├── 分多次请求发送(先探测再利用)
    └── 利用白名单路径(/api/health + 路径穿越)

See the corresponding references file for detailed payloads for each branch

Phase 5: Domestic/commercial WAF fingerprints and bypasses

WAF Fingerprint feature Bypass approach
F5 BIG-IP ASM X-Content-Type-Options, ASM interception page Encoding obfuscation, chunking, method switching
ChinaNetCenter X-Cache: NS, ChinaNetCenter interception page Parameter pollution, case variation, Unicode encoding
UEWAF Specific interception page/JS challenge Direct request to backend IP/domain, bypass JS validation
Cloudflare cf-ray、server: cloudflare Origin IP direct connection, encoding bypass
SafeDog/BT Panel Page feature Comment characters, equivalent functions, encoding

Phase 6: Captcha unlocking (captcha bypass)

When a WAF/risk control uses captchas to block high-frequency attacks:

  1. Logic bypass: reuse captcha, empty code, delete parameter, universal captcha
  2. Recognition: OCR/captcha-solving platforms recognize image captchas; for click-based captchas, simulate clicks by coordinates
  3. Trigger point switching: switch endpoint/parameter to bypass the captcha trigger logic
  4. See captcha-bypass-methodology for detailed methods

Phase 7: Proxy pool/free proxy IP rotation

When a WAF rate-limits/bans by IP:

  1. Use free proxies/proxy pools to switch the egress IP and evade IP bans
  2. Note proxy availability and speed; prefer high-anonymity proxies
  3. Combine with low-rate (slow) requests to reduce the probability of triggering risk control
  4. Free proxy sources change dynamically; verify proxy availability before testing

Phase 8: SQL injection bypass (F5/ChinaNetCenter scenarios)

  • Comment character replacement:-- → # → /*!*/ → ;%00
  • Keyword obfuscation: case, inline comments /*!union*/, equivalent functions
  • Encoding: URL double encoding, Unicode, hex
  • Combined use of chunked transfer + parameter pollution