> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/wang-lu-da-xiao-shi/untitled.md).

# Arp攻擊

**netcut與netcutdefender**

**將兩台主機彼此的連線斷開**

**把gateway(192.168.1.1)的ip左移,把要斷開的兩台電腦其中一台右移(192.168.1.5),然後把要與192.168.1.5連線的192.168.1.4給cut off,那麼,他們彼此就無法連線了,但仍可以連上網路的**

![](https://lh5.googleusercontent.com/wqMAvPuNmn_2_MySW3UzYgHlIoAnoWkzNe78h_wmTcNJiYdCFn-1u1uPvnvMUJoyOQbgNSZda989YtA8kZd0vpao0MxQuBhfoR6_DIEhmOkxr71U5G6C73cRntbeDH1k)

**若是右邊的ip是gateway(192.168.1.1),那麼,該台電腦就無法連上網際網路了!**

![](https://lh3.googleusercontent.com/lOGtSOZzQIaljISTHFqj8fZYP3QqvWJlSYGG-s2IQ7OnP3PnRY83f96TVS2f4UzUm54t-R-vXb8ohG5B-95pdHY3db0Bq6RPhJ7wt_ByDiI_apMNJJx9zjjO5GQye62N)

**ubuntu linux:**

**you can also use arpspoof like this**

**sudo arpspoof -t "gateway ip" "your ip"**

**使用arptables**

**sudo apt-get install arptables**

**sudo arptables -P INPUT DROP**

**sudo arptables -P OUTPUT DROP**

**sudo arptables -A INPUT -s gateway\_IP --source-mac gateway\_mac -j ACCEPT**

**sudo arptables -A OUTPUT -d gateway\_IP --destination-mac gateway\_mac -j ACCEPT**<br>

**tuxcut**

**其實此成是使用arpspoof**

**echo 0 >  /proc/sys/net/ipv4/ip\_forward**

**arpspoof -i eth0 -t 192.168.1.1 192.168.1.5**

**而其保護arp的方法,是使用arptables**

**sudo arptables -P INPUT DROP**

**sudo arptables -P OUTPUT DROP**

**sudo arptables -A INPUT -s gateway\_IP --source-mac gateway\_mac -j ACCEPT**

**sudo arptables -A OUTPUT -d gateway\_IP --destination-mac gateway\_mac -j ACCEPT**

**arptables -L**

**Chain INPUT (policy DROP)**

**-j ACCEPT -s 192.168.1.1 --src-mac 00:03:c9:a5:74:a7**&#x20;

**Chain OUTPUT (policy DROP)**

**-j ACCEPT -d 192.168.1.1 --dst-mac 00:03:c9:a5:74:a7**<br>
