What is DNS poisoning? (Definition, examples & prevention)

DNS poisoning redirects traffic to malicious sites. Learn what DNS cache poisoning is, how it works, and how to protect against it.
DNS Poisoning

You type your bank’s URL into your browser, hit enter, and land on what looks exactly like your bank’s website. Same logo, same layout, same login page. You enter your credentials, and…nothing happens. Or worse, you get an error message and try again.

Whoops. You might have just handed your username and password to an attacker.

This is DNS poisoning in action. It’s one of those cybersecurity threats that operates completely in the background, redirecting you to malicious sites without any obvious warning signs. You think you’re visiting a legitimate website, but DNS poisoning has quietly sent you somewhere else entirely.

And, most of the time, with DNS poisoning, you don’t even do anything overtly wrong. You didn’t click a fishy-looking link in an email, download a suspicious attachment, or break any of the other conventional rules. You just went about your ordinary business. That’s why most victims don’t realize they’ve been hit until far too late.

Fortunately, you can do something about it. Below, we’ll walk through actions you and your business can take to protect sensitive information and data.

What is DNS poisoning?

DNS poisoning (also called DNS cache poisoning or DNS spoofing) is a cyberattack where attackers corrupt the Domain Name System to redirect traffic from legitimate websites to fraudulent ones.

Here’s how DNS normally works: 

  1. When you type a website address like “google.com” into your browser, your computer doesn’t actually know where that is. 
  2. It asks a DNS server (think of it as the internet’s phonebook) to translate that human-readable domain name into an IP address that computers can understand. 
  3. The DNS server looks it up and tells your browser, “google.com is at 142.250.185.46,” and off you go.

DNS poisoning happens when attackers inject fake information into that process. They corrupt the DNS cache (the temporary storage where DNS servers keep recent lookups to speed things up) with fraudulent data. So when someone asks for “google.com,” the poisoned DNS server might say, “Oh, that’s at 192.0.2.123” (which is actually the attacker’s server).

The user’s browser happily goes to that fake address, displaying what looks like the real website. The user has no idea they’re somewhere else entirely. Well, if the attacker has done a perfect job at replicating the site, at least.

DNS poisoning vs. other DNS attacks

Attack typeWhat it doesWho it targets
DNS poisoningCorrupts DNS cache with fake recordsDNS servers (affects all users of that server)
DNS hijackingChanges DNS settings directlyIndividual devices or routers
DNS tunnelingUses DNS queries to smuggle dataNetwork security systems
DDoS on DNSOverwhelms DNS servers to take them offlineSpecific DNS infrastructure

DNS poisoning is one of the worst because it operates at the infrastructure level. One successful attack can redirect thousands or millions of users, and those users have no easy way to know something’s wrong.

How DNS cache poisoning works

Here’s exactly how attackers pull off DNS poisoning. Once you understand the mechanics, you’ll better appreciate why it’s so dangerous (and why prevention matters).

DNS servers use caching to improve performance. However, early DNS implementations didn’t have strong authentication. They basically trusted whatever information came back. Attackers exploited this trust:

  1. The attacker sends a query to a DNS server, asking for a legitimate domain like “bank.com”
  2. While the DNS server is processing that request, the attacker floods it with fake responses, all claiming to have the answer
  3. If one of the fake responses arrives before the legitimate response (or if the attacker can predict certain values), the DNS server accepts the fake information
  4. The DNS server caches this poisoned information and serves it to everyone who asks for that domain
  5. Users trying to visit “bank.com” get sent to the attacker’s fake site instead

The window of opportunity is small (attackers need their fake response to arrive at just the right moment), but automated tools make it possible to try thousands of times until something sticks.

Once the cache is poisoned, it stays that way until the cached record expires (which could be hours or days). During that time, every person using that DNS server gets redirected to the attacker’s site.

Real-world examples of DNS poisoning

DNS poisoning isn’t just theoretical. Unfortunately, it’s been used in major attacks around the world.

The Kaminsky Vulnerability (2008)

Security researcher Dan Kaminsky discovered a flaw in DNS that made cache poisoning attacks much easier than anyone realized. The vulnerability affected virtually every DNS server on the internet, and if exploited widely, could have broken large portions of the web.

The disclosure led to an emergency coordinated patch across the entire internet. It was a wake-up call that DNS security needed serious attention.

The Sea Turtle Campaign

Between 2017 and 2019, a sophisticated group used DNS hijacking and poisoning to target organizations in the Middle East and North Africa. They compromised DNS registrars and registries to redirect traffic from legitimate government, intelligence, and military websites to attacker-controlled servers where they harvested credentials.

The campaign showed that DNS attacks can go beyond stealing credit cards. They can be tools for espionage and intelligence gathering.

Why DNS poisoning is so dangerous

DNS poisoning is one of the more frightening cyberattacks. Attackers can use DNS poisoning to:

  • Steal credentials from thousands of users at once
  • Distribute malware at scale by redirecting software update checks
  • Conduct surveillance by routing traffic through their own servers
  • Intercept email by poisoning MX records
  • Facilitate phishing attacks by making fake sites appear on legitimate domains

It’s invisible to users. When you get redirected via DNS poisoning, your browser’s address bar still shows the correct URL. The fake site looks legitimate. There are no obvious warning signs unless you know exactly what to look for (and most people don’t).

It affects everyone using the compromised DNS server. One successful DNS poisoning attack impacts potentially thousands or millions of people who use that DNS resolver. It’s a force multiplier for attackers.

It’s difficult to detect. Malware might trigger antivirus alerts, but DNS poisoning operates at a level most users never see or think about. Your computer is doing exactly what it’s supposed to do (following DNS instructions), but those instructions have been corrupted.

It undermines trust in the internet itself. DNS is a fundamental infrastructure. When it’s compromised, users can’t trust that they’re going where they think they’re going. That’s a problem that extends far beyond any individual attack.

From an email security perspective, DNS poisoning creates extra risks. Attackers can poison DNS records to redirect email flow, intercept messages, or make phishing emails appear more legitimate. If your DNS records for email authentication get poisoned, it can break your entire email security setup.

How to prevent DNS poisoning for your business

DNS poisoning sounds daunting (because it is), but that doesn’t mean your business is defenseless. You can take steps to protect your organization and prevent attacks:

1. Implement DNSSEC (DNS Security Extensions)

DNSSEC is the most effective defense against DNS poisoning. It adds cryptographic signatures to DNS records, allowing DNS resolvers to verify that the information they receive is authentic and hasn’t been tampered with.

DNSSEC proves the message came from who it claims to be from and hasn’t been altered in transit.

Implementing DNSSEC requires:

  • Signing your DNS zones with cryptographic keys
  • Publishing those signatures alongside your DNS records
  • Ensuring your DNS resolver validates DNSSEC signatures

2. Keep DNS software updated

DNS server software gets security patches regularly, and those patches often address vulnerabilities that could enable poisoning attacks. Running outdated DNS software makes you open to attack.

Set up automatic updates or establish a regular patching schedule. This applies to both authoritative DNS servers (if you run your own) and recursive resolvers.

3. Use trusted DNS resolvers

Not all DNS resolvers are created equal. Major providers like Cloudflare (1.1.1.1), Google Public DNS (8.8.8.8), and Quad9 (9.9.9.9) invest heavily in security and implement DNSSEC validation by default.

If you’re using your ISP’s default DNS servers, consider switching to one of these more security-focused alternatives.

4. Implement proper DNS server security

If you operate your own DNS infrastructure:

  • Restrict zone transfers to authorized servers only
  • Use transaction signatures (TSIG) for server-to-server communication
  • Implement access controls and firewall rules
  • Separate authoritative and recursive DNS functions
  • Monitor DNS query patterns for anomalies

5. Secure your email authentication

Since DNS poisoning can compromise email security, implement strong email authentication protocols:

  • SPF to specify which servers can send email on your behalf
  • DKIM to sign outgoing messages
  • DMARC to tell receiving servers how to handle authentication failures

These protocols help guarantee that even if DNS gets compromised, your email infrastructure maintains some level of integrity. And that’s a major advantage when other channels have been compromised. 

6. Clear your DNS cache regularly

From an individual employee perspective, you can clear your local DNS cache if you’re suspicious of DNS poisoning: 

  • Windows: Open Command Prompt and run ipconfig /flushdns
  • Mac: Open Terminal and run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Linux: Run sudo systemd-resolve –flush-caches (varies by distribution)

7. Look for warning signs

DNS poisoning is obvious (by design), but if you’re watching carefully, you can spot some telltale signs:

Warning signWhat it meansWhat to do
Unexpected SSL certificate warningsYour browser is connecting to a server with the wrong certificateDon’t proceed. Close the browser and clear DNS cache
Websites look slightly differentYou might be on a fake versionCompare the URL carefully. Check for HTTPS. Contact the company directly
Login pages appear unexpectedlyAttackers often create fake login pages to steal credentialsDon’t enter credentials. Navigate to the site through a bookmark
Email stops working properlyDNS poisoning can affect email routingCheck your MX records and contact your email provider
You’re getting security alertsYour browser or security software detects something wrongDon’t ignore these. Investigate immediately

Protect your organization from DNS-based attacks with Valimail

Your email authentication relies on DNS records. SPF records, DKIM keys, and DMARC policies are all published in DNS. If an attacker poisons those records, they can:

  • Bypass email authentication entirely
  • Make spoofed emails appear legitimate
  • Intercept email by changing MX records
  • Disable your DMARC protections

This is why email authentication needs to be part of a broader security strategy that includes DNS protection. You can have perfect DMARC configuration, but if the underlying DNS infrastructure is compromised, that protection falls apart.

And we can help.

Valimail Monitor gives you free visibility into your email authentication status to help you identify vulnerabilities before attackers exploit them. You can further extend your protection by using Valimail Enforce to automate DMARC, SPF, and DKIM management.

Frequently asked questions

Q: Can antivirus software protect against DNS poisoning?

Not really. DNS poisoning happens at the network infrastructure level, before your computer even connects to a website. Antivirus software can detect malware on fake sites and might warn you about known malicious IP addresses, but it won’t prevent the DNS poisoning itself. You need DNS-level protections like DNSSEC.

Q: How long does DNS poisoning last?

It depends on the Time-To-Live (TTL) setting of the poisoned DNS record. If the TTL is set to 24 hours, the poisoned record stays in the cache for up to 24 hours unless manually cleared. Some attacks involve poisoning records with very long TTLs to maximize impact.

Q: Can I tell if I’m affected by DNS poisoning just by looking at my browser?

Not easily. The URL in your address bar will still show the correct domain name. Your best indicators are unexpected SSL certificate warnings, websites that look slightly off, or sudden unexpected login requests.

Q: Is DNS poisoning the same as pharming?

Pharming is the attack technique that uses DNS poisoning (or DNS hijacking) to redirect users to fake websites. DNS poisoning is one method to achieve pharming. So pharming is the goal, DNS poisoning is one way to get there.

Q: Do VPNs protect against DNS poisoning?

Partially. A good VPN encrypts your DNS queries and routes them through the VPN provider’s DNS servers, which can protect against local DNS poisoning. However, if the VPN provider’s DNS servers themselves are poisoned, you’re still vulnerable. VPNs add a layer of protection but aren’t a complete solution.

Get started for free
with Monitor

Start your path to DMARC enforcement with a panoramic view of the traffic being sent on your behalf.
No trial offers, credit cards, or obligations.

Explore all Valimail
has to offer

Go one step further than visibility…Take action! Reach DMARC enforcement faster. Stay compliant with evolving sender requirements. All while protecting your brand.

[UPCOMING WEBINAR] Valimail Product Release: Get Better Brand Protection and Brand Impressions – Register HERE