Pierre Kim said that his analysis of the D-Link 850L came about after a security contest organised by a company where one version of the router (revision A) was used. But he received the other version (revision B) from Amazon and was thus able to find flaws in both versions.
He said that due to some previous difficulties in a previous exchange with D-Link, he had gone ahead and published his findings without informing the vendor. On that occasion, he says he gave D-Link more than 100 days to fix flaws in the DWR-932B.
But, he claims, he was not notified of any fixes, though the company "posted its official answers and patches on their website that the security researcher found 'by chance'."
Secondly, Kim said the Revision A model was vulnerable to cross-site scripting attacks, both on the WAN and LAN interfaces. Analysing PHP files in the /htdocs/web directory, several trivial cross-site scripting flaws could be found, he said, adding that an attacker could use these to target an authenticated user to steal authentication cookies.
The Revision B model lent itself to retrieving the admin password and gaining full access using the custom mD-Link cloud protocol, Kim claimed. This could be done both from the WAN and LAN side.
Additionally, he found that the cloud protocol used on both revisions of the router was weak. "No encryption is provided by default by this technology, it is only a basic TCP relay system. All the traffic is sent over TCP to remote Amazon server without proper encryption," he wrote.
Kim also found that if a revision B device was reset, then one of the init scripts would start with certain arguments which allowed backdoor access from the LAN side.
Another flaw which Kim said exists in both models were stunnel private keys which are hardcoded in the firmware. " The administration can be used using HTTPS. This allows an attacker to do SSL MITM," he said referring to a man-in-the-middle attack.
Kim also identified a file within the system of Revision A that allowed changes in the DNS configuration without checking the authentication of the admin user. "An attacker can bruteforce the nonce (?nonce=integer). There are no limitations of HTTP requests and no authentication method," he pointed out.
Apart from this, he found weak file permissions in both models and credentials stored in clear text. Also, the DHCP client running on Revision B was vulnerable to several command injections as root.
iTWire contacted D-Link on Monday for its take on these findings. On Wednesday night, the company responded, saying it was aware that some flaws had been reported in the D-Link DIR-850L routers.
"D-Link immediately took action to investigate and work toward finding solutions for these issues. A firmware update will be provided as soon as it becomes available," it added.
Update, 25 September: A D-Link spokesperson responded to iTWire's queries, saying: "On 8 September, a news article reported zero-day flaws with D-Link DIR-850L routers. D-Link immediately took actions to investigate the issues and endeavours to solve them. A firmware update was provided on 20 September. Please remember to go to the D-Link support site to update your routers."
The spokesperson added: "Additionally, D-Link strongly recommends to take the following actions in the listed order to help protect your privacy.
- 1. Reset the router to its default factory setting.
- 2. Disable the WAN remote admin feature.
- 3. Do not remotely access the router through unauthorized public Wi-Fi.
- 4. Change the wireless SSID password and PIN code to prevent unauthorised users from accessing the LAN.
- 5. Change the device’s administrator password. Be sure to use a strong new password.