---
title: "CAPEC-89: Pharming"
url: https://radicalnotion.ai/capec/capec-89
type: capec
description: "A pharming attack occurs when the victim is fooled into entering sensitive data into supposedly trusted locations, such as an online bank site or a trading platform. An attacker can impersonate these supposedly trusted sites and have the victim be directed to their site rather than the originally intended one. Pharming does not require script injection or clicking on malicious links for the attack to succeed."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-89: Pharming

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** Very High
- **Likelihood of attack:** High
- **CAPEC catalog version:** 3.9

## Description

A pharming attack occurs when the victim is fooled into entering sensitive data into supposedly trusted locations, such as an online bank site or a trading platform. An attacker can impersonate these supposedly trusted sites and have the victim be directed to their site rather than the originally intended one. Pharming does not require script injection or clicking on malicious links for the attack to succeed.

## Execution flow

### Step 1: Exploit

Attacker sets up a system mocking the one trusted by the users. This is usually a website that requires or handles sensitive information.

### Step 2: Exploit

The attacker then poisons the resolver for the targeted site. This is achieved by poisoning the DNS server, or the local hosts file, that directs the user to the original website

### Step 3: Exploit

When the victim requests the URL for the site, the poisoned records direct the victim to the attackers' system rather than the original one.

### Step 4: Exploit

Because of the identical nature of the original site and the attacker controlled one, and the fact that the URL is still the original one, the victim trusts the website reached and the attacker can now "farm" sensitive information such as credentials or account numbers.

## Prerequisites

- Vulnerable DNS software or improperly protected hosts file or router that can be poisoned
- A website that handles sensitive information but does not use a secure connection and a certificate that is valid is also prone to pharming

## Skills required

- **Medium:** The attacker needs to be able to poison the resolver - DNS entries or local hosts file or router entry pointing to a trusted DNS server - in order to successfully carry out a pharming attack. Setting up a fake website, identical to the targeted one, does not require special skills.

## Resources required

- None: No specialized resources are required to execute this type of attack. Having knowledge of the way the target site has been structured, in order to create a fake version, is required. Poisoning the resolver requires knowledge of a vulnerability that can be exploited.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Data | - |

## Mitigations

- All sensitive information must be handled over a secure connection.
- Known vulnerabilities in DNS or router software or in operating systems must be patched as soon as a fix has been released and tested.
- End users must ensure that they provide sensitive information only to websites that they trust, over a secure connection with a valid certificate issued by a well-known certificate authority.

## Example instances

An online bank website requires users to provide their customer ID and password to log on, but does not use a secure connection. An attacker can setup a similar fake site and leverage pharming to collect this information from unknowing victims.

## Related weaknesses (CWE)

- [CWE-346](https://radicalnotion.ai/cwe/cwe-346): Origin Validation Error
- [CWE-350](https://radicalnotion.ai/cwe/cwe-350): Reliance on Reverse DNS Resolution for a Security-Critical Action

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-151](https://radicalnotion.ai/capec/capec-151) | Identity Spoofing |
| Related | [CAPEC-98](https://radicalnotion.ai/capec/capec-98) | Phishing |
| Related | [CAPEC-142](https://radicalnotion.ai/capec/capec-142) | DNS Cache Poisoning |
| Related | [CAPEC-543](https://radicalnotion.ai/capec/capec-543) | Counterfeit Websites |
| Related | [CAPEC-611](https://radicalnotion.ai/capec/capec-611) | BitSquatting |
| Related | [CAPEC-630](https://radicalnotion.ai/capec/capec-630) | TypoSquatting |
| Related | [CAPEC-631](https://radicalnotion.ai/capec/capec-631) | SoundSquatting |
| Related | [CAPEC-632](https://radicalnotion.ai/capec/capec-632) | Homograph Attack via Homoglyphs |

## Frequently asked questions

### What is CAPEC-89?

A pharming attack occurs when the victim is fooled into entering sensitive data into supposedly trusted locations, such as an online bank site or a trading platform. An attacker can impersonate these supposedly trusted sites and have the victim be directed to their site rather than the originally intended one. Pharming does not require script injection or clicking on malicious links for the attack to succeed.

### How does a Pharming attack work?

It typically unfolds over 4 phases. It begins with: Attacker sets up a system mocking the one trusted by the users. This is usually a website that requires or handles sensitive information.

### How do you prevent CAPEC-89?

All sensitive information must be handled over a secure connection.

### What weaknesses does CAPEC-89 target?

CAPEC-89 exploits 2 CWE weaknesses: CWE-346 (Origin Validation Error) and CWE-350 (Reliance on Reverse DNS Resolution for a Security-Critical Action).

### How severe is CAPEC-89?

MITRE rates CAPEC-89 as Very High severity with high likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/89.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-89). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
