簡介
arpspoof通過偽造ARP應答,將LAN上一個目標主機(或所有主機)的數據包重定向到另一個主機。這是一種非常有效的嗅探開關上流量的方法。
Kernel IP forwarding (or a userland program which accomplishes the same, e.g.fragrouter(8))must be turned on ahead of time.
使用
語法
arpspoof [-i interface] [-c own|host|both] [-t target] [-r] host
參數
-i interface 指定要使用的接口。
-c own|host|both 指定范圍own|host|both(自己|主機|兩者)
-t target 指定一台特定主機進行ARP中毒(如果未指定,則為LAN上的所有主機)
-r 毒害兩個主機(主機和目標)以捕獲兩個方向的流量。(僅對-t有效)
host 指定您希望攔截數據包的host(通常是本地網關)
示例
arpspoof -i eth0 -t 192.168.1.100 192.168.1.1
192.168.1.100為攻擊目標的IP,192.168.1.1為攻擊目標的網關
備注
如進行欺騙,需開啟端口轉發功能
echo 1 > /proc/sys/net/ipv4/ip_forward
- 1代表開啟,0代表關閉,默認是0
- 這個只是臨時開啟端口轉發功能,重啟后恢復