Phishing & scams

What Is Pharming? How Pharming Attacks Work and How to Stop Them

Pharming corrupts the step that turns a website name into an address, so you land on a fake site without clicking anything. Here is how it works and how to defend against it.

Cysoro Security TeamPublished · 8 min read
yourbank.com DNS: yourbank.com → 198.51.100.77 ✗ FAKE Real address: 203.0.113.10 REDIRECTED PHISHING & SCAMS Pharming Right address. Wrong website. No click needed — DNS does the trick.
Quick answer

Pharming redirects you from a legitimate website to a fake one by corrupting DNS, the system that turns domain names into IP addresses. Unlike phishing, it needs no click on a bad link: malware, a hijacked router, a poisoned DNS cache or a compromised registrar can send you to the attacker's copy of your bank site even when you type the address correctly. Defenses include DNSSEC, router hardening and MFA on DNS accounts.

Key takeaways

  • Pharming corrupts DNS so you reach a fake site even when you type the correct address — no bad link needed.
  • It happens through malware, hijacked routers, poisoned DNS caches, or stolen registrar credentials.
  • A valid padlock does not prove a site is real in registrar attacks, so verify by other means before entering credentials.

You type your bank's address correctly. The page looks right. The address bar shows the right name. And yet you are not on your bank's site at all. That is pharming — and unlike phishing, it never asks you to click anything.

What is pharming?

Pharming is an attack that redirects you from a legitimate website to a fraudulent one by corrupting DNS, the system that translates domain names into IP addresses. The name blends "phishing" and "farming", because one change can harvest many victims at once.

Every time you type an address like yourbank.com, your device asks a DNS server to turn that name into a numeric IP address — the way a phone directory turns a name into a number. Pharming plants a false answer in that lookup. Your browser has no way of knowing the difference: the address bar still shows the right name, and the fake page is built to look identical to the real one.

The FDIC defined pharming in 2005 as "the practice of redirecting Internet domain name requests to false Web sites in order to capture personal information, which may later be used to commit fraud and identity theft". Twenty years later, the definition still holds — only the techniques have grown more sophisticated.

How does pharming work?

Pharming works by planting a false address at one of five points in the DNS chain. Each point is a different attack, with different victims and different defenses.

The DNS chain — and the five places pharming strikes 1. Your devicehosts file,DNS settings 2. Your routerDNS settingschanged 3. The resolvercachepoisoned 4. Name serversrecordsaltered 5. Registraraccountstolen Your browser trusts every step. One false answer anywhere in the chain sends you to the attacker's server. Points 1–2 hit one device or household. Points 3–5 can hit thousands — or an entire domain's visitors.
Five points in the DNS chain where pharming can strike. Illustration by Cysoro.

1. The hosts file on your device

Every computer has a small local file that maps names to addresses and is checked before any DNS server. Malware that adds one line — your bank's name next to the attacker's IP address — redirects that one device quietly and permanently, until the line is removed.

2. The DNS settings on your device

Instead of editing the hosts file, malware can switch the device to a DNS server the attacker runs. That server answers honestly for most sites and lies about the few that matter. This is how the DNSChanger malware worked in the Operation Ghost Click case, in which millions of computers were infected.

3. Your home or office router

A router with a default or weak admin password can be hijacked remotely, and its DNS settings changed to point at the attacker's resolver. Every device on that network — laptops, phones, tablets — is then redirected. The Canadian Centre for Cyber Security describes exactly this: a compromised router whose DNS cache is manipulated or whose DNS settings are changed to point to other resolvers.

4. A DNS resolver's cache

Resolvers cache answers so they do not have to ask every time. Cache poisoning means getting a forged answer into that cache, so everyone who uses the resolver receives it. In 2008, researcher Dan Kaminsky found a fundamental flaw in how DNS software validated responses, serious enough to prompt a coordinated, simultaneous patch release across virtually every major DNS vendor. CERT's advisory VU#800113 documents the weakness.

5. The domain's own DNS records

The most damaging version skips the user entirely. The attacker steals the login for the account at the registrar or DNS host and edits the real records. In January 2019, CISA issued Emergency Directive 19-01 after attackers did this to US government domains, changing address, mail and name server records to point at servers they controlled — and then reading web and mail traffic before passing it on.

Pharming vs phishing: what's the difference?

Pharming and phishing share a goal — stealing your credentials — but they attack different things. Phishing tricks a person; pharming tampers with the technical path to the website.

PhishingPharming
What is attackedThe person, with a deceptive messageDNS, the name-to-address lookup
Needs a click?Yes — a link, attachment or replyNo — typing the right address is enough
VictimsWhoever opens the messageEveryone using the poisoned DNS, router or domain
Address barUsually a look-alike domainShows the correct, real domain
Main defenseSkepticism, email filters, DMARCDNSSEC, router hardening, MFA on DNS accounts
ExampleFake bank email with a linkHijacked router sending all users to a fake bank

The two are often combined. An attacker who poisons DNS may also send phishing emails, and a phishing email may install the malware that sets up pharming. Our guide to spear phishing covers the message-based side of the same threat.

What are real examples of pharming attacks?

Pharming is less visible than phishing, which is why documented cases matter. Three stand out.

The 2019 DNS hijacking campaign

In late 2018, security researchers and governments detected a campaign targeting DNS infrastructure worldwide. Attackers compromised credentials for accounts that could change DNS records, altered address, mail exchanger and name server records, and intercepted web and mail traffic. CISA's Emergency Directive 19-01, issued on 22 January 2019, ordered US federal agencies to audit DNS records, change DNS account passwords, add MFA to DNS accounts and monitor certificate transparency logs — all within ten business days.

Operation Ghost Click and DNSChanger

In November 2011, US prosecutors announced Operation Ghost Click, which led to arrests after a ring infected millions of computers with DNSChanger malware. The malware silently changed victims' DNS settings to attacker-run servers, which redirected them to fake sites and injected ads. The FBI later ran a temporary safety net so infected users could still reach the internet while they cleaned their machines.

The 2007 attacks on more than 50 banks

One of the most cited pharming incidents targeted over fifty financial institutions across the United States, Europe and Asia. Victims were redirected to near-perfect copies of their banks' sites and asked to enter login details, which were harvested for fraud. The case is why banks began pushing customers toward hardware tokens and out-of-band verification.

How can you tell if you are being pharmed?

Pharming is designed to be invisible, but it does leave clues. Watch for these.

  • Certificate warnings on a site you use every day. In device and router attacks, the fake site usually cannot get a valid certificate for the real domain, so your browser warns you. Never click through that warning.
  • A site that looks slightly wrong. Missing images, odd fonts, a login page that appears before you expect it, or a page that asks for details the real site never asks for.
  • HTTPS suddenly missing. If your bank's site loads over plain HTTP when it normally uses HTTPS, something is intercepting the connection.
  • Your router's DNS settings changed. Log in to your router and check the DNS servers listed. If they are addresses you do not recognize, that is a red flag.
  • Other devices on the same network show the same problem. If your phone and laptop both reach a strange version of a site, the router — not your device — is the likely cause.
  • Login fails with correct credentials. A fake site may reject your real password, or accept anything you type, because it is only collecting what you enter.

One warning to remember: in a registrar attack, the fake site can show a valid padlock, because the attacker can obtain a real certificate for the domain. The absence of a browser warning does not prove you are on the real site.

How do you protect against pharming?

Defenses split into two groups: what you do at home, and what organizations do for their domains.

Pharming defenses: at home and for your domain At home • Change the router's default password • Check router DNS settings regularly • Apply router firmware updates • Use a DNSSEC-validating resolver • Keep devices malware-free For your domain • Enable DNSSEC on your domain • MFA on registrar and DNS accounts • Lock the domain against transfers • Audit DNS records regularly • Monitor certificate transparency logs
Pharming defenses for households and for domain owners. Illustration by Cysoro.

At home

Change your router's default password. Routers ship with well-known admin credentials, and attackers scan for them. Change both the Wi-Fi password and the admin password, and disable remote administration if you do not need it. Our guide on how to secure your Wi-Fi walks through the full router checklist.

Check the router's DNS settings. Log in every few months and look at the DNS servers configured. They should be your ISP's, or a resolver you chose yourself, such as a DNSSEC-validating public resolver. Unknown addresses mean the router may be compromised.

Update router firmware. Router vulnerabilities are a standard entry point for DNS hijacking. Apply firmware updates when they appear, and replace a router the vendor no longer supports.

Use DNSSEC-validating resolvers. DNSSEC adds cryptographic signatures to DNS answers, so a resolver can tell a forged answer from a real one. NIST's deployment guide, SP 800-81-2, is the reference for how it works.

For your domain

Put MFA on every DNS account. CISA's first recommendation after the 2019 campaign was MFA on all accounts that can change DNS records — registrar accounts, DNS hosting panels and the servers that manage them. This is the single highest-value control for a domain owner.

Enable DNSSEC and a registry lock. DNSSEC lets resolvers verify your records are genuine. A registry lock adds a manual, out-of-band step before any change to your domain, which stops most hijacking outright.

Audit your DNS records and watch certificate transparency logs. Check that your records still resolve where you expect, and monitor certificate transparency logs for certificates issued for your domain that you did not request — a sign someone has taken over your DNS.

What should you do if you think you have been pharmed?

Act quickly, and do it from a device you trust — ideally one on a different network, such as your phone on mobile data, so the same poisoned DNS cannot mislead you again.

  1. Stop entering credentials. Close the site. Do not log in again until you know what happened.
  2. Check your router. Log in and inspect the DNS settings. If they were changed, restore the correct ones and change the admin password.
  3. Scan your device for malware. Run a full scan, and check the hosts file for entries you did not add.
  4. Change passwords from a clean device. Start with email and banking, and turn on MFA everywhere you can.
  5. Call your bank. If you entered banking details, tell the bank immediately and watch for unauthorized transactions.
  6. Report it. In the US, report financial fraud to the FBI's IC3 at ic3.gov, and forward the details to the impersonated company.

The bottom line

Pharming is phishing's quieter cousin: it does not need you to make a mistake, because it corrupts the road to the website itself. That is what makes it dangerous — and what makes the defenses structural rather than behavioral.

At home, that means a hardened router and a DNSSEC-validating resolver. For your business, it means MFA on every DNS account, DNSSEC on your domain and regular record audits. You can check your own domain's DNS and security headers in seconds with our free DNS lookup tool.

Frequently asked questions

What is pharming in simple terms?

Pharming is a scam that sends you to a fake website even when you type the correct address. The attacker tampers with the system that translates website names into addresses, so your browser lands on their copy of the site instead of the real one.

What is the difference between pharming and phishing?

Phishing tricks you into clicking a bad link or opening a fake message. Pharming tampers with DNS or your router, so you can be redirected without clicking anything at all. Phishing targets one person at a time; one pharming change can harvest many victims at once.

How does a pharming attack work?

The attacker plants a false address at one point in the DNS chain: your device's hosts file, its DNS settings, your home router, a DNS resolver's cache, or the domain's own DNS records. Your browser then asks for the real site and is silently sent to the attacker's server.

Can pharming happen if I type the address correctly?

Yes, that is the point of pharming. Typing the address correctly only helps against look-alike domains. If DNS itself is corrupted, the correct name still resolves to the attacker's IP address.

Does the padlock icon protect me from pharming?

Not always. In router and device attacks the fake site usually cannot get a valid certificate, so a certificate warning is a real clue. But if attackers control a domain's DNS records they can also obtain a valid certificate for it, so the padlock can appear on a fake site.

What is DNS poisoning?

DNS poisoning, or cache poisoning, means getting a forged answer into a DNS resolver's cache. Everyone who uses that resolver is then sent to the attacker's address until the fake entry expires or is cleared.

How do I protect myself from pharming?

Change your router's default password, check its DNS settings, keep its firmware updated, use DNSSEC-validating resolvers, keep devices malware-free, and enable MFA on every account that can change your domain's DNS records.

What should I do if I think I was pharming victim?

Stop entering credentials, check your router's DNS settings and your device for malware, change passwords for any accounts you used from a clean device, and report the incident to your bank and to the FBI's IC3 if money was involved.

Sources

  1. CISA — Mitigate DNS Infrastructure Tampering (Emergency Directive 19-01)
  2. FDIC — Guidance on How Financial Institutions Can Protect Against Pharming Attacks
  3. CERT Coordination Center — VU#800113: DNS cache poisoning
  4. NIST — SP 800-81-2, Secure Domain Name System (DNS) Deployment Guide
  5. Canadian Centre for Cyber Security — Domain name system (DNS) tampering (ITSAP.40.021)
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against CISA Emergency Directive 19-01, FDIC guidance on pharming, CERT VU#800113 and NIST SP 800-81-2.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free