Awesome-offsec-claude waf-bypass-agent
Fingerprint filtering behavior and build parser-differential bypasses with strong controls, conditionals, and reproducible validation.
git clone https://github.com/1ikeadragon/awesome-offsec-claude
T=$(mktemp -d) && git clone --depth=1 https://github.com/1ikeadragon/awesome-offsec-claude "$T" && mkdir -p ~/.claude/skills && cp -r "$T/waf-bypass-agent" ~/.claude/skills/1ikeadragon-awesome-offsec-claude-waf-bypass-agent && rm -rf "$T"
waf-bypass-agent/SKILL.mdWAF Bypass Agent
Purpose
Convert blocked attack attempts into controlled, hypothesis-driven bypass testing, then prove whether bypass reaches vulnerable application logic.
Use Cases
- Payload blocked by edge filter or API gateway.
- Inconsistent behavior between browser and HTTP client.
- App appears vulnerable but direct payloads fail.
- Need defensive recommendations based on parser mismatch root cause.
Inputs
target_endpointblocked_payload
(method, content type, headers)request_context
(blocked and allowed)response_samples
(rate limits, no-destructive rules)test_constraints
Ground Rules
- Keep a strict control group in every run batch.
- Test one hypothesis family at a time.
- Do not call success until application-layer behavior changes.
- Track exact transformations to maintain reproducibility.
Phase 1: Filter Fingerprinting
Objectives
- Identify where filtering happens (edge, gateway, app middleware).
- Identify normalization/canonicalization order.
- Identify signature-driven vs behavior-driven blocking.
Signal Collection
Capture per request:
- status code
- response length/hash
- response body signature markers
- block page tokens and headers
- latency band
Differential Baselines
- Known-benign control request.
- Known-block probe using original payload pattern.
- Near-benign variant with one suspicious token removed.
Fingerprint Hints
- Same status + same body hash for all malicious probes: likely static signature block.
- Different status but constant block marker: layered block templates.
- Strong latency increase only on suspicious payloads: deeper inspection path.
Phase 2: Hypothesis Generation
Build hypotheses before generating payload variants.
Core Hypothesis Families
- Decode-order mismatch.
- Syntax/token boundary mismatch.
- Content-type parser mismatch.
- Multi-parameter reconstruction mismatch.
- Secondary channel mismatch (header/cookie/body disagreement).
Canonicalization Hypothesis Checklist
- URL decode applied once at edge, twice in app.
- Unicode normalized at one layer only.
- Case normalization inconsistent across layers.
- Duplicate parameter handling differs by layer.
Phase 3: Conditional Playbook
Condition Tree
- If request blocked before app logic indicators:
- focus on transport/canonicalization bypass families.
- If request reaches app but payload neutered:
- focus on syntax and parser-targeted variants.
- If payload executes only under specific content type:
- focus on content-type smuggling and parser coercion.
- If behavior differs by endpoint with same payload:
- focus on route-specific middleware and parameter naming.
Branch A: Edge Signature Block
Trigger: deterministic block template across probes.
Actions:
- reduce obvious signatures while keeping semantic intent.
- split payload across parameters or structured fields.
- move payload to alternate ingestion vector if in scope.
Evidence to collect:
- block-template divergence
- successful pass-through request signature
- downstream behavior change
Branch B: Parser Differential
Trigger: allowed request causes different parse result app-side.
Actions:
- vary content type (
, form, multipart) with equivalent semantics.application/json - vary duplicate key placement and ordering.
- vary nested object shape and array coercion patterns.
Evidence to collect:
- parsed value difference
- application behavior divergence
- reproducible bypass under controlled replay
Branch C: Tokenization/Normalization Gap
Trigger: blocked token in one form, allowed in another semantically equivalent form.
Actions:
- adjust delimiter and whitespace boundaries.
- adjust key casing and route parameter casing.
- use equivalent encoding layers with controlled depth.
Evidence to collect:
- normalization path hypothesis
- allowed variant details
- downstream vulnerable path reachability
Phase 4: Variant Families and Examples
Use examples as hypothesis templates, not blind sprays.
Family 1: Encoding and Decode Order
- single-encoded reserved token variant
- double-encoded reserved token variant
- mixed encoding within one payload segment
Example pattern:
- base token:
TKN - variant A: encoded once
- variant B: encoded twice
- variant C: mixed encoded characters
Expected interpretation:
- if B bypasses and A blocks, likely extra decode downstream.
Family 2: Structural Re-Expression
- semantically equivalent JSON shapes
- object vs array wrapping where parser permits
- field reordering for duplicate-key behavior checks
Example condition:
- if
behaves differently from single-key form, duplicate-key policy mismatch may exist.{"a":"x","a":"y"}
Family 3: Content-Type Differential
- same semantic payload as JSON, form-url-encoded, multipart.
- compare parser acceptance and validation behavior.
Example condition:
- if JSON blocks but multipart passes with same meaning, WAF and app parse path likely differs.
Family 4: Parameter Reconstruction
- split sensitive token across two inputs merged server-side.
- move payload from body to query/header when route supports it.
Example condition:
- if split fields pass and merged server-side effect appears, edge inspection may be field-local while app reconstructs globally.
Family 5: Context Shifting
- move payload from primary to secondary/optional fields.
- move from visible client input to hidden but processed fields.
Example condition:
- if secondary field triggers behavior while primary field blocks, field-level rule coverage gap exists.
Phase 5: Validation of Real Security Outcome
Mandatory Validation Steps
- Confirm bypass request is accepted.
- Confirm application-layer operation changed (not just error template).
- Confirm effect is tied to payload semantics.
- Confirm replay with fresh session/context.
False-Positive Traps
- alternate error page mistaken for execution.
- cache artifacts mistaken for app behavior.
- stale session state mistaken for bypass success.
Validation Controls
- run control request immediately before and after bypass candidate.
- run benign payload in same structural form.
- rerun successful variant in clean session.
Phase 6: Scoring and Prioritization
Bypass Quality Score
: filter evasion only, no vulnerable path proof.Q1
: vulnerable path reached, low reliability.Q2
: reproducible vulnerable path reach with stable conditions.Q3
: reproducible reach + impact proof.Q4
Prioritization Inputs
- reliability across sessions
- attacker effort required
- privilege needed
- potential blast radius
Defensive Translation
Root Cause Mapping
- canonicalization mismatch
- parser mismatch
- rule granularity gap
- missing positive validation
Defensive Fix Patterns
- canonicalize once at trust boundary.
- validate against strict schema after canonicalization.
- reject ambiguous encodings and duplicate keys.
- align gateway parser with application parser semantics.
- enforce contextual output/input handling in app logic.
Output Contract
{ "target_endpoint": "", "filter_fingerprint": { "layer_hypothesis": "", "signals": [] }, "hypotheses": [], "variant_runs": [ { "id": "", "family": "", "request_signature": "", "response_signature": "", "result": "blocked|passed|inconclusive", "notes": "" } ], "confirmed_bypasses": [ { "variant_id": "", "quality_score": "Q1|Q2|Q3|Q4", "replay_steps": [], "security_outcome": "" } ], "rejected_variants": [], "defensive_recommendations": [] }
Constraints
- No blind payload spraying.
- Respect rate/abuse limits.
- Preserve minimal-impact testing discipline.
Quality Checklist
- Every bypass claim includes controls and replay.
- Security-relevant path reach is demonstrated.
- Root cause and defensive guidance are specific.
- Findings are reproducible by another tester.
Quick Scenarios
Scenario A: Edge Block Template Is Constant
- Build three semantic-equivalent variants.
- Alter encoding depth only.
- Observe template divergence.
- Validate downstream parser effect when pass occurs.
Scenario B: JSON Blocks, Multipart Passes
- Preserve payload semantics across content types.
- Compare validation behavior.
- Confirm whether app accepts one parser path only.
- Validate impact under accepted parser path.
Scenario C: Duplicate-Key Differential
- Submit single-key baseline.
- Submit duplicate-key variants with order flips.
- Observe app-side selected value behavior.
- Confirm whether edge and app choose different keys.
Scenario D: Secondary Field Coverage Gap
- Test primary field blocked behavior.
- Move same semantic payload to optional field.
- Confirm request acceptance and app-side effect.
- Document missing rule coverage with replay proof.
Conditional Decision Matrix
- If evidence is unstable, rerun controls and reduce claim strength.
- If mitigation exists in one path, verify all alternate paths.
- If impact is unclear, separate technical and business conclusions.