Mandar Satam

#608of 53,632
302.5Total CVSS
Vulnerabilities · 39
Low
1
Medium
13
High
20
Critical
5
PT-2019-8639
8.3
2019-07-02
D Link · D-Link Dcs-1130 · CVE-2017-8416
**Name of the Vulnerable Software and Affected Versions** D-Link DCS-1100 D-Link DCS-1130 **Description** An issue was discovered in D-Link devices, where a custom daemon runs on UDP port 5978, handling a custom D-Link UDP-based protocol. This protocol allows D-Link mobile and desktop applications to discover devices on the local network. The binary processes received UDP packets in the `main` function, which contains a block of code that performs an unbounded copy operation, allowing a buffer overflow. The custom protocol follows a specific pattern, including `Packetlen`, `Type of packet`, `M` for MAC address, `D` for device type, `C` for base64 encoded command string, and `test`. The insecure copy operation using the `strcpy` function at address `0x0000DC88` results in overflowing the stack pointer after 1060 characters, allowing control of the PC register and resulting in code execution. A third-party application on the device can execute commands without authentication by sending a single UDP packet with custom base64 encoding. **Recommendations** For D-Link DCS-1100 and D-Link DCS-1130 devices, consider disabling the `dldps2121` daemon on UDP port 5978 as a temporary workaround until a patch is available. Restrict access to the custom D-Link UDP-based protocol to minimize the risk of exploitation. Avoid using the custom protocol to send UDP packets with base64 encoded command strings until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.