结构: Simple
Abstraction: Variant
状态: Draft
被利用可能性: unkown
A Pseudo-Random Number Generator (PRNG) uses the same seed each time the product is initialized.
If an attacker can guess (or knows) the seed, then the attacker may be able to determine the random numbers that will be produced from the PRNG.
cwe_Nature: ChildOf cwe_CWE_ID: 335 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 335 cwe_View_ID: 699 cwe_Ordinal: Primary
Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
['Other', 'Access Control'] | ['Other', 'Bypass Protection Mechanism'] |
策略:
Do not reuse PRNG seeds. Consider a PRNG that periodically re-seeds itself as needed from a high quality pseudo-random output, such as hardware devices.
策略: Libraries or Frameworks
Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").
The following code uses a statistical PRNG to generate account IDs.
bad Java
Because the program uses the same seed value for every invocation of the PRNG, its values are predictable, making the system vulnerable to attack.
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
PLOVER | Same Seed in PRNG | ||
The CERT Oracle Secure Coding Standard for Java (2011) | MSC02-J | Generate strong random numbers |