Tricks for Reliable Split-Second DNS Rebinding in Chrome and Safari
The post describes techniques for making DNS rebinding fast enough to work against short-lived browser sessions, using delayed DNS responses in Safari and IPv6 prioritisation in Chrome. It also shows how an iframe can be used to get around Chrome's partial Private Network Access restrictions on fetch requests, letting a page read data from a local network service.
Published on intruder.io
DNS rebinding in browsers has traditionally been seen as a way for attackers to access internal network services by tricking victims into loading a malicious website, but with many modern web applications now driving headless browsers for part of their functionality, it's become a useful tool for attacking web…
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 browser's address selection and its incomplete Private Network Access enforcement let a page loaded from a public address later reach a private address under the same origin.
Impact
An attacker could read data from services on the victim's local network, including cloud metadata credentials, though in Chrome the fetch path was blocked by Private Network Access until the iframe trick was used.
What the attacker needed
Victim loads attacker's page; browser has IPv6 access; attacker controls a DNS server; short-lived browser session
The fix
The text gives no fix; the Chrome team said the iframe gap was not a security issue because Private Network Access was still being implemented.
How it was found
- Make the browser load the attacker's hostname so it sends both A and AAAA lookups.
- Answer with a public address first and hold back the private address, or answer with a public IPv6 and a private IPv4.
- Serve a page from the attacker server that repeatedly requests a file on the same hostname.
- Release the delayed private answer, or shut the attacker server down so connections reset and Chrome switches address.
- In Chrome, load the hostname in an iframe and inject a script into it to fetch the file and send it out.
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.
DNS rebinding is a trick where a website's name first points to the attacker's server, then quickly points to a machine on the victim's own network. Because the browser thinks it is still the same website, it lets the attacker's page read replies from that internal machine. This post explains how to make that switch happen in a fraction of a second, which matters when a browser only stays open briefly.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.