CAPEC Definitions / CAPEC-59
CAPEC-59: Session Credential Falsification through Prediction
This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.
Extended Description
No Extended Description.
Mitigations
Use a strong source of randomness to generate a session ID.
Use adequate length session IDs
Do not use information available to the user in order to generate session ID (e.g., time).
Ideas for creating random numbers are offered by Eastlake [RFC1750]
Encrypt the session ID if you expose it to the user. For instance session ID can be stored in a cookie in encrypted format.
Relationships with other CAPECs
CAPEC-196: Session Credential Falsification through Forging
Prerequisites
The target host uses session IDs to keep track of the users.
Session IDs are used to control access to resources.
The session IDs used by the target host are predictable. For example, the session IDs are generated using predictable information (e.g., time).
Related Weaknesses
CWE-290: Authentication Bypass by Spoofing
CWE-330: Use of Insufficiently Random Values
CWE-331: Insufficient Entropy
CWE-346: Origin Validation Error
CWE-488: Exposure of Data Element to Wrong Session
CWE-539: Use of Persistent Cookies Containing Sensitive Information
CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
CWE-6: J2EE Misconfiguration: Insufficient Session-ID Length
CWE-285: Improper Authorization
CWE-384: Session Fixation
CWE-693: Protection Mechanism Failure
