Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-341:Predictable from Observable State
Weakness ID:341
Version:v4.17
Weakness Name:Predictable from Observable State
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Draft
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.

▼Extended Description

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfAllowed-with-ReviewC340Generation of Predictable Numbers or Identifiers
ParentOfAllowedV339Small Seed Space in PRNG
Nature: ChildOf
Mapping: Allowed-with-Review
Type: Class
ID: 340
Name: Generation of Predictable Numbers or Identifiers
Nature: ParentOf
Mapping: Allowed
Type: Variant
ID: 339
Name: Small Seed Space in PRNG
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedV884CWE Cross-section
MemberOfProhibitedC905SFP Primary Cluster: Predictability
MemberOfProhibitedC1011Authorize Actors
MemberOfProhibitedC1213Random Number Issues
MemberOfProhibitedC1366ICS Communications: Frail Security in Protocols
MemberOfProhibitedC1414Comprehensive Categorization: Randomness
Nature: MemberOf
Mapping: Prohibited
Type:View
ID: 884
Name: CWE Cross-section
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 905
Name: SFP Primary Cluster: Predictability
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1011
Name: Authorize Actors
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1213
Name: Random Number Issues
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1366
Name: ICS Communications: Frail Security in Protocols
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1414
Name: Comprehensive Categorization: Randomness
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-278Libraries or Frameworks Strategy
MemberOfProhibitedBSBOSS-294Not Language-Specific Weaknesses
MemberOfProhibitedBSBOSS-326Varies by Context (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-278
Name: Libraries or Frameworks Strategy
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-294
Name: Not Language-Specific Weaknesses
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-326
Name: Varies by Context (impact)
▼Relevant To View
Relevant to the view"Architectural Concepts - (1008)"
NatureMappingTypeIDName
MemberOfProhibitedC1011Authorize Actors
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1011
Name: Authorize Actors
Relevant to the view"Software Development - (699)"
NatureMappingTypeIDName
MemberOfProhibitedC1213Random Number Issues
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1213
Name: Random Number Issues
Relevant to the view"SEI ETF Categories of Security Vulnerabilities in ICS - (1358)"
NatureMappingTypeIDName
MemberOfProhibitedC1366ICS Communications: Frail Security in Protocols
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1366
Name: ICS Communications: Frail Security in Protocols
Relevant to the view"Software Fault Pattern (SFP) Clusters - (888)"
NatureMappingTypeIDName
MemberOfProhibitedC905SFP Primary Cluster: Predictability
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 905
Name: SFP Primary Cluster: Predictability
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
OtherN/AVaries by Context

This weakness could be exploited by an attacker in a number ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing sensitive information, then an attacker might gain access to the system and may be able to gain access to the information in the file.

Scope: Other
Likelihood: N/A
Impact: Varies by Context
Note:

This weakness could be exploited by an attacker in a number ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing sensitive information, then an attacker might gain access to the system and may be able to gain access to the information in the file.

▼Potential Mitigations
Phase:Implementation
Mitigation ID:
Strategy:
Effectiveness:
Description:

Increase the entropy used to seed a PRNG.

Note:


Phase:Architecture and Design, Requirements
Mitigation ID: MIT-2
Strategy: Libraries or Frameworks
Effectiveness:
Description:

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").

Note:


Phase:Implementation
Mitigation ID: MIT-50
Strategy:
Effectiveness:
Description:

Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.

Note:

▼Modes Of Introduction
Phase: Architecture and Design
Note:

N/A

Phase: Implementation
Note:

REALIZATION: This weakness is caused during implementation of an architectural security tactic.

▼Applicable Platforms
Languages
Class: Not Language-Specific(Undetermined Prevalence)
▼Demonstrative Examples
Example 1

This code generates a unique random identifier for a user's session.

Language: ( code)
N/A

Language: PHP(Bad code)
function generateSessionID($userID){ srand($userID); return rand(); }

Language: ( code)
N/A

Because the seed for the PRNG is always the user's ID, the session ID will always be the same. An attacker could thus predict any user's session ID and potentially hijack the session.

Language: ( code)
N/A

This example also exhibits a Small Seed Space (CWE-339).

▼Observed Examples
ReferenceDescription
CVE-2002-0389
Mail server stores private mail messages with predictable filenames in a world-executable directory, which allows local users to read private mailing list archives.
CVE-2001-1141
PRNG allows attackers to use the output of small PRNG requests to determine the internal state information, which could be used by attackers to predict future pseudo-random numbers.
CVE-2000-0335
DNS resolver library uses predictable IDs, which allows a local attacker to spoof DNS query results.
CVE-2005-1636
MFV. predictable filename and insecure permissions allows file modification to execute SQL queries.
Reference: CVE-2002-0389
Description:
Mail server stores private mail messages with predictable filenames in a world-executable directory, which allows local users to read private mailing list archives.
Reference: CVE-2001-1141
Description:
PRNG allows attackers to use the output of small PRNG requests to determine the internal state information, which could be used by attackers to predict future pseudo-random numbers.
Reference: CVE-2000-0335
Description:
DNS resolver library uses predictable IDs, which allows a local attacker to spoof DNS query results.
Reference: CVE-2005-1636
Description:
MFV. predictable filename and insecure permissions allows file modification to execute SQL queries.
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      ▼Detection Methods
      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      Maintenance

      As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, "randomness" is used heavily. However, within cryptography, "entropy" is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.

      N/A

      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      PLOVERN/AN/APredictable from Observable State
      Taxonomy Name: PLOVER
      Entry ID: N/A
      Fit: N/A
      Entry Name: Predictable from Observable State
      ▼Related Attack Patterns
      IDName
      ▼References
      Reference ID: REF-267
      Title: SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC MODULES
      Author: Information Technology Laboratory, National Institute of Standards and Technology
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://csrc.nist.gov/csrc/media/publications/fips/140/2/final/documents/fips1402.pdf
      URL Date:2023-04-07
      Day:25
      Month:05
      Year:2001
      Reference ID: REF-44
      Title: 24 Deadly Sins of Software Security
      Author: Michael Howard, David LeBlanc, John Viega
      Section: "Sin 20: Weak Random Numbers." Page 299
      Publication:
      McGraw-Hill
      Publisher:
      Edition:
      URL:
      URL Date:
      Day:N/A
      Month:N/A
      Year:2010
      Details not found