Execution Flow
1) Explore
[Analyze and Understand Session IDs] The attacker finds that the targeted application use session credentials to identify legitimate users.
Technique
- An attacker makes many anonymous connections and records the session IDs.
- An attacker makes authorized connections and records the session tokens or credentials.
2) Experiment
[Create Session IDs.] Attackers craft messages containing their forged credentials in GET, POST request, HTTP headers or cookies.
Technique
- The attacker manipulates the HTTP request message and adds their forged session IDs in to the requests or cookies.
3) Exploit
[Abuse the Victim's Session Credentials] The attacker fixates falsified session ID to the victim when victim access the system. Once the victim has achieved a higher level of privilege, possibly by logging into the application, the attacker can now take over the session using the forged session identifier.
Technique
- The attacker loads the predefined or predicted session ID into their browser and browses to protected data or functionality.
- The attacker loads the predefined or predicted session ID into their software and utilizes functionality with the rights of the victim.
Prerequisites
The targeted application must use session credentials to identify legitimate users. Session identifiers that remains unchanged when the privilege levels change. Predictable session identifiers.
Skills Required
Forge the session credential and reply the request.
Resources Required
Attackers may require tools to craft messages containing their forged credentials, and ability to send HTTP request to a web application.
Mitigations
Implementation: Use session IDs that are difficult to guess or brute-force: One way for the attackers to obtain valid session IDs is by brute-forcing or guessing them. By choosing session identifiers that are sufficiently random, brute-forcing or guessing becomes very difficult.
Implementation: Regenerate and destroy session identifiers when there is a change in the level of privilege: This ensures that even though a potential victim may have followed a link with a fixated identifier, a new one is issued when the level of privilege changes.
Related Weaknesses
CWE-ID |
Weakness Name |
|
Session Fixation Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions. |
|
Improper Control of a Resource Through its Lifetime The product does not maintain or incorrectly maintains control over a resource throughout its lifetime of creation, use, and release. |
References
REF-62
Session Riding: A Widespread Vulnerability in Today's Web Applications
Thomas Schreiber.
https://crypto.stanford.edu/cs155old/cs155-spring08/papers/Session_Riding.pdf REF-63
OWASP Testing Guide
http://www.owasp.org/index.php/Testing_for_Session_Management
Submission
Name |
Organization |
Date |
Date release |
CAPEC Content Team |
The MITRE Corporation |
2014-06-23 +00:00 |
|
Modifications
Name |
Organization |
Date |
Comment |
CAPEC Content Team |
The MITRE Corporation |
2018-07-31 +00:00 |
Updated References |
CAPEC Content Team |
The MITRE Corporation |
2019-04-04 +00:00 |
Updated Consequences, Related_Attack_Patterns, Related_Weaknesses |
CAPEC Content Team |
The MITRE Corporation |
2020-07-30 +00:00 |
Updated Execution_Flow |
CAPEC Content Team |
The MITRE Corporation |
2022-09-29 +00:00 |
Updated Example_Instances, Taxonomy_Mappings |