Multiple vulnerabilities on D-Link Dir-505 devices
The file provided to the end-user in order to make a backup copy of the device configuration, is encrypted with a hardcoded password. The device firmware creates the configuration file in three specific steps, as shown below: - Collect the configuration data to backup - Encrypt entries with the hardcoded password "sw5-superman" - Create the file header through the tool "imghdr". An attacker ables to get an encrypted configuration file could decrypt its contents with the following command: sh# dd if=config-file of=config-file-no-header bs=84 skip=1 sh# ccrypt -d -K sw5-superman config-file-no-header. Decrypted file contains sensitive information that an attacker could use in order to compromise the target device (e.g., admin password and WPA passphrase). Furthermore, an attacker can craft a own configuration file, encrypt it with the hardcoded password, append at the beginning of file a valid header and finally upload the new configuration to the target device without authentication, exploiting the "Authentication bypass" issue described inside this advisory. An authenticated attacker can exploit the "Ping Test" feature exposed inside the page "/System_Check.htm", in order to execute arbitrary commands inside the device, with root privileges. The page "/System_Check.htm" does not require authentication in order to be accessed. This page exposes the "Ping Test" feature, which can be used to execute arbitrary commands inside the device, with root privileges.