DNS hijacking, or DNS redirection, is the practice of subverting the resolution of Domain Name System (DNS) queries. This can be achieved by malware that overrides a computer's TCP/IP configuration to point at a rogue DNS server under the control of an attacker, or through modifying the behaviour of a trusted DNS server so that it does not comply with internet standards. These modifications may be made for malicious purposes such as phishing, for self-serving purposes by Internet service providers (ISPs), by public/router-based online DNS server providers to direct users' web traffic to the ISP's own web servers where advertisements can be served, statistics collected, or other purposes of the ISP; and by DNS service providers to block access to selected domains as a form of censorship.
Technical background One of the functions of a DNS server is to translate a domain name into an IP address that applications need to connect to an Internet resource such as a website. This functionality is defined in various formal internet standards that define the protocol in considerable detail. DNS servers are implicitly trusted by internet-facing computers and users to correctly resolve names to the actual addresses that are registered by the owners of an internet domain.
Rogue DNS server A rogue DNS server translates domain names of desirable websites (search engines, banks, brokers, etc.) into IP addresses of sites with unintended content, even malicious websites. Most users depend on DNS servers automatically assigned by their ISPs. A router's assigned DNS servers can also be altered through the remote exploitation of a vulnerability within the router's firmware. When a user tries to visit a website, they are instead sent to a fake page that appears to use the same domain. This attack is termed pharming. If the site they are redirected to is a malicious website, masquerading as a legitimate website, in order to fraudulently obtain sensitive information, it is called phishing.
Manipulation by ISPs A number of consumer ISPs such as AT&T, Cablevision's Optimum, CenturyLink, Cox Communications, RCN, Rogers, Charter Spectrum, Plusnet, Verizon, Sprint, T-Mobile US, Virgin Media, Frontier Communications, Bell Internet, Deutsche Telekom AG, Optus, Mediacom, ONO, TalkTalk, Bigpond (Telstra), TTNET, Türksat, and all Indonesian customer ISPs use or used DNS hijacking for their own purposes, such as displaying advertisements or collecting statistics. Dutch ISPs XS4ALL and Ziggo use DNS hijacking by court order: they were ordered to block access to The Pirate Bay and display a warning page while all legal customer ISPs in Indonesia do DNS hijacking to comply with the National DNS law which requires every customer Indonesian ISP to hijack port 53 and redirect it to their own server to block websites that are listed in Trustpositif by Kominfo under the Internet Sehat campaign.These practices directly violate the RFC standards for DNS (NXDOMAIN - Non eXistent Domain) responses and introduce security vulnerabilities such as cross-site scripting. However, the effectiveness of ISP-level DNS hijacking has substantially declined due to the widespread adoption of encrypted DNS protocols, specifically DNS over HTTPS (DoH) and DNS over TLS (DoT). Modern web browsers and operating systems increasingly route queries through these encrypted channels by default, preventing ISPs from intercepting or manipulating DNS responses. The concern with DNS hijacking involves this hijacking of the NXDOMAIN response. Internet and intranet applications rely on the NXDOMAIN response to describe the condition where the DNS has no entry for the specified host. If one were to query the invalid domain name (for example www.example.invalid), one should get an NXDOMAIN response – informing the application that the name is invalid and taking the appropriate action (for example, displaying an error or not attempting to connect to the server). However, if the domain name is queried on one of these non-compliant ISPs, one would always receive a fake IP address belonging to the ISP. In a web browser, this behavior can be annoying as connections to this IP address display the ISP redirect page of the provider, sometimes with advertising, instead of a proper error message. However, other applications that rely on the NXDOMAIN error will instead attempt to initiate connections to this spoofed IP address, potentially exposing sensitive information. Examples of functionality that breaks when an ISP hijacks DNS:
… excerpt ends here. Continue reading the full article.
