Source: https://www.securityweek.com/flaw-gives-hackers-remote-access-files-stored-d-link-dns-320-devices
Researchers at Vietnam-based CyStack Security discovered the vulnerability and reported it to D-Link in mid-August. An advisory was released by the vendor roughly one month later, but it turned out that the security hole was actually fixed by mistake in April, when D-Link released version 2.06b01 of the firmware to address a weakness exploited by the Cr1ptT0r ransomware to infect D-Link NAS devices.
The flaw is tracked as CVE-2019-16057 and CyStack assigned it a CVSS score of 10. It affects D-Link DNS-320 devices with firmware version 2.05b10 and earlier.
CyStack's Nguyen Dang told SecurityWeek that the vulnerability can be exploited directly from the internet and he says there are currently at least 800 vulnerable devices that can be attacked from the web. Nguyen pointed out that all D-Link DNS-320 devices were vulnerable to attacks before the issue was patched in April.
The vulnerability has been described as a command injection issue present in the login module for the administration interface of the DNS-320.
CyStack Report: https://blog.cystack.net/d-link-dns-320-rce/
CyStack Security discovered a remote code execution vulnerability in the D-Link DNS-320 ShareCenter device which its version is lower or equal 2.05.B10 . By exploiting the vulnerability, a remote, unauthenticated attacker can access to all application commands with root permission. This device is a popular network storage device and interestingly, in the past, it was also reported that it contains a backdoor itself.
[...] D-Link team released a patch for this issue on 11/04/2019 [(April 11, 2019. --Ed.)]. According to their release notes, the patch is for login_mgr.cgi allows attackers pipe commands to the user.log. I don't know exactly what issue they found related to the flaw I'm addressing in this article, but the patch worked. They fixed it by type casting parameter port to Integer.
(Score: 0) by Anonymous Coward on Thursday September 26 2019, @01:17AM
Also, defense in depth already.
Seriously, why run the stock firmware from D-Link, when it is trivial to flash those devices with Alt-f https://sites.google.com/site/altfirmware/ [google.com] https://sourceforge.net/projects/alt-f/ [sourceforge.net] ?
There is so much you can do with with Alt-f instead of the stock firmware. Obviously the aftermarket firmware won't be free of any vulnerabilities, but for the trade-off of extra features that Alt-f has, it's worth it. Inspect the source if you must, although we all know that all those "800" devices/people certainly won't be doing that, and it's highly doubtful they would even know/care to upgrade the stock firmware.
I am by no means stating that it's a good idea to expose these devices directly to the Internet. However, with Alt-f you can run a local firewall on it, or if you don't trust that layer, just remove the default gateway, and/or block it at your perimeter firewall if it doesn't need external connectivity to the internet, ingress or egress. Alt-f gives you the extra tools you need to lock down and secure the device to a reasonable/acceptable level to mitigate risks like that which are described by the exploited vulnerability.
I'm actually surprised that D-Link even bothered to release a firmware update for a device which is EOL, so I'd take my chances with the aftermarket firmware, which granted is also dated, but so are all these hardware models anyway.