What Is DNS Hijacking?
The Domain Name System (DNS) is the phonebook of the internet. It translates human-readable domain names like shop.de into IP addresses like 93.184.1.10 that computers use to communicate with each other. In DNS hijacking, this translation process is manipulated: instead of your server's correct IP address, the visitor's browser receives the IP address of an attacker's server.
The attack can occur at various points in the DNS resolution chain: at the domain registrar, at the DNS provider, on the victim's local router or through manipulation of DNS responses between resolver and authoritative nameserver. Depending on the attack point, different protective measures are required. A related risk that needs no access to the registrar or nameservers at all is subdomain takeover via an orphaned CNAME record, explained in the article Dangling CNAME: how to detect and prevent subdomain takeover.
The Four Main Types of DNS Hijacking
Registrar Hijacking
In registrar hijacking, attackers gain access to the account at the domain registrar and change DNS settings directly. This can happen through phishing, social engineering or exploitation of weak passwords. Registrar hijacking is particularly dangerous because the attacker gains full control over the domain and the changes take effect across the entire internet. The attack on Brazilian major bank Banco do Brasil in 2017, in which all online banking traffic was redirected to fake servers, is a well-known example (Kaspersky Lab).
DNS Cache Poisoning
In cache poisoning, a DNS resolver's cache is poisoned with fake entries. The resolver stores the manipulated data and delivers it to all subsequent requests until the cache entry expires. Unlike registrar hijacking, the authoritative DNS records are not changed here, only the cached copies at one or more resolvers.
Man-in-the-Middle Attacks on DNS
In this attack type, the attacker intercepts DNS queries between the client and DNS resolver and responds with a fake IP address. This is particularly a risk in public Wi-Fi networks where the attacker can control network traffic. DNSSEC (DNS Security Extensions) provides protection against this type of attack.
Rogue DNS Servers
Malware on the user's computer or router can change DNS settings so that all DNS queries are directed to a server controlled by the attacker. This attack type affects individual users or networks and is frequently used for phishing or redirection to advertising pages. From the website operator's perspective, this type is the most difficult to detect since the actual DNS records remain unchanged.
What Risks Does DNS Hijacking Pose to Businesses?
The consequences of a successful DNS hijacking attack can be devastating:
- Data loss and theft: When visitors enter their login credentials, credit card information or other sensitive data on a fake website, this information goes directly into the attacker's hands.
- Email compromise: By changing MX records, all email traffic for a domain can be intercepted. Confidential business communications, invoices and password reset links are redirected.
- Reputation damage: When phishing pages or malware are distributed through your domain, customer trust suffers lasting damage. Search engines and browser security filters can blacklist your domain.
- SEO losses: When the domain points to a different server, you typically lose your search engine rankings. Recovery after DNS hijacking can take weeks to months.
- Legal consequences: When customer data is stolen through a DNS hijacking attack, GDPR fines and liability claims threaten. The notification obligation under Art. 33 GDPR requires notifying the supervisory authority within 72 hours.
How to Detect DNS Hijacking
The greatest challenge with DNS hijacking is detection. The attack can be technically invisible if the attacker carefully designs the fake website. However, there are several indicators and methods that point to an attack:
Automated DNS Record Monitoring
The most reliable method for detecting DNS hijacking is continuous monitoring of all DNS records. DNS monitoring from XICTRAQ® checks your DNS records every 6 hours on paid plans and every 24 hours on the Free plan, and compares them with the last measured state. Changes to A, AAAA, MX, NS and TXT records appear in the changelog with old and new values; A, AAAA and NS changes are flagged as warnings because they can indicate DNS hijacking. A changed CAA lock is also reported as an alert. This way, you typically see an unauthorised change after the next check interval, not weeks later.
SSL Certificate Anomalies
When an attacker redirects traffic to their server, they typically cannot present a valid SSL certificate for your domain unless they also have access to your certificate management. Browsers then display a certificate warning. Automated SSL monitoring detects when the certificate issuer, serial number or other parameters change unexpectedly.
Traffic Anomalies
A sudden drop in website traffic may indicate DNS hijacking if the traffic is instead flowing to an attacker's server. Cookieless analytics from XICTRAQ® shows traffic trends in real time and makes unusual drops immediately visible.
Protective Measures Against DNS Hijacking
Enable DNSSEC
DNS Security Extensions (DNSSEC) cryptographically sign DNS responses so that manipulations can be detected. Resolvers that validate DNSSEC reject fake responses. According to APNIC, however, only approximately 30% of all domains worldwide are secured with DNSSEC (APNIC). Activation is possible with most domain registrars and should be performed for all business-critical domains.
Strengthen Registrar Security
Access to your domain registrar account is a primary attack target. Protect it with strong, unique passwords and two-factor authentication (2FA). Additionally activate a registrar lock function that prevents transfers and DNS changes without explicit confirmation. For particularly valuable domains, some registrars offer a "Registry Lock" that requires additional manual verification steps.
Configure Email Authentication
SPF, DKIM and DMARC records protect against email-based abuse of your domain. When an attacker changes MX records but SPF and DMARC are correctly configured, emails from unauthorised servers are typically flagged as suspicious or rejected by recipient systems. XICTRAQ® also monitors these email-relevant DNS records as part of DNS monitoring.
Certificate Authority Authorization (CAA)
CAA records in your DNS specify which certificate authorities are permitted to issue SSL certificates for your domain. When an attacker tries to request a certificate from an unauthorised CA, the request is rejected. In addition, the XICTRAQ® Certificate Transparency watch (from the Business plan) evaluates the public logs of issued certificates: it reports newly issued certificates for the registered look-alike domains of your brand and keeps an inventory of the certificates issued for your own domain.
DNS Monitoring in Practice
Effective DNS monitoring watches not only the DNS records themselves but also the context: are the nameservers reachable? Do the WHOIS data still match? Are the domain and SSL certificate expiring at the same time? XICTRAQ® offers a comprehensive DNS monitoring module that continuously checks the following aspects:
- All DNS record types: A, AAAA, CNAME, MX, NS, TXT, SPF, DMARC, DKIM, CAA and SRV records are checked every 6 hours on paid plans and every 24 hours on the Free plan.
- Nameserver availability: Verification that all configured nameservers respond and deliver consistent results.
- DNSSEC validation: Checking that the DNSSEC signature is valid and the chain of trust remains intact.
- Domain expiry: Warning before domain registration expires to prevent accidental loss.
- Change history: Logging of all DNS changes in a visual changelog showing when which record was changed.
What to Do During a DNS Hijacking Incident
When XICTRAQ® reports an unauthorised DNS change, swift action is critical. Follow this emergency plan:
- Verify immediately: Verify the DNS change through multiple independent DNS lookup tools. Determine whether the change was authorised (e.g. by a colleague or a planned server switch).
- Secure registrar account: Change your registrar account password and enable 2FA if not already done. Check the access history for unauthorised logins.
- Correct DNS records: Reset the DNS records to the correct values. Enable the registrar lock to prevent further changes.
- Check SSL certificate: Ensure your SSL certificate is still valid and has not been replaced by a fraudulent certificate. Revoke compromised certificates if necessary.
- Notify affected parties: If user data may have been compromised, inform those affected and report the incident according to Art. 33 GDPR to the relevant supervisory authority.
- Forensic analysis: Document the incident for later analysis. Which records were changed? When did the change occur? Where was the traffic redirected?
DNS Hijacking Prevention as Part of an Overall Strategy
DNS security should not be viewed in isolation but as an integral part of a comprehensive website security strategy. XICTRAQ® connects DNS monitoring with uptime monitoring, security scans, SSL monitoring and GDPR compliance in one integrated platform. If a DNS change in the changelog coincides with an uptime alert or an SSL warning, this points to a possible hijacking attack; you see both in the same platform and can cross-check them directly.
Start DNS monitoring today and close one of the most critical security gaps in your infrastructure. Registration takes just minutes. Alternatively, you can request a demo to see the features in detail.
How common are DNS hijacking attacks?
Does DNSSEC fully protect against DNS hijacking?
How quickly does XICTRAQ® detect a DNS change?
Which DNS records should be monitored?
What is the difference between DNS hijacking and DNS spoofing?
Can DNS hijacking also affect emails?
This article is based on data from: (APNIC), Global DNS Threat Report (IDC), Threat Report (Kaspersky).