Pattern matching odd HTTP request

Bill McGonigle mcgonigle at medicalmedia.com
Tue Sep 18 22:58:42 UTC 2001



On Tuesday, September 18, 2001, at 06:30 PM, Jake Khuon wrote:
>
> You start to suspect a DDOS port-flood attack.  It's certainly causing 
> me to
> spawn a lot of httpds and occupying a lot of ports.
>

This isn't good.  I wrote a bit of test code to see what would happen if 
I had alot of timeouts:

#-----
use Net::Telnet;

my $num_open = 400;

sub doConnect {
     my $telnet_handle = Net::Telnet->new(Port=>'80');
     $telnet_handle->open("localhost");
     if ($num_open > 0) {
         print "$num_open...";
         $num_open--;
         doConnect();
     } else {
         sleep(20);
     }
}

doConnect();
print "\n";
#-----

On Apache 1.3, this brings the number of httpd processes up to 
MaxClients, then each one waits 300 seconds (the default timeout) for 
the connections to time out, at which point the other connections are 
made, and the cycle continues.  A DDOS of this nature would be 
particularly nasty.  One client (happened to be on localhost) tied up 
the server for 6 minutes this way with the default Apache config.

Here's what the logfile for these attempts looks like:

127.0.0.1 - - [18/Sep/2001:18:43:06 -0400] "-" 408 -

Doh!

-----
Bill McGonigle
Research & Development
Medical Media Systems, Inc.
http://www.medicalmedia.com
+1.603.298.5509x329




More information about the NANOG mailing list