DNS Hijacking: How DNS Redirection Attacks Work, Types, and Prevention
DNS hijacking (also called DNS redirection) is a cyberattack that subverts domain name resolution to silently reroute users to fraudulent servers. Attackers hijack DNS by infecting local devices or routers, intercepting unencrypted queries, or breaching domain registrar accounts. The 5 attack vectors require both client and domain-level defenses.
What Are the 5 Types of DNS Hijacking Attacks? (Attack Surface Matrix)
DNS hijacking is an umbrella attack category encompassing two distinct threat models: client-side DNS redirection (where malware or a compromised Wi-Fi router forces a user's device to query a rogue recursive DNS server) and domain-side infrastructure hijacking (where an attacker breaches your domain registrar or DNS hosting account to rewrite your authoritative NS, A, and MX records for everyone on the internet). Both attack paths redirect unsuspecting visitors to fraudulent phishing servers and allow attackers to intercept email or issue unauthorized SSL/TLS certificates. The table below compares the 5 primary DNS hijacking vectors by target layer, blast radius, and primary defense.
| Attack Vector | Target Layer | Who Is Affected (Blast Radius) | How the Hijack Executes | Primary Technical Defense |
|---|---|---|---|---|
| 1. Local Device DNS Hijack (DNSChanger) | Client OS (hosts file or network profile) | Single infected computer or mobile device | Malware modifies /etc/hosts (or Windows hosts) or replaces OS DNS resolver IPs with rogue addresses. | Endpoint protection, hosts file monitoring, and locking OS network adapter profiles. |
| 2. Router DHCP DNS Hijack | Wi-Fi Router / Gateway (CPE) | Every device connected to that local network | Attackers exploit default router credentials or firmware flaws to alter DHCP Option 6 DNS server settings. | Updating router credentials, disabling remote WAN management, and applying vendor firmware updates. |
| 3. On-Path Man-in-the-Middle (MITM) | Network Transit (UDP Port 53) | Users on local unencrypted Wi-Fi or transit links | Adversaries intercept plaintext UDP port 53 traffic, forging spoofed responses before legitimate resolvers reply. | Encrypting queries with DNS-over-HTTPS vs DNS-over-TLS and validating What Is DNSSEC. |
| 4. Registrar or DNS Account Takeover | Authoritative Zone (NS, A, MX, TXT) | 100% of global internet visitors to the domain | Attackers compromise registrar credentials or API tokens to rewrite authoritative NS delegations or zone records. | Hardware-key 2FA (FIDO2), Registry Lock, CAA pinning, and continuous DNS Monitoring. |
| 5. ISP NXDOMAIN Redirection | ISP Recursive Resolver | Subscribers utilizing the ISP default resolver | Internet service providers intercept NXDOMAIN responses to redirect browser lookups to monetization search pages. | Configuring router and device resolvers to independent public services (such as 1.1.1.1, 8.8.8.8, or 9.9.9.9). |
Architectural divergence between client-side and domain-side attacks defines your investigative workflow. A single user reporting an isolated phishing redirect while global resolvers return legitimate IP addresses indicates a local device infection or router compromise. Global recursive resolvers displaying unauthorized IP addresses or foreign nameservers confirm an authoritative zone breach or registrar account takeover requiring immediate administrative intervention.
How Does a Domain-Level Registrar Hijack Work? (The 5-Step Kill Chain)
In a domain-level infrastructure hijack (such as the state-sponsored Sea Turtle campaign documented in CISA Emergency Directive 19-01), attackers compromise your registrar or DNS provider to intercept traffic, mint valid SSL/TLS certificates, and capture corporate email across 5 sequential steps:
- Compromise the domain owner's registrar login credentials, DNS hosting dashboard account, or automated DNS API token via spear-phishing, credential stuffing, or registrar support social engineering.
- Modify the domain's parent NS delegation records to point to an attacker-controlled nameserver (or edit the existing zone's A, AAAA, and MX records directly to point to an attacker proxy IP) with a short TTL (60 seconds).
- Request a brand-new, publicly trusted SSL/TLS certificate for the hijacked domain from an automated Certificate Authority (such as Let's Encrypt or Sectigo); because the attacker temporarily controls domain DNS, automated HTTP-01 or DNS-01 validation checks succeed automatically.
- Intercept sensitive user logins, VPN credentials, and incoming corporate emails in a transparent man-in-the-middle proxy using that newly issued SSL certificate (displaying a valid HTTPS padlock with zero browser warnings) before proxying requests to the real server.
- Revert the A and NS records back to legitimate servers after harvesting credentials, leaving no obvious trace unless the organization actively monitors Certificate Transparency (CT) logs and historical DNS changes.
Automated ACME certificate issuance makes modern domain hijacking exceptionally hazardous. Transport encryption alone cannot protect visitors when attackers control authoritative DNS long enough to pass validation challenges and mint genuine certificates.
DNS Hijacking vs DNS Cache Poisoning vs BGP Hijacking (Comparison Table)
Security teams distinguish between DNS Hijacking, DNS Cache Poisoning (DNS Spoofing), and BGP Hijacking because each attack targets a different layer of internet infrastructure and requires distinct remediation. The table below compares all 3 redirection attacks side by side.
| Dimension | DNS Hijacking | DNS Cache Poisoning (Spoofing) | BGP Route Hijacking |
|---|---|---|---|
| What Gets Altered | Device/router DNS settings or authoritative registrar/zone records | Volatile RAM cache inside a recursive DNS resolver | Internet router BGP prefix tables (AS_PATH) |
| How Attackers Gain Access | Malware, weak router passwords, or stolen registrar/DNS credentials | Forging UDP port 53 response packets with guessed 16-bit Transaction IDs | Announcing an unauthorized IP CIDR prefix from a rogue ASN |
| Duration of the Attack | Persistent until records, router settings, or passwords are manually restored | Temporary (Expires automatically when the poisoned record TTL reaches 0) | Persistent until upstream ISPs filter the rogue BGP announcement |
| Does DNSSEC Stop It? | Stops MITM/rogue resolver hijacks, unless attackers breach the registrar and replace the parent DS record | Yes (100%): RRSIG signature validation rejects unsigned forged responses | No: Operates at the IP routing layer after DNS resolution completes; requires RPKI |
Protocol boundaries determine defense efficacy. Cryptographic validation verified through the DNSSEC Checker neutralizes recursive cache poisoning and on-path spoofing, yet provides zero protection if an attacker logs into your registrar console and replaces your parent DS delegation record. Enterprise resilience demands locking registrar portals alongside protocol-level signing.
5 Ways Domain Owners Prevent Registrar and Zone Hijacking (Registry Lock, 2FA, CAA)
Protecting a production domain against authoritative DNS and registrar hijacking requires 5 layered security controls across authentication, TLD registry locks, cryptographic signing, certificate restrictions, and continuous drift monitoring:
- Enforce Phishing-Resistant Hardware 2FA (FIDO2 / WebAuthn) and Scope API Tokens: Protect registrar and DNS hosting accounts with hardware security keys (FIDO2 passkeys) rather than SMS codes, and restrict automated DNS API tokens to specific zone endpoints and authorized source IP addresses.
- Enable Registrar Lock (clientTransferProhibited) AND Enterprise Registry Lock (serverUpdateProhibited): Deploy layered authorization locks across your registrar and registry tiers:
- Registrar Lock (clientTransferProhibited / clientUpdateProhibited): Standard free setting inside your registrar dashboard blocking automated domain transfers; an attacker with stolen account credentials can toggle this off.
- Registry Lock (serverTransferProhibited / serverUpdateProhibited / serverDeleteProhibited): Out-of-band lock enforced at the TLD registry level (such as Verisign for .com). Changes require multi-party telephone authentication and security phrase verification, preventing unauthorized updates even if the registrar account is compromised. Audit your domain's active EPP lock status in the WHOIS / RDAP Lookup.
- Sign Your Zone With DNSSEC (Algorithm 13): Cryptographic ECDSA signatures protect queries in transit between authoritative servers and recursive resolvers, preventing on-path interception and rogue resolver forgery.
- Publish Strict CAA Record Policies With ACME Account Pinning: Restrict authorized Certificate Authorities and bind issuance to your designated ACME account URI (RFC 8657) via a CAA Record, blocking rogue certificate minting during brief DNS diversions.
- Deploy Automated 6-Hour DNS Drift and Nameserver Monitoring: Scheduled snapshot audits detect unauthorized A, AAAA, MX, NS, and DS modifications around the clock, alerting administrators via email the moment records deviate from baseline configurations.
Layering authentication controls and registry locks insulates core domain assets against credential compromise. Operational hardening workflows are detailed in our DNS Hardening Checklist: 15 Steps.
How to Detect and Fix DNS Hijacking (For Both Domain Owners and End Users)
To determine whether a suspicious redirect is caused by a global domain hijack or a local device/router compromise, execute 4 diagnostic and recovery steps:
- Compare Global DoH Vantages Against Local Resolution: Query your domain across global vantage points in the DNS Propagation Checker and DNS Delegation Checker. Uniform foreign IPs indicate an authoritative registrar hijack; clean global IPs alongside a local redirect indicate client or router tampering.
- Check Which Recursive Resolver Your Device Is Using: Run the DNS Leak Test to identify your active resolver IP and ASN, and inspect local hosts files and router WAN DHCP configurations for rogue entries:
# Compare what your local OS/router resolver returns vs Cloudflare 1.1.1.1: dig example.com A +short dig @1.1.1.1 example.com A +short - Remediate a Domain-Side Registrar Hijack: Revoke compromised sessions and API keys immediately, restore authoritative NS, A, MX, and TXT records from zone backups, inspect Certificate Transparency logs (crt.sh) to revoke unauthorized certificates, and temporarily reduce TTLs to 300 seconds.
- Remediate a Client or Router Hijack: Factory-reset compromised routers, update firmware, remove unauthorized entries from /etc/hosts (or Windows hosts), configure encrypted DNS (DoH or DoT), and clear cached entries using How to Flush DNS Cache.
Proactive defense against DNS redirection protects corporate reputation across the broader landscape of DNS Security. Defending against local malware, router DHCP exploits, MITM interception, and registrar account takeovers demands combining hardware 2FA and Registry Lock with DNSSEC and encrypted DoH/DoT. Scheduled DNS drift monitoring ensures rapid incident detection before attackers exploit hijacked traffic to intercept credentials or compromise users.
Frequently Asked Questions
What is the difference between DNS hijacking and DNS spoofing (cache poisoning)? ▾
DNS hijacking persistently alters where queries go or what the authoritative zone says (by modifying device or router DNS settings or breaching a domain registrar account). DNS spoofing (cache poisoning) injects a temporary forged response into a recursive resolver's RAM cache without changing registrar or router configurations.
Does HTTPS protect me from DNS hijacking? ▾
For client-side or Wi-Fi DNS hijacking, HTTPS protects you because the attacker's server lacks a valid SSL certificate for the domain and triggers a browser warning. In a domain-level registrar hijack, the attacker controls domain DNS and passes automated validation to obtain a real, valid SSL certificate, displaying a normal HTTPS padlock.
What is the difference between Registrar Lock and Registry Lock for preventing domain hijacking? ▾
In practice, Registrar Lock (clientTransferProhibited) represents a software toggle inside your registrar account; an attacker stealing your password simply clicks a toggle to unlock it. Registry Lock (serverUpdateProhibited) operates one tier higher at the TLD registry (like Verisign) and requires out-of-band human verification to modify nameservers, stopping hijackers even when registrar credentials are compromised.
Why is my home internet redirecting typos and non-existent domains to a strange search page? ▾
In real-world diagnostics, browser redirection to ad pages on typos indicates either ISP NXDOMAIN redirection or a compromised home router with altered DHCP DNS settings. Switching router or device DNS settings to Cloudflare (1.1.1.1) or Quad9 (9.9.9.9) with DoH enabled stops the redirection immediately.
Last verified: 2026-11-09