Skip to content

WAF Evasion & Rate Limiting Guide

4 min readBug Hunting for Beginners

Most medium-to-large organizations protect their internet-facing assets with Web Application Firewalls (WAFs) like Cloudflare, Akamai, AWS WAF, or Imperva. If you run default, multi-threaded scanners directly at these targets, you will quickly be blocked, resulting in false negatives.

Learning how to detect, respect, and bypass these layers is critical for successful recon.


Before launching any active testing, determine what WAF is protecting the target.

wafw00f is the industry-standard CLI tool to identify firewalls.

Terminal window
# Install Wafw00f
pip install wafw00f
# Run against target
wafw00f https://target.com

Look for telltale HTTP response headers in your proxy history:

  • Cloudflare: Server: cloudflare, cf-ray: ..., cf-cache-status: ...
  • Akamai: Server: AkamaiGHost, X-Akamai-Transformed: ...
  • AWS WAF: Server: Awselb/3.0, x-amz-apigw-id: ...
  • Imperva: X-Iinfo: ..., Set-Cookie: visid_incap_...

2. Tuning Your Scanners (Rate-Limit Politeness)

Section titled “2. Tuning Your Scanners (Rate-Limit Politeness)”

If you trigger 100 requests per second, a WAF will flag your IP. You must throttle your traffic.

Never run ffuf at its default speed (-t 40). Slow it down using concurrency (-t) and delay (-p in seconds):

Terminal window
# Run with 5 threads and a 0.2-second delay between requests
ffuf -u https://target.com/FUZZ -w wordlist.txt -t 5 -p 0.2

Configuring Nuclei (Vulnerability Scanning)

Section titled “Configuring Nuclei (Vulnerability Scanning)”

Nuclei can trigger WAF blocklists if run globally. Restrict request limits:

Terminal window
# Limit to 5 requests per second and exclude heavy/noisy templates
nuclei -u https://target.com \
-rate-limit 5 \
-concurrency 3 \
-exclude-tags dos,intrusive,fuzz

Sometimes, the WAF is configured to trust requests that appear to come from internal network components, or it parses client IP addresses from HTTP headers.

You can configure Burp, Caido, or custom scripts to append these headers with loopback/internal IPs:

  • X-Forwarded-For: 127.0.0.1
  • X-Originating-IP: 127.0.0.1
  • X-Client-IP: 127.0.0.1
  • X-Remote-IP: 127.0.0.1
  • X-Remote-Addr: 127.0.0.1
  • True-Client-IP: 127.0.0.1
  • Client-IP: 127.0.0.1

Finding the Real Origin IP (Bypassing WAF Entirely)

Section titled “Finding the Real Origin IP (Bypassing WAF Entirely)”

The ultimate WAF evasion is finding the real, unprotected IP address of the origin server and sending your requests directly to it.

  1. Search Censys or Shodan: Look up the target’s SSL certificate details.
    • Censys query: services.tls.certificate.parsed.names: target.com
    • Filter out Cloudflare/Akamai IPs; look for dedicated hosting IPs (AWS, DigitalOcean, Equinix).
  2. Verify the Origin:
    Terminal window
    curl -k -H "Host: target.com" https://[FOUND_IP]
    If the response returns the target website without a WAF signature, you can add FOUND_IP target.com to your /etc/hosts file. Now all your tools will scan the origin directly, bypassing the WAF.

4. IP Rotation Using AWS API Gateway (Fireprox)

Section titled “4. IP Rotation Using AWS API Gateway (Fireprox)”

AWS API Gateway allocates a new egress IP for every single outgoing request. By creating a proxy pass-through on AWS, you can rotate your IP address dynamically on every request, rendering IP-based rate limiters useless.

  1. Install Fireprox (requires AWS credentials configured on your CLI):
    Terminal window
    git clone https://github.com/ustayready/fireprox.git
    cd fireprox
    pip install -r requirements.txt
  2. Create an API Gateway proxy pointing to your target:
    Terminal window
    python fireprox.py --command create --url https://target.com
  3. Copy the generated AWS URL:
    https://a1b2c3d4.execute-api.us-east-1.amazonaws.com/fireprox/
  4. Configure your scanner to use the AWS URL. The target will see the traffic originating from hundreds of different AWS IP addresses.
    Terminal window
    ffuf -u https://a1b2c3d4.execute-api.us-east-1.amazonaws.com/fireprox/FUZZ -w wordlist.txt -H "Host: target.com"
    Note: Always include the -H "Host: target.com" header so the target server knows which virtual host to resolve.

Below is a structured taxonomy of the primary WAF evasion categories encountered in practice, ordered from the most mechanical to the most complex routing and parser-level discrepancies.

5.1 Origin IP Exposure (Header/IP Spoofing)

Section titled “5.1 Origin IP Exposure (Header/IP Spoofing)”
  • Name: Origin IP Exposure / Direct Access Bypass
  • The Shape: The application’s hosting infrastructure is exposed directly to the public internet on standard HTTP/S ports rather than being isolated strictly behind the WAF proxy network. This allows attackers to bypass all WAF protections by routing requests directly to the origin.
  • How to Detect: Locate the backend origin IP using certificate search tools (Censys, Shodan), historical DNS data, or outgoing mail headers. Verify access by executing:
    Terminal window
    curl -k -H "Host: target.com" https://[ORIGIN_IP]
    If the page returns normal application responses without WAF headers, the origin is exposed.
  • How to Mitigate/Solve: Restrict firewall rules (AWS Security Groups, local iptables, etc.) on the origin server to reject all incoming traffic except that originating from the WAF provider’s officially documented IP address ranges.
  • Difficulty Tag: Easy (High-Value: Completely invalidates the security posture provided by a WAF).
  • Real Example: Direct-access scans bypassing Cloudflare to exploit CVE-2021-26084 (Confluence OGNL Injection) on unpatched origin nodes.

5.2 Payload Obfuscation & Character Set Mismatches

Section titled “5.2 Payload Obfuscation & Character Set Mismatches”
  • Name: Content Encoding & Charset Mismatches
  • The Shape: The WAF lacks the capability or configuration to parse and normalize specific payload formats or character encodings, whereas the backend application server decodes and executes them cleanly.
  • How to Detect: Send known signature payloads using alternate content-types (e.g. multipart/form-data) or specifying exotic character encodings in the HTTP header (e.g. Content-Type: application/x-www-form-urlencoded; charset=ibm866 or using double URL encoding).
  • How to Mitigate/Solve: Ensure the WAF is configured to inspect and decode all content encodings and character sets accepted by the backend web framework. Implement a policy to reject requests specifying unsupported or obsolete character sets at the proxy level.
  • Difficulty Tag: Medium
  • Real Example: SQL injection payloads bypassing WAF inspection by declaring utf-16 or ibm866 character encoding parameters that only the backend database adapter processed.
  • Name: HTTP Request Smuggling (RFC Parser Inconsistencies)
  • The Shape: The front-end WAF proxy and the backend application server disagree on how to delimit request boundaries when parsing concurrent Content-Length (CL) and Transfer-Encoding: chunked (TE) headers, enabling an attacker to hide a malicious second request inside the body of a legitimate request.
  • How to Detect: Use differential response timing tests or request chain poisoning payloads (using configurations like CL.TE or TE.CL) and verify if subsequent requests receive responses intended for the smuggled request.
  • How to Mitigate/Solve: Force HTTP/2 or HTTP/3 communication end-to-end between the proxy/WAF and backend systems, or configure the servers to strictly reject requests containing both CL and TE headers (following RFC 7230 guidelines).
  • Difficulty Tag: Hard
  • Real Example: Bypassing reverse proxy security controls to gain unauthorized access to administrative paths /admin/ via smuggled requests on misconfigured proxy-backend chains.

Next step: return to the bug classes in Section 7.

Connections3 backlinks · 1 outgoing · 1 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Bug Hunting for BeginnersFor authorized testing only. Read the ethics note before you put a domain in scope.