> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/packet-squirrel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/packet-squirrel/default-payloads/spoofing-dns.md).

# Spoofing DNS

The built-in DNS spoofing payload from switch position 2 will intercept DNS requests between the target and the LAN and provide spoofed responses. By default the payload is configured to spoof all requests with the IP address of the Packet Squirrel.

To configure the DNS Spoof payload with custom mapping, just power on the Packet Squirrel in Arming Mode (switch to far right position) and edit the `/root/payloads/switch2/spoofhost` file. This can be achieved by either using an SCP graphical utility such as WinSCP or FileZilla, or from the command line via SSH.

![](/files/-MiXAmflN9KVbmgTvGIp)

SSH into the Packet Squirrel and edit the `spoofhost` file with nano

Replace `#` with the domain you wish to spoof, and the IP address with the spoofed destination.

![Responds to request for asitewewanttospoof.com to 159.203.210.247](/files/-MiXB2Tzl-T6VDMqAfm7)

With the `spoofhost` file configured and saved, power off the Packet Squirrel and flip the switch to position 2. Now place the Packet Squirrel inline between a target and the network. When it powers on the DNS spoof payload will run, indicated by a single blinking yellow LED.

**Pro Tip**: Modify the DNS Spoof payload to be more inconspicuous and to not blink the LED by changing line 22 of `/root/payloads/switch2/payload.sh` from `LED ATTACK` to `LED OFF`


---

# 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:

```
GET https://documentation.hak5.org/packet-squirrel/default-payloads/spoofing-dns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
