Techniques attempting to prevent DNS rebinding attacks can broadly be divided in two categories:
DNS Based • DNS servers in the chain can filter out
private IP addresses and
loopback IP addresses: • External public DNS servers (e.g.
OpenDNS) can implement DNS filtering. Note that DNS filtering conflicts with
Domain Name System blocklist. RFC 5782 standardizes the use of IP addresses beginning with 127, like 127.0.0.2, for such use. Normally, mail servers perform various queries of this kind, either according to local configuration or following external directives, such as the
SPF's EXISTS mechanism. It is crucial for correctness, that mail servers don't utilize DNS servers that perform the above kind of filtering.
Web Based • Web browsers can resist DNS rebinding: • Web browsers can implement DNS pinning: the IP address is locked to the value received in the first DNS response. This technique may block some legitimate uses of
Dynamic DNS, and may not work against all attacks. However, it is important to fail-safe (stop rendering) if the IP address does change, because using an IP address past the TTL expiration can open the opposite vulnerability when the IP address has legitimately changed and the expired IP address may now be controlled by an attacker. • The
NoScript extension for
Firefox includes
ABE, a firewall-like feature inside the browser which in its default configuration prevents attacks on the local network by preventing external webpages from accessing local IP addresses. • Web servers can reject
HTTP requests with an unrecognized
Host header. ==See also==