Home > CAPEC List > CAPEC-59: Session Credential Falsification through Prediction (Version 2.11)  

CAPEC-59: Session Credential Falsification through Prediction

 
Session Credential Falsification through Prediction
Definition in a New Window Definition in a New Window
Attack Pattern ID: 59
Abstraction: Detailed
Status: Draft
Completeness: Complete
Presentation Filter:
+ Summary

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.

+ Attack Steps
Explore
  1. Find Session IDs: The attacker interacts with the target host and finds that session IDs are used to authenticate users.

    An attacker makes many anonymous connections and records the session IDs assigned.

    An attacker makes authorized connections and records the session tokens or credentials issued.

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

    Cryptanalysis. The attacker uses cryptanalysis to determine if the session IDs contain any cryptographic protections.

    Pattern tests. The attacker looks for patterns (odd/even, repetition, multiples, or other arithmetic relationships) between IDs

    Comparison against time. The attacker plots or compares the issued IDs to the time they were issued to check for correlation.

Experiment
  1. Match issued IDs: The attacker brute forces different values of session ID and manages to predict a valid session ID.

    The attacker models the session ID algorithm enough to produce a compatible session IDs, or just one match.

Exploit
  1. Use matched Session ID: The attacker uses the falsified session ID to access the target system.

    The attacker loads the session ID into his web browser and browses to restricted data or functionality.

    The attacker loads the session ID into his network communications and impersonates a legitimate user to gain access to data or functionality.

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

+ Typical Severity

High

+ Typical Likelihood of Exploit

Likelihood: High

+ Methods of Attack
  • Spoofing
  • Brute Force
  • Analysis
+ Examples-Instances

Description

Jetty before 4.2.27, 5.1 before 5.1.12, 6.0 before 6.0.2, and 6.1 before 6.1.0pre3 generates predictable session identifiers using java.util.random, which makes it easier for remote attackers to guess a session identifier through brute force attacks, bypass authentication requirements, and possibly conduct cross-site request forgery attacks.

Related Vulnerabilities

Description

mod_usertrack in Apache 1.3.11 through 1.3.20 generates session ID's using predictable information including host IP address, system time and server process ID, which allows local users to obtain session ID's and bypass authentication when these session ID's are used for authentication.

Related Vulnerabilities

+ Attacker Skills or Knowledge Required

Skill or Knowledge Level: Low

There are tools to brute force session ID. Those tools require a low level of knowledge.

Skill or Knowledge Level: Medium

Predicting Session ID may require more computation work which uses advanced analysis such as statistical analysis.

+ Probing Techniques

The attacker can perform analysis of the randomness of the session generation algorithm.

The attacker may need to steal a few valid session IDs using a different type of attack. And then use those session ID to predict the following ones.

The attacker can use brute force tools to find a valid session ID.

+ Solutions and 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.

+ Attack Motivation-Consequences
ScopeTechnical ImpactNote
Confidentiality
Access_Control
Authorization
Gain privileges / assume identity
+ Purposes
  • Penetration
+ CIA Impact
Confidentiality Impact: HighIntegrity Impact: HighAvailability Impact: Low
+ Technical Context
Architectural Paradigms
Client-Server
Frameworks
J2EE
.NET
Platforms
All
Languages
All
+ References
[R.59.1] [REF-2] G. Hoglund and G. McGraw. "Exploiting Software: How to Break Code". Addison-Wesley. February 2004.
+ Content History
Submissions
SubmitterOrganizationDateSource
CAPEC Content TeamThe MITRE Corporation2014-06-23Internal_CAPEC_Team
Modifications
ModifierOrganizationDateCommentsSource
CAPEC Content TeamThe MITRE Corporation2017-08-04Updated Related_Attack_PatternsInternal

More information is available — Please select a different filter.
Page Last Updated or Reviewed: July 31, 2017