Name |
Session Credential Falsification through Forging |
|
Likelyhood of attack |
Typical severity |
Medium |
Medium |
|
Summary |
An attacker creates a false but functional session credential in order to gain or usurp access to a service. Session credentials allow users to identify themselves to a service after an initial authentication without needing to resend the authentication information (usually a username and password) with every message. If an attacker is able to forge valid session credentials they may be able to bypass authentication or piggy-back off some other authenticated user's session. This attack differs from Reuse of Session IDs and Session Sidejacking attacks in that in the latter attacks an attacker uses a previous or existing credential without modification while, in a forging attack, the attacker must create their own credential, although it may be based on previously observed credentials. |
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. |
Execution Flow |
Step |
Phase |
Description |
Techniques |
1 |
Explore |
[Analyze and Understand Session IDs] The attacker finds that the targeted application use session credentials to identify legitimate users. |
- 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. |
- 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. |
- 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.
|
|
Solutions | 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
|
Description
|
CWE-384 |
Session Fixation |
CWE-664 |
Improper Control of a Resource Through its Lifetime |
|
Related CAPECS |
CAPEC ID
|
Description
|
CAPEC-21 |
An adversary guesses, obtains, or "rides" a trusted identifier (e.g. session ID, resource ID, cookie, etc.) to perform authorized actions under the guise of an authenticated user or service. |
CAPEC-61 |
The attacker induces a client to establish a session with the target software using a session identifier provided by the attacker. Once the user successfully authenticates to the target software, the attacker uses the (now privileged) session identifier in their own transactions. This attack leverages the fact that the target software either relies on client-generated session identifiers or maintains the same session identifiers after privilege elevation. |
CAPEC-384 |
An attacker manipulates either egress or ingress data from a client within an application framework in order to change the content of messages. Performing this attack can allow the attacker to gain unauthorized privileges within the application, or conduct attacks such as phishing, deceptive strategies to spread malware, or traditional web-application attacks. The techniques require use of specialized software that allow the attacker to perform adversary-in-the-middle (CAPEC-94) communications between the web browser and the remote system. Despite the use of AiTH software, the attack is actually directed at the server, as the client is one node in a series of content brokers that pass information along to the application framework. Additionally, it is not true "Adversary-in-the-Middle" attack at the network layer, but an application-layer attack the root cause of which is the master applications trust in the integrity of code supplied by the client. |
|
Taxonomy: ATTACK |
Entry ID
|
Entry Name
|
1134.002 |
Access Token Manipulation: Create Process with Token |
1134.003 |
Access Token Manipulation: Make and Impersonate Token |
1606 |
Forge Web Credentials |
|