Skip to content
SSRF Write-up Advanced

Blog post: Cracking the Lens: Targeting HTTP’s Hidden Attack-Surface

The paper shows that reverse proxies, load balancers and backend analytics systems can be tricked with malformed requests and unusual headers into contacting an attacker-controlled host, revealing hidden infrastructure. By exploiting this misrouting, the author reached internal admin interfaces and services, including Yahoo load balancer control ports and DoD internal websites.

blog.portswigger.net

Published on blog.portswigger.net

Modern websites are browsed through a lens of transparent systems built to enhance performance, extract analytics and supply numerous additional services. This almost invisible attack surface has been largely overlooked for years.

The author, on blog.portswigger.net

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the reverse proxies and helper systems trusted user-supplied host information in the request line or Host header and used it to decide where to forward the request, without validating it against an allowlist.

Impact

Attackers could reach internal admin panels and services, and in the Yahoo case could potentially have changed load balancer configuration and pushed items into the cache; the Tor2web case could not reach internal services but could mask attacks on third parties.

What the attacker needed

Ability to send crafted HTTP requests; a logging DNS or HTTP endpoint; target sits behind a proxy or helper system

The fix

The affected vendors were notified and patched the issues, and the underlying Apache HttpComponents library flaw was subsequently fixed.

How it was found

  1. Send a request with an incorrect Host header pointing at a logging domain and watch for a DNS or HTTP callback.
  2. Use the callback to identify the hidden system and probe it with simple commands to learn what software it runs.
  3. Craft a request whose body carries a command so the newline-based protocol can be driven through the proxy.
  4. For host-overriding targets, put the internal host in the request line while keeping a whitelisted Host header.
  5. For WAF-fronted targets, use an ambiguous host value so the WAF routes to the client while the backend parses a different host.
  6. For the New Relic case, send a request line beginning with an at-sign so the rewritten URL points at the attacker's domain.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Many websites sit behind helper machines such as load balancers and proxies that quietly pass requests along. If those helpers trust the address written in the request too much, a crafted request can make them fetch a page the attacker chose instead. That lets an outsider peek at or reach internal systems that were never meant to be public.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.