what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

dlink614.txt

dlink614.txt
Posted Jun 22, 2004
Authored by Gregory Duchemin

The DI-614+ SOHO DLINK router suffers a script injection vulnerability that uses DHCP as a vector of attack.

tags | exploit
SHA-256 | b89f567cac4704eaa1323775e91f7c938e9c34a4c6b3f5a58e198b767eca3571

dlink614.txt

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TITLE: Security flaw in DLINK 614+ - SOHO routers (http://www.dlink.com)

TYPE: Script injection over DHCP

QUOTE from DLINK:

The AirPlus DI-614+ combines the latest advancements in 802.11b
silicon chip
design from Texas Instruments, utilizing their patented Digital Signal
ProcessingTM technology, and D-Link?s own robust firewall security
features.
...
A simple yet intelligent, web-based setup wizard makes the DI-614+
easy for any
user to quickly and securely connect computers to share a high-speed
Internet
connection, files, resources, games or just to communicate. An
integrated 4-port
switch allows direct connection of up to four computers. Several wireless
clients can also securely connect to the network using 64, 128, or
256-bit
encryption.
...
The D-Link AirPlus DI-614+ is the ideal networking solution for small
offices,
home offices, schools, coffee shops and other small businesses that
cater to the
public.



DETAILS:


The DI-614+ SOHO router (latest firmware rev 2.30) suffers a "script
injection over dhcp" vulnerability.
Using DHCP as a vector, arbitrary and malicious scripting can be
injected into the DHCP administrative and logs pages (if enabled)

Scripting sent in such a way will be executed on behalf of the unaware
administrator when he consult the web based management interface and
lead to the complete compromising of the
firewall/router giving full access to the administrative account.

The DI-614+ does not filter user supplied data passed through the DHCP
HOSTNAME option.
Basically, it first truncates the string to 20 characters and displays
it AS IS in the DHCP and log pages
opening a large hole that can easily be exploited for instance:
to change the administrator password (doesn't require his current
password), to reboot the box, to reset the box's factory settings.

Because the DLINK 614+ is used, among others, by coffee shops, a
successful exploitation may have very serious impact.


EXPLOITATION:

As an example, one can inject a script designed to force the
administrator into restoring the box default settings
using this nasty little script:

<iframe height=0 width=0 src='restore.cgi'>

where a call to restore.cgi indeed restore the box factory defaults.

problem #1:

the DI-614+ will truncate this code into:

<iframe height=0 wid ** CGI ADDED STUFF **

20 characters is obviously not enough to do something useful here.
Splitting this script into 3 parts, sending each of them in a
different DHCPREQUEST along
with a different CLIENTID option or Mac address will create 3 new
differents entries in the DHCP admin page.
something like:

<iframe height=0 wid** CGI ADDED STUFF **
th=0 src='restore.cgi'** CGI ADDED STUFF **
| ** CGI ADDED STUFF **

problem #2:

the result is still bogus from a browser perspective, because of the
other tags (noted above as CGI ADDED STUFF) inserted between
each new entry.
However a dirty trick allows to circumvent this problem by finishing
each fragment with an id option and doing so, quoting the ** CGI added
stuff **.
like this (this time in four packets):

<iframe id='**CGI ADDED STUFF**
' height=0 id='**CGI ADDED STUFF**
' width=0 id='**CGI ADDED STUFF**
' src='restore.cgi'>

Result is quite awful for a human but also readable for most browsers,
afterwhat, next time the site administrator opens the DHCP page,
he will automaticaly, and without notice, restores the box default
password (blank), disable wireless encryption, etc...
Finally X has to connect to 192.168.0.1 (default address), and voila !
he is administrator.

This vulnerability can be exploited from both wire and wireless networks.
The solution is simply to filter the HOSTNAME DHCP option supplied by
users by escaping html meta-characters



VENDOR:

DLINK's support staff has been contacted by May 24th but didn't reply
to my questions
No idea if a new firmware will be made available soon and even if they
are currently working on it
It looks like they just don't care too much about security.


WORKAROUND:
Use static leasing only (it fixes the hostname) otherwise just use a
real dhcpd daemon (and disable DLINK dhcpd)


VULNERABLE:

firmware up to rev 2.30 (latest)



AUTHOR: Gregory Duchemin (c3rb3r at sympatico.ca)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA1pCm9K2fGbOmSdYRAvc4AJ4gT9EItfhuZMeVAzUaI1hT+3fIYQCgwKHI
UCcDdfB/Un1DAsxOY6MLmtY=
=plei
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close