Skip to content
TECHNIQUE 06/13OP UNMASK

Origin discovery and WAF bypass

4 min readRecon Atlas

A WAF in front of a host blocks your payloads, not the bug behind it. If you can reach the origin server directly, the same injection or access-control flaw is testable without the filter in the way. The recon phases already split CDN IPs from origin IPs in dns/ips-origin.txt; this part turns an origin into a valid finding.

Programs scope a hostname, and a WAF makes that hostname hard to test. The origin is the same in-scope application with the guard removed. A reflected XSS or SQLi that the WAF blocked on https://example.com may fire cleanly against the origin IP. Send it with Host: example.com. The finding is still against example.com, which is in scope, so it counts.

Signaldns/ips.txt, dns/tls-names.txt, org/domains.txt
NoisePassive
Severityenabler, not a bug itself
ConfirmThe IP serves the in-scope site's real content when you send its Host header, matching body or a unique marker.
Source How it leaks the origin Noise
Censys, Shodan Search the certificate or favicon; the origin often serves the same cert on a raw IP Passive
ViewDNS, SecurityTrails history DNS records from before the site moved behind the CDN Passive
Certificate SAN matching tlsx output from recon lists IPs serving the site’s cert directly Passive
Favicon hash Shodan http.favicon.hash: finds every host with the same icon, CDN or not Passive
Mail DNS records MX, SPF and old A records for mail often point at the real network Passive
Mail you receive A password-reset or webhook mail names the sending host in Received Light active
Terminal window
# Favicon hash pivot: every indexed host serving the same icon (recon phase 1)
shodan search --fields ip_str,org 'http.favicon.hash:-1234567890'
Terminal window
# Mail and historical records that may expose the origin network
dig +short MX example.com; dig +short TXT example.com | grep -i spf
Terminal window
# Hosts serving the target certificate on a raw IP (Shodan CLI)
shodan search --fields ip_str 'ssl.cert.subject.CN:"example.com"'

An IP that serves the cert is a candidate, not proof. Confirm by requesting the site with its Host header and comparing the body to the CDN-served version.

Terminal window
# Send the in-scope host header to the candidate IP over TLS
curl -s -k -H 'Host: example.com' --resolve example.com:443:203.0.113.10 https://example.com/ -o /tmp/origin.html
Terminal window
# Compare against the normal CDN-served page; a close match means you found it
curl -s https://example.com/ -o /tmp/cdn.html && diff <(wc -c </tmp/origin.html) <(wc -c </tmp/cdn.html)

A unique string on the page, a CSRF token format, or a specific error signature is stronger than a byte count. A real origin answer also drops CF-RAY, X-Amz-Cf-Id, and X-Cache. Once confirmed, record the IP and the evidence; a WAF bypass report must show the origin is genuinely the target.

HTTP/1.1 200 OK
Server: nginx/1.24.0
Content-Type: text/html; charset=UTF-8
Set-Cookie: session_id=s%3A981247.origin_node_01; Path=/; HttpOnly; Secure
X-Frame-Options: SAMEORIGIN
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example Portal - Production</title>
<meta name="csrf-token" content="d89f2a4b1c">

203.0.113.10 answered Host: example.com with the production title, a CSRF token, and a session cookie, and with no CDN header. That shows this IP is serving the site. It does not put the IP itself in scope. The hostname is the target.

Signaldns/ips-origin.txt
NoiseLight active
Severityinherits the bug's severity
ConfirmA payload the WAF blocked on the public host succeeds when sent to the origin with the in-scope Host header.

Point your proxy or tool at the origin IP while keeping the in-scope Host. In Burp, set the request’s target host to the IP but keep the Host header as example.com. With curl, use --resolve as above. Now retest the injection and access-control techniques from parts 2 and 3. The WAF is no longer between you and the app.

Signalhttp/live.txt
NoiseLight active
Severitycontext, not a finding
ConfirmThe tool names the WAF; you then choose evasions that match it.

Knowing which WAF sits in front tells you which bypasses are worth trying and reminds you that a blocked payload is not a safe app.

Terminal window
# Identify the WAF in front of a host
wafw00f https://example.com
Terminal window
# httpx also flags common WAFs and CDNs while probing
httpx -u https://example.com -silent -title -web-server -cdn

wafw00f’s -i input-file and -o output flags were not confirmed against the current README, so check wafw00f --help before scripting it over a list. When a WAF is identified, the origin route above is usually a cleaner path than payload obfuscation. If you do need to evade the filter, the WAF evasion chapter of Bug Hunting for Beginners covers the techniques. For a blocked 403 path, Transport tricks in the Broken Access Control guide lists the verbs, headers and path forms worth trying.

Vhost and second-level abuse through one origin

Section titled “Vhost and second-level abuse through one origin”

Once you know an origin IP, fuzz the Host header against it, as in recon phase 11. One server often hosts several of the target’s sites, including internal ones that never appear in DNS. A Host: admin-internal.example.com that returns a different app on the same origin is a hidden vhost. It is in scope if the second-level domain is.

GET / HTTP/1.1
Host: admin-internal.example.com
HTTP/1.1 200 OK
Server: nginx/1.24.0
Content-Type: text/html
<title>Internal Employee Administration Console</title>
<h1>Cluster Ops Console</h1>

203.0.113.10 served that console for Host: admin-internal.example.com. The name may still have no public DNS. The record does not say the console is reachable through the CDN. It says this origin has the vhost.

Next, tear apart the mobile app for endpoints and secrets in mobile testing.

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

Recon AtlasFor authorized testing only. Your scope is the map edge.