meetcyber.net 2 min read Original Source

Novel Technique to Bypass Firewall (403 Bypass)

Since, web apps are placed behind a firewall, therefore, if you attempt to perform an XSS or a SQL injection attack, chances are that you’ll get blocked right away. So, instead of focusing on the application, you’ll have to figure out ways to bypass a firewall and then identify if your application is actually vulnerable to XSS, SQL, etc.

This makes origin IP discovery an important concept for both attackers (in penetration testing) and defenders (to harden their setup).

What is Origin IP?

In modern web infrastructure, websites often hide their real server (origin) IP address behind a firewall, CDN (Content Delivery Network), or reverse proxy such as Cloudflare, Akamai, or AWS CloudFront.

The goal is to protect the backend from direct attacks (like DDoS, port scanning, or exploitation). But if attackers manage to find the origin IP, they can often bypass the protections entirely and target the server directly.

Example: Why Does the Origin IP Matter?

Imagine you set up Cloudflare to protect example.com.

  • The world sees Cloudflare’s IP (e.g., 104.21.x.x )
  • The real server might still be running at 203.0.133.xx

If an attacker discovers 203.0.133.xxthey could connect directly to the server, skipping Cloudflare’s filtering. Therefore, you can try all your race conditions, rate limiting, XSS, SQL attacks without worrying about being blocked.

Technique: How to Find Origin IPs?

Here are some ways origin IPs can accidentally leak:

1. DNS History Lookups

Even if the domain now points to a CDN, old DNS records may reveal the origin.

Example:

  • Using tools like SecurityTrails or DNSDumpster, you might find that example.com previously resolved to 203.0.113.XX.
  • I personally have discovered origin IPs using Shodan

2. Subdomain Enumeration

Sometimes forgotten subdomains point directly to the origin.

Example:

  • dev.example.com → points to origin IP
  • www.example.com → protected by Cloudflare

Tools like subfinder can help discover these.

3. Leaky Headers or Error Messages

Some servers accidentally expose their real IP in response headers, error pages, or emails.

  • Example: An HTTP 500 error might include a. Server: Apache/2.4.29 (Ubuntu) at 203.0.133.25 Port 80 message.

Though I must admit, that I’ve not seen the last one happening in the wild. But who knows how things might be configured.

Looking for a Remediation?

These service providers do have steps outlined which tell you how to properly configure the web server so that your web server is only accessible through them and not directly through the Origin IP. Here are a few generic ones though.

Defensive Measures

As a defender, you should assume attackers will try all the above. To protect your origin IP:

  • Restrict server access so only CDN/firewall IP ranges can reach it.
  • Remove or secure old/unused DNS records.
  • Avoid leaking IPs in email headers (configure SPF/DKIM carefully).
  • Use separate certificates for backend systems when possible.
  • Monitor services like Shodan to check if your origin is exposed.