ArticleslgStudy

science

DNS rebinding

DNS rebinding is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DNS rebinding rather than just read about it. In short: DNS rebinding is a method of manipulating resolution of domain names that is commonly used as a form of computer attack. In this attack, a malicious web page causes visitors to run a client-side script that attacks machines elsewhere on the network.

Key takeaways

  • DNS rebinding belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DNS rebinding to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DNS rebinding from memory before moving on to harder problems.

Reference excerpt

DNS rebinding is a method of manipulating resolution of domain names that is commonly used as a form of computer attack. In this attack, a malicious web page causes visitors to run a client-side script that attacks machines elsewhere on the network. In theory, the same-origin policy prevents this from happening: client-side scripts are only allowed to access content on the same host that served the script. Comparing domain names is an essential part of enforcing this policy, so DNS rebinding circumvents this protection by abusing the Domain Name System (DNS). This attack can be used to breach a private network by causing the victim's web browser to access computers at private IP addresses and return the results to the attacker. It can also be employed to use the victim machine for spamming, distributed denial-of-service attacks, or other malicious activities.

How DNS rebinding works The attacker registers a domain (such as attacker.com) and delegates it to a DNS server that is under the attacker's control. The server is configured to respond with a very short time to live (TTL) record, preventing the DNS response from being cached. When the victim browses to the malicious domain, the attacker's DNS server first responds with the IP address of a server hosting the malicious client-side code. For instance, they could point the victim's browser to a website that contains malicious JavaScript or Flash scripts that are intended to execute on the victim's computer. The malicious client-side code makes additional accesses to the original domain name (such as attacker.com). These are permitted by the same-origin policy. However, when the victim's browser runs the script it makes a new DNS request for the domain, and the attacker replies with a new IP address. For instance, they could reply with an internal IP address or the IP address of a target somewhere else on the Internet.

Protection 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. Local system administrators can configure the organization's local nameserver(s) to block the resolution of external names into internal IP addresses. (This has the downside of allowing an attacker to map the internal address ranges in use.) A firewall (e.g. dnswall), in the gateway or in the local pc, can filter DNS replies that pass through it, discarding local addresses. 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 DNS hijacking DNS spoofing

References

External links Protecting Browsers from DNS Rebinding Attacks (2007) DNS hardening update for Adobe Flash Player (2008) Security Sun Alert 200041 for the Sun JVM (2008-09-04) DNS Rebinding with Robert RSnake Hansen (2009)

Worked examples

Example 1 — a first encounter with DNS rebinding

Start with the simplest possible case. Write down what DNS rebinding claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DNS rebinding before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DNS rebinding ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DNS rebinding

In research
DNS rebinding appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DNS rebinding in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DNS rebinding is common in secondary-school and first-year university syllabi. It links to neighbouring topics Domain Name System, Internet security, Web security exploits, so understanding it makes those chapters shorter.
In everyday life
Look for DNS rebinding outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DNS rebinding” →

How to study DNS rebinding in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DNS rebinding means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DNS rebinding out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DNS rebinding in simple terms?

DNS rebinding is a method of manipulating resolution of domain names that is commonly used as a form of computer attack. In this attack, a malicious web page causes visitors to run a client-side script that attacks machines elsewhere on the network.

Why does DNS rebinding matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DNS rebinding?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DNS rebinding.

Tags

  • Domain Name System
  • Internet security
  • Web security exploits

Keep exploring