Skip to main content

XEye Academy

Practical SQLi WAF Bypass Techniques

Web Application Firewalls (WAFs) stand between you and critical vulnerabilities—but they’re not infallible. This blog equips bug bounty hunters, penetration testers, and infosec enthusiasts with step-by-step tactics to identify and bypass SQLi defenses like keyword filters and rate limits. All techniques are rooted in real-world reconnaissance.

🔍 Start with Recon: Identify What You’re Up Against

WAFs operate based on custom rules. Before launching payloads, observe how the firewall reacts to your input.

🔒 Example Defensive Rule

All URL queries are converted to lowercase, and the firewall blocks usage of AND and OR.

🔐 Impact: SQLi payloads containing these keywords are blocked. 💡 Bypass Tip: Symbolic operators like && and || may not be filtered.

🧪 How to Identify Blocked Keywords (Black-Box Style)

Reverse-engineering WAF logic is similar to testing for XSS filters.

✅ Tools to Use:

  • SQLmap or Ghauri with verbose output
  • Manual fuzzing: send payloads incrementally
  • Observe server responses: look for anomalies or block indicators

Example Discovery:

Using fuzzing, you might find AND triggers a 403, but && gets through—a signal that symboliclogical substitutions could work.

🧰 Trying the Atlas Tool (Optional)

Atlas helps brainstorm tamper scripts for SQLmap. While outdated and noisy, it offers usable insights.

🔧 How to Use:

  1. Extract a working payload from SQLmap:
  2. sqlmap -u ‘http://example.com/page.php?id=1’ –verbosity=3
  3. Run Atlas with the payload:
  4. python3 atlas.py -u ‘http://example.com/page.php?id=1’ -p “<PAYLOAD>” –random-agent -v
  5. Sift through results—some tampers may work; most require manual validation.

⚙️ A More Efficient Strategy: Use SQLmap with Smart Tamper Scripts

Let’s filter for meaningful tamper scripts using regex and grep:

sqlmap –list-tampers | grep -E “AND|OR”

This will likely surface symboliclogical.py, a script that replaces AND and OR with their logical symbols.

🎯 Launch Your Test:

sqlmap -u ‘http://example.com/page.php?id=1’ –random-agent –flush-session –technique=B –batch –tamper=symboliclogical

This bypasses keyword filters while maintaining logic structure.

🧤 Navigating Rate Limiting Defenses

High-frequency requests often trigger blocks or bans.

🔄 Sample Rule:

More than 10 requests in 10 seconds blocks the IP.

🛡️ Mitigation Tips:

  • Use VPNs (e.g., NordVPN, Mullvad) to rotate IP addresses.
  • Slow down requests with SQLmap’s delay parameter:
  • sqlmap -u ‘…’ –delay=3

Slower execution avoids bans while preserving session integrity.

👨‍💻 Pro Tactics for WAF Bypass Success

Enhance your bypass strategy with this layered approach:

  • Use GF patterns for endpoint discovery
  • Combine TheTimeMachine with Wayback Machine for historical URL mining
  • Integrate Burp Suitehttpx, or Nuclei for live endpoint validation
  • Document each bypass and filter trigger—build your own rulebook

🚨 Final Thoughts

WAFs aren’t obstacles, they’re clues. Every block, filter, and delay offer insight into the rules protecting the asset. Bypassing SQLi protections requires both creativity and precision, and by leveraging tools like SQLmap, Atlas, and VPNs with smart payload crafting, you elevate your recon game beyond brute force.

Practice, adapt, and always test with responsibility.