A DNS rebinding attack is a type of attack that exploits the trust relationship between a user's browser and a target web application. The purpose of this attack is to bypass the same-origin policy enforced by web browsers and gain unauthorized access to sensitive information or perform malicious actions on behalf of the user.
The Domain Name System (DNS) is responsible for translating human-readable domain names into IP addresses that computers can understand. When a user types a domain name into their browser, the browser sends a DNS query to a DNS server to obtain the IP address associated with that domain. Once the IP address is obtained, the browser establishes a connection with the web server hosting the requested domain.
In a DNS rebinding attack, an attacker manipulates the DNS responses received by the victim's browser. This manipulation involves returning different IP addresses for the same domain name, depending on the context in which the request is made. Initially, the attacker's DNS responses may point to a harmless IP address, such as a public website. However, after the victim's browser establishes a connection with the attacker-controlled IP address, subsequent DNS responses may point to a private IP address or a local network resource.
By exploiting the time delay between the initial harmless connection and the subsequent DNS response, the attacker can trick the victim's browser into making requests to resources on the local network that should not be accessible from the internet. This allows the attacker to bypass the same-origin policy and access sensitive information, such as internal web applications, network devices, or even the victim's private data.
For example, consider a scenario where a user is logged into their home router's administration panel, which is typically only accessible from within the local network. If the user visits a malicious website that performs a DNS rebinding attack, the attacker can manipulate the DNS responses to point to the IP address of the user's router. The victim's browser would then unknowingly make requests to the router's administration panel, allowing the attacker to potentially change router settings, intercept traffic, or launch further attacks on the victim's network.
The purpose of a DNS rebinding attack is to exploit the trust relationship between a user's browser and a target web application, bypass the same-origin policy, and gain unauthorized access to sensitive information or perform malicious actions on behalf of the user. This attack takes advantage of the DNS resolution process and the delay between establishing a connection and receiving subsequent DNS responses to trick the victim's browser into making requests to resources on the local network that should not be accessible from the internet.
Other recent questions and answers regarding DNS attacks:
- How does the DNS rebinding attack work?
- What are some measures that servers and browsers can implement to protect against DNS rebinding attacks?
- How does the same-origin policy restrict the attacker's ability to access or manipulate sensitive information on the target server in a DNS rebinding attack?
- Why is it important to block all relevant IP ranges, not just the 127.0.0.1 IP addresses, to protect against DNS rebinding attacks?
- What is the role of DNS resolvers in mitigating DNS rebinding attacks, and how can they prevent the attack from succeeding?
- How does an attacker carry out a DNS rebinding attack without modifying the DNS settings on the user's device?
- What measures can be implemented to protect against DNS rebinding attacks, and why is it important to keep web applications and browsers up to date in order to mitigate the risk?
- What are the potential consequences of a successful DNS rebinding attack on a victim's machine or network, and what actions can the attacker perform once they have gained control?
- Explain how the same-origin policy in browsers contributes to the success of DNS rebinding attacks and why the altered DNS entry does not violate this policy.
- What role does the manipulation of DNS responses play in DNS rebinding attacks, and how does it allow attackers to redirect user requests to their own servers?
View more questions and answers in DNS attacks

