CAPEC

Common Attack Pattern Enumeration and Classification
Common Attack Pattern Enumeration and Classification

A Community Knowledge Resource for Building Secure Software

Home > CAPEC List > Individual CAPEC Dictionary Definition (Release 1.1)   View the CAPEC List

Individual CAPEC Dictionary Definition (Release 1.1)
Individual CAPEC Dictionary Definition (Release 1.1)

Reusing Session IDs (aka Session Replay)
Attack Pattern ID
Pattern Abstraction: Standard

60

Typical Severity

High

Description

Summary

This attack targets the reuse of valid session ID to spoof the target system in order to gain privileges. The attacker tries to reuse a stolen session ID used previously during a transaction to perform spoofing and session hijacking. Another name for this type of attack is Session Replay.

Attack Execution Flow

  1. The attacker interacts with the target host and finds that session IDs are used to authenticate users.

  2. The attacker steals a session ID from a valid user.

  3. The attacker tries to use the stolen session ID to gain access to the system with the priviledges of the session ID's original owner.

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 not well protected from session theft.

Typical Likelihood of Exploit

High

Methods of Attack
  • Spoofing
  • Social Engineering
  • Analysis
Examples-Instances

Description

OpenSSL and SSLeay allow remote attackers to reuse SSL sessions and bypass access controls.

Related Vulnerability

CVE-1999-0428

Description

Merak Mail IceWarp Web Mail uses a static identifier as a user session ID that does not change across sessions, which could allow remote attackers with access to the ID to gain privileges as that user, e.g. by extracting the ID from the user's answer or forward URLs.

Related Vulnerability

CVE-2002-0258

Attacker Skill or Knowledge Required

Low: If an attacker can steal a valid session ID, he can then try to be authenticated with that stolen session ID. Medium/High: More sophisticated attack can be used to hijack a valid session from a user and spoof a ligitimate user by reusing his valid session ID.

Probing Techniques

The attacker can listen to a conversation between the client and server and steal a valid session ID.

The attacker can try to steal session information from the user's coookies.

The attacker can try a valid session from a finished transaction and find out that the transaction associated with the session ID did not time out.

Solutions and Mitigations

Always invalidate a session ID after the user logout.

Setup a session time out for the session IDs.

Protect the communication between the client and server. For instance it is best practice to use SSL to mitigate man in the middle attack.

Do not code send session ID with GET method, otherwise the session ID will be copied to the URL. In general avoid writing session IDs in the URLs. URLs can get logged in log files, which are vulnerable to an attacker.

Encrypt the session data associated with the session ID.

Use multifactor authentication.

Attack Motivation-Consequences
  • Privilege Escalation
Context Description

Related Weaknesses
CWE-IDWeakness NameWeakness Relationship Type
294Authentication Bypass by Capture-replayTargeted
290Authentication Bypass by SpoofingTargeted
346Origin Validation ErrorTargeted
384Session FixationTargeted
488Data Leak Between SessionsSecondary
539Information Leak Through Persistent CookiesSecondary
200Information Leak (Information Disclosure)Secondary
285Missing or Inconsistent Access ControlSecondary
Related Attack Patterns
IDNameRelationship TypeRelationship Description
21Exploitation of Session Variables, Resource IDs and other Trusted CredentialsMore Detailed
Related Security Principles
  • Securing the Weakest Link
Purpose

Penetration

CIA Impact
Confidentiality ImpactIntegrity ImpactAvailability Impact
HighHighLow
Technical Context
Architectural ParadigmFrameworkPlatformLanguage
Client-ServerJ2EEAllAll
References

G. Hoglund and G. McGraw. Exploiting Software: How to Break Code. Addison-Wesley, February 2004.

Source
Submission(s)
SubmitterOrganizationDateComment
Eric DalciCigital, Inc2007-01-25
Modification(s)
ModifierOrganizationDateComment
Sean BarnumCigital, Inc2007-03-07Review and revise
Richard StruseVOXEM, Inc2007-03-26Review and feedback leading to changes in Name and Related Attack Patterns
Sean BarnumCigital, Inc2007-04-13Modified pattern content according to review and feedback
 
Page Last Updated: April 18, 2008