CAPECattack pattern

CAPEC-59 Session Credential Falsification through Prediction

High Official page ↗
Abstraction
Detailed
Status
Draft
Likelihood of attack
High
Typical severity
High
CAPEC version
3.9

Description

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.

Execution flow

1. [Explore] [Find Session IDs] The attacker interacts with the target host and finds that session IDs are used to authenticate users. 2. [Explore] [Characterize IDs] The attacker studies the characteristics of the session ID (size, format, etc.). As a results the attacker finds that legitimate session IDs are predictable. 3. [Experiment] [Match issued IDs] The attacker brute forces different values of session ID and manages to predict a valid session ID. 4. [Exploit] [Use matched Session ID] The attacker uses the falsified session ID to access the target system.

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

Skills required

• [Low] There are tools to brute force session ID. Those tools require a low level of knowledge. • [Medium] Predicting Session ID may require more computation work which uses advanced analysis such as statistical analysis.

Consequences

• Confidentiality, Access Control, Authorization: Gain Privileges

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.

Related

Child of · CAPEC (1)

  • CAPEC-196 Session Credential Falsification through Forging attack pattern

Weakness · CWE (11)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness
  • CWE-285 Improper Authorization weakness
  • CWE-290 Authentication Bypass by Spoofing weakness
  • CWE-330 Use of Insufficiently Random Values weakness
  • CWE-331 Insufficient Entropy weakness
  • CWE-346 Origin Validation Error weakness
  • CWE-384 Session Fixation weakness
  • CWE-488 Exposure of Data Element to Wrong Session weakness
  • CWE-539 Use of Persistent Cookies Containing Sensitive Information weakness
  • CWE-6 J2EE Misconfiguration: Insufficient Session-ID Length weakness
  • CWE-693 Protection Mechanism Failure weakness

Referenced by CWE · attack pattern (11)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness
  • CWE-285 Improper Authorization weakness
  • CWE-290 Authentication Bypass by Spoofing weakness
  • CWE-330 Use of Insufficiently Random Values weakness
  • CWE-331 Insufficient Entropy weakness
  • CWE-346 Origin Validation Error weakness
  • CWE-384 Session Fixation weakness
  • CWE-488 Exposure of Data Element to Wrong Session weakness
  • CWE-539 Use of Persistent Cookies Containing Sensitive Information weakness
  • CWE-6 J2EE Misconfiguration: Insufficient Session-ID Length weakness
  • CWE-693 Protection Mechanism Failure weakness