Researchers from Claroty’s Team82 discovered a vulnerability, tracked as CVE-2023-2729 (CVSS score 5.9), in Synology DiskStation Manager (DSM).
Team82 discovered the use of a weak random number generator in Synology’s DiskStation Manager (DSM) Linux-based operating system running on the NAS products.
“Under some rare conditions, an attacker could leak enough information to restore the seed of the pseudorandom number generator (PRNG), reconstruct the admin password, and remotely take over the admin account.” reads the advisory published by the company.
By observing the output of a few Math.Random() generated numbers, the researchers reconstructed the seed for the PRNG and used it to brute-force the admin password. Then they used the password to login to the admin account (after enabling it).
The vendor addressed the vulnerability with the release of updates in June 2023.
“To execute the attack, some Math.Random values need to be leaked. One possible way to achieve this is by leaking some GUIDs (e.g. 72e14742-b0e5-4826-b7c9-eb16284fe9cd) that are also being generated using Math.Random at the first installation wizard, which means they are based on the same PRNG seed as the admin user-account password.” continues the report.
In a real-life scenario, threat actors first need to leak the GUIDs, conduct a brute-force attack on the Math.Random state, and retrieve the admin password. The researchers noticed that tven after doing so, by default the builtin admin user account is disabled and most users won’t enable it.
“it’s important to remember that Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the window.crypto.getRandomValues() method.” concludes the report. “We disclosed CVE-2023-2729 to Synology, which changed the vulnerable algorithm and has pushed the fix to affected devices. DSM 7.2 is affected by the vulnerability and users are asked to upgrade to 7.2-64561 or above.”
(SecurityAffairs – hacking, Synology DiskStation Manager)