401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
WAF bypass methodology and generic evasion techniques. Use when a web application firewall blocks injection payloads (SQLi, XSS, RCE) and you need to craft bypasses using encoding, protocol-level tricks, or WAF-specific weaknesses.
$ npx -y skills add yaklang/hack-skills --skill waf-bypass-techniques --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/waf-bypass-techniquesContext preview
The summary Claude sees to decide when to auto-load this skill.
WAF bypass methodology and generic evasion techniques. Use when a web application firewall blocks injection payloads (SQLi, XSS, RCE) and you need to craft bypasses using encoding, protocol-level tricks, or WAF-specific weaknesses.
name: waf-bypass-techniques description: >- WAF bypass methodology and generic evasion techniques. Use when a web application firewall blocks injection payloads (SQLi, XSS, RCE) and you need to craft bypasses using encoding, protocol-level tricks, or WAF-specific weaknesses.
> **AI LOAD INSTRUCTION**: Covers WAF identification, generic bypass categories (encoding, protocol abuse, HTTP/2, parameter pollution), and a decision tree. For product-specific bypasses (Cloudflare, AWS WAF, ModSecurity, Akamai, etc.), load [WAF_PRODUCT_MATRIX.md](./WAF_PRODUCT_MATRIX.md). Base models often suggest basic encoding but miss protocol-level bypasses and WAF behavioral quirks.
Load [WAF_PRODUCT_MATRIX.md](./WAF_PRODUCT_MATRIX.md) when you need per-product bypass techniques for Cloudflare, AWS WAF, ModSecurity CRS, Akamai, Imperva, F5 BIG-IP, or Sucuri.
---
Before bypassing, know what you're fighting.
| Tool | Usage | |---|---| | `wafw00f target.com` | Fingerprint WAF vendor from response headers/behavior | | `nmap --script=http-waf-detect` | NSE script for WAF detection | | Manual header inspection | `Server`, `X-CDN`, `X-Cache`, `cf-ray` (Cloudflare), `x-sucuri-id`, `x-akamai-*` |
1. Send benign request → record baseline response (status, headers, body size) 2. Send obvious attack: /?q=<script>alert(1)</script> 3. Compare: 403? Custom block page? Redirect? Connection reset? 4. Block page content reveals WAF: "Cloudflare", "Access Denied (Imperva)", "ModSecurity" 5. If transparent proxy: check response time difference (WAF adds latency)
---
| Technique | Example | Bypasses | |---|---|---| | URL encoding | `%3Cscript%3E` | Basic string matching | | Double URL encoding | `%253Cscript%253E` | WAFs that decode once, app decodes twice | | Unicode encoding | `%u003Cscript%u003E` | IIS-specific Unicode normalization | | HTML entities | `<script>` or `<script>` | WAFs not performing HTML entity decoding | | Hex encoding (SQL) | `0x756E696F6E` = `union` | WAFs matching SQL keywords | | Octal encoding | `\74script\76` | Rare but some parsers handle it | | Overlong UTF-8 | `%C0%BC` (invalid encoding for `<`) | Legacy parsers with loose UTF-8 handling | | Mixed case | `SeLeCt`, `uNiOn` | Case-sensitive rule matching | | Null byte | `sel%00ect` | WAFs that stop parsing at null |
Split the payload across HTTP chunks so no single chunk contains the blocked pattern:
POST /search HTTP/1.1 Transfer-Encoding: chunked 3 sel 3 ect 1 4 from 0
WAFs that inspect the full body may not reassemble chunks before matching.
HTTP/2 transmits headers as binary HPACK-encoded frames. Some WAFs only inspect after downgrading to HTTP/1.1:
Different servers handle duplicate parameters differently:
| Server | Behavior for `?a=1&a=2` | |---|---| | PHP/Apache | Last value: `a=2` | | ASP.NET/IIS | Concatenated: `a=1,2` | | Python/Flask | First value: `a=1` | | Node.js/Express | Array: `a=[1,2]` |
WAF checks `a=1` (benign), app uses `a=2` (malicious). Or combine: `a=sel&a=ect` → ASP.NET sees `a=sel,ect`.
Headers trusted by some WAFs/apps for client IP:
X-Forwarded-For: 127.0.0.1 X-Real-IP: 127.0.0.1 X-Originating-IP: 127.0.0.1 True-Client-IP: 127.0.0.1 CF-Connecting-IP: 127.0.0.1 X-Client-IP: 127.0.0.1 Forwarded: for=127.0.0.1
Use case: WAF whitelists internal IPs or has different rule sets per source.
| Technique | Example | Effect | |---|---|---| | Dot segments | `/./admin` or `/../target/admin` | WAF sees different path than app | | Double slash | `//admin` | Some normalizers collapse, WAFs may not | | URL encoding path | `/%61dmin` | WAF sees encoded, app decodes | | Null byte in path | `/admin%00.jpg` | Legacy: app truncates at null, WAF sees .jpg | | Backslash (IIS) | `/admin\..\/secret` | IIS treats `\` as `/` | | Trailing dot/space | `/admin.` or `/admin%20` | OS-level normalization (Windows) | | Semicolon (Tomcat) | `/admin;jsessionid=x` | Tomcat strips after `;`, WAF may not |
WAFs often have format-specific parsers. Switching Content-Type can bypass rules:
Default: Content-Type: application/x-www-form-urlencoded → WAF parses params Switch: Content-Type: application/json → WAF may not parse JSON body Switch: Content-Type: multipart/form-data → WAF may not inspect all parts Switch: Content-Type: text/xml → WAF expects XML, payload in different format
**Trick**: I
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent…