A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.
The use of predictable seeds significantly reduces the number of possible seeds that an attacker would need to test in order to predict which random numbers will be generated by the PRNG.
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
CVE: CVE-2020-7010
Cloud application on Kubernetes generates passwords using a weak random number generator based on deployment time.
CVE: CVE-2019-11495
server uses erlang:now() to seed the PRNG, which results in a small search space for potential random seeds
CVE: CVE-2008-0166
The removal of a couple lines of code caused Debian's OpenSSL Package to only use the current process ID for seeding a PRNG
CVE: CVE-2016-10180
Router's PIN generation is based on rand(time(0)) seeding.
CVE: CVE-2018-9057
cloud provider product uses a non-cryptographically secure PRNG and seeds it with the current time
N/A
N/A
Phase | Note |
---|---|
Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
Intro: Both of these examples use a statistical PRNG seeded with the current value of the system clock to generate a random number:
Body: An attacker can easily predict the seed used by these PRNGs, and so also predict the stream of random numbers generated. Note these examples also exhibit CWE-338 (Use of Cryptographically Weak PRNG).
Random random = new Random(System.currentTimeMillis()); int accountID = random.nextInt();