BBLABS v2BBLABSv2
>Home>Labs
>New labs

Latest 3 labs

Loading…

View all labs →
>Creators>Ranking
>Learn

Learn bug bounty

AcademyGuides, cheatsheets and glossaryVulnerabilitiesXSS, SQLi, IDOR, SSRF and moreHunter RoadmapYour step-by-step bug bounty pathBlogBug bounty guides and news
>Business>Pricing
ES
Log inLog in
>Home>Labs>New labs>Creators>Ranking>Learn>Business>Pricing
ES
Sign inCreate account

Contact

Practice, learn and hack

Bug bounty practice platform with labs based on real reports. Learn ethical hacking in safe environments.

contact→

Follow us

YouTube
@0xGorka
X
@gorkaelbochi
LinkedIn
gorka-el-bochi-morillo
Instagram
@_.gorkaaa.b
Email
team@bblabs.es

Access every lab from €7.99/mo

New labs every week. Cancel anytime.

Create account

BBLabs is the bug bounty labs platform where you learn bug bounty with real vulnerabilities extracted from paid reports on HackerOne, Bugcrowd and Intigriti. Here you practice web hacking —XSS, SQLi, IDOR, SSRF, CSRF and more— in downloadable environments, capture the flag, read the writeup and apply the technique on active bug bounty programs.

BBLabs is the alternative to HackTheBox, TryHackMe and PentesterLab for those who want to practice bug bounty with real reports instead of artificial CTFs. From €7.99/mo, no commitment.

→ Learn bug bounty from scratch→ How to do bug bounty step by step→ Real bug bounty reports→ BBLabs for companies and academiesLabsAcademyVulnerabilitiesToolsHunter rankingXSS labsIDOR labsSSRF labsCSRF labsHackTheBox alternativeHack4u alternativeTryHackMe alternativePortSwigger alternativePentesterLab alternativeBug Bounty Labs comparisonHackerOne to practiceOffSec / OSCP alternativeINE / eWPT alternativeHTB Academy alternativeDVWA alternativeJuice Shop alternativeVulnHub alternativePentesterAcademy alternativeRoot-Me alternativeHackTheBox vs TryHackMeBest bug bounty platforms 2026BlogSpoilersWhat is bug bounty?How much do you earn in bug bounty?OWASP Top 10 explainedBest sites to practice web hackingHow to become an ethical hacker from scratchBurp Suite tutorial (Spanish)OSCP guide and prepGoogle Dorks for bug bountyHow much an ethical hacker earns in SpainBug bounty tools 2026Best cybersecurity certifications 2026Burp Suite tutorialsqlmap tutorialffuf web fuzzingnuclei tutorialHTTP Request SmugglingWAF bypassPrompt injection (LLM)Google Dorks
Made withand code
TermsPrivacyComparisonES

© 2026 BBLABS v2 — All rights reserved

back to blog
techniques

WAF bypass techniques: how to evade an application firewall (ethical use)

What a WAF is, how to fingerprint it and the most-used bypass techniques —encoding, case toggling, inline comments, HPP, chunked encoding and alternative payloads— applied to XSS and SQL injection. A practical and strictly ethical approach, within scope.

GEB

Gorka El Bochi

Founder of BBLABS

2026-07-2112 min read
#waf#bypass#xss#sqli#evasion#techniques

Quick answer: A WAF (Web Application Firewall) filters requests looking for malicious patterns. A "bypass" consists of rewriting your payload so it doesn't match those signatures without losing its effect: encoding it, toggling case, inserting comments, splitting it with HPP or using alternative syntax. It's only done on authorized targets and to demonstrate that the underlying vulnerability exists despite the filter.

What is a WAF and why can it be evaded?

A WAF is a layer that inspects HTTP traffic and blocks what looks like an attack, comparing it against signatures and rules (for example, "if you see <script> or UNION SELECT, block"). It's a useful defense, but it has a fundamental weakness: it filters by patterns, it doesn't understand intent. If you can express the same payload in a form the rule doesn't recognize but the browser or the database does interpret, you get through.

Important so you don't fool yourself: a WAF bypass isn't itself a vulnerability. It's the demonstration that a real vulnerability (XSS, SQLi…) is still exploitable despite the filter. Without a flaw behind it, evading the WAF is worthless. What you report is the flaw; the bypass is the proof that the WAF doesn't mitigate it.

Ethics first: all of this is practiced in your own labs or in programs whose scope allows it. Evading a system's defenses without authorization is illegal. Here the goal is to understand the technique to report and to build better defenses.

What types of WAF exist?

Before evading, it's worth knowing which category you're facing, because each one has different blind spots:

  • Network / signature-based WAFs. They inspect traffic looking for known patterns (ModSecurity with the core rule set is the classic open source example). They're the most evadable with transformations, because they reason by string matching.
  • Cloud WAFs (CDN). They sit in front of the application as a service (the big CDNs offer this layer). On top of signature filtering they usually add rate limiting, IP reputation and captcha-type challenges. Harder, but not infallible.
  • Application-based / RASP WAFs. They integrate inside the app itself and understand the request context better. The hardest to evade because they don't reason only by patterns.

The common key: all of them, to a greater or lesser degree, decide with incomplete information. The more a WAF relies on rigid signatures, the more room you have to rewrite the payload without it recognizing it.

How to fingerprint a WAF?

Before evading, identify what you're facing. Each WAF has recognizable tells:

  • A characteristic block page or code. Send an obviously malicious payload (?q=<script>alert(1)</script>) and observe: a 403, a 406, an "Access Denied", a challenge page? The format gives away the product.
  • Headers and cookies. Some WAFs inject their own headers or cookies into the response.
  • Tools. wafw00f is the classic for fingerprinting the product; sqlmap has --identify-waf. They give you a hint of the vendor, and each vendor has documented bypasses.

Knowing which WAF is in front saves you hours: you aim the techniques at its known blind spots instead of testing blindly.

Bypass techniques (with XSS and SQLi)

There's no silver bullet: you combine and iterate. These are the families that work most.

1. Encoding and double encoding

Many rules look for the literal string. Encode it and maybe the rule won't see it, but the server decodes it before using it:

Original:  <script>
URL enc:   %3Cscript%3E
Double enc: %253Cscript%253E
HTML enc:  &lt;script&gt;  (depending on context)

For SQLi, URL-encoding key characters or using hex encoding of strings is a common resource.

2. Case toggling

If the signature looks for union select in lowercase and the SQL engine is case-insensitive, toggle it:

UnIoN SeLeCt password FROM users

Same with XSS: <ScRiPt> can bypass a rule that only looks at <script> in lowercase.

3. Inline comments

In SQL, MySQL's inline comments split keywords the WAF looks for whole, without breaking the query:

UNI/**/ON SEL/**/ECT
1/**/OR/**/1=1

In XSS, inserting characters the browser tolerates inside the tag can break the signature without breaking execution.

4. Alternative payloads and syntax

The most robust way: don't use the textbook payload. For XSS, if <script> is blocked, there are dozens of vectors with other tags and event handlers:

<img src=x onerror=alert(1)>
<svg onload=alert(1)>
<body onpageshow=alert(1)>

For SQLi, if OR 1=1 is filtered, there are logical equivalents and alternative functions that achieve the same effect. Understanding the vulnerability from the inside (in the Academy) is what lets you improvise vectors instead of depending on a list.

5. HTTP Parameter Pollution (HPP)

Sending the same parameter several times can confuse the WAF and the back-end about which to process. If the WAF inspects the first occurrence and the server concatenates or takes the last, you can split the payload across several appearances of the parameter and sneak each half separately.

6. Chunked / manipulating the body

Fragmenting the body with Transfer-Encoding: chunked, playing with spaces, line breaks or the Content-Type can prevent the WAF from reconstructing the payload the way the back-end sees it. It's terrain that connects with desync techniques like request smuggling.

7. Alternative whitespace and normalization

Many signatures expect a literal space between tokens (UNION SELECT). SQL accepts other separators the WAF may not account for: tabs, line breaks, comments (/**/), or control characters. In SQL, parentheses also work to do without spaces:

UNION(SELECT(password)FROM(users))

Another route is unicode normalization: if the back-end normalizes certain unicode characters to their ASCII equivalent after the WAF has inspected, a "weird" character passes the filter and then turns into the dangerous one. Same with overlong encodings or the mishandling of null bytes in some stacks. The underlying idea repeats: exploit any difference between what the WAF sees and what the application interprets.

The method: iterating against the filter

Evading a WAF is an empirical process:

  1. Confirm the vulnerability without the WAF in the way if you can (or with a minimal payload).
  2. Fingerprint the WAF.
  3. Send the standard payload and observe exactly what it blocks (the keyword? a character? the length?).
  4. Isolate the trigger and transform it with a technique from above.
  5. Iterate, combining techniques, until the payload passes and still works.
  6. Document the minimal payload that evades the filter and demonstrate the real impact.

Tools like Burp Intruder (to automate variations) and sqlmap's tamper scripts (for automated SQLi, see the sqlmap tutorial) speed up step 5, but the judgment of what to test is yours.

Automating the bypass search

Testing dozens of transformations by hand is tedious, so you automate it sensibly. In Burp Intruder you can load a list of variants of the same payload (case, comments, encoding, alternative syntax) and fire them at the parameter, watching which responses don't trigger the WAF block. The length and status-code columns tell you at a glance which ones passed.

For SQLi, sqlmap's tamper scripts chain these transformations automatically (--tamper=space2comment,randomcase,between), and --identify-waf guides which combination to try. For XSS, payload collections like those in PayloadsAllTheThings give you hundreds of vectors ready to iterate.

Important warning: automating bypass generates a lot of noise and can trigger rate limiting or IP bans. Control the speed, rotate if the program allows it and don't turn the search into a brute-force attack that degrades the service. Automation speeds things up, but the goal is still to understand why a specific variant evades the filter, not to fire thousands blindly.

Why this matters for your report

A flaw that the WAF blocks with the textbook payload but that you demonstrate exploitable with a bypass is worth far more in a report: you prove the mitigation is insufficient and the real risk persists. Security teams value it because it points out that their defense gives a false sense of security.

And on the other side: understanding bypasses also teaches you to defend. A WAF is a layer, not a solution; the real fix is fixing the vulnerability in the code, not trusting the filter.

Frequently asked questions (FAQ)

Is evading a WAF illegal?
It depends on the target. In your labs or in a bug bounty program whose scope allows it, it's a legitimate technique to demonstrate that a vulnerability is still exploitable. Against a system without authorization, it's illegal.

Does a WAF bypass count as a reportable vulnerability?
On its own, usually not. What's reportable is the underlying vulnerability (XSS, SQLi…); the bypass is the proof the WAF doesn't mitigate it. A flaw exploitable despite the WAF is worth more because it shows the defense gives false security.

Is there a universal payload that evades any WAF?
No. Each WAF and each configuration is different. Evading is an empirical process of fingerprinting, observing what it blocks and iterating by combining techniques. Anyone selling you a "magic bypass" is selling you hot air.

How does an app really defend against these bypasses?
By fixing the vulnerability in the code: parameterized queries against SQLi, contextual output encoding against XSS, strict validation. The WAF is a temporary mitigation layer, never the underlying solution.

How to train it

Bypasses aren't memorized from a list: they're trained by understanding the vulnerability underneath. When you know why an <img onerror> executes or why an inline comment doesn't break a SQL query, generating variants is natural. Study the theory of XSS and SQLi, practice in labs that replicate real reports and follow an ordered path. The WAF bypass is proof that you master the vulnerability, not an isolated trick.

share
share:
hunters training
650

hunters training

labs from real reports
50

labs from real reports

completions
380

completions

in bounties practiced
$200,000

in bounties practiced

40 flags captured this week·Real reports from HackerOne · Bugcrowd · Intigriti·No commitment·Free Academy
BBLabs · bug bounty training

Stop reading about bugs and start hunting them

Create your free account and practice on labs based on real reports that paid out thousands of euros. The Academy is free forever.

Create free accountSee the labs

No card · free Academy · cancel anytime

[RELATED_POSTS]

Continue Reading

techniques

Beginner's guide to IDOR

Learn to identify and exploit IDOR (Insecure Direct Object Reference) vulnerabilities in web applications. From the basics to writing effective reports.

Mar 10, 2026•12 min read
techniques

Authentication bypass: JWT attacks

Explore the most common techniques for attacking insecure JSON Web Token implementations: from the none algorithm to JKU/JWK injection.

Dec 20, 2025•14 min read
techniques

SSRF: From P4 to Critical

Learn to escalate SSRF vulnerabilities from a low severity to critical impact. Exploitation techniques, filter bypasses and attack chains in cloud environments.

Nov 30, 2025•16 min read