CAPECattack pattern

CAPEC-196 Session Credential Falsification through Forging

Medium Official page ↗
Abstraction
Standard
Status
Draft
Likelihood of attack
Medium
Typical severity
Medium
CAPEC version
3.9

Description

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.

Execution flow

1. [Explore] [Analyze and Understand Session IDs] The attacker finds that the targeted application use session credentials to identify legitimate users. 2. [Experiment] [Create Session IDs.] Attackers craft messages containing their forged credentials in GET, POST request, HTTP headers 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.

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

• [Medium] Forge the session credential and reply the request.

Consequences

• Integrity: Modify Data • Confidentiality: Read Data • Authorization: Execute Unauthorized Commands • Accountability, Authentication, Authorization, Non-Repudiation: Gain Privileges • Access Control, Authorization: Bypass Protection Mechanism

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

Att&ck technique · MITRE ATT&CK (3)

  • T1606 Forge Web Credentials technique
  • T1134.002 Create Process with Token sub-technique
  • T1134.003 Make and Impersonate Token sub-technique

Can precede · CAPEC (2)

  • CAPEC-384 Application API Message Manipulation via Man-in-the-Middle attack pattern
  • CAPEC-61 Session Fixation attack pattern

Child of · CAPEC (1)

  • CAPEC-21 Exploitation of Trusted Identifiers attack pattern

Weakness · CWE (2)

  • CWE-384 Session Fixation weakness
  • CWE-664 Improper Control of a Resource Through its Lifetime weakness

Referenced by CAPEC · child of (2)

  • CAPEC-226 Session Credential Falsification through Manipulation attack pattern
  • CAPEC-59 Session Credential Falsification through Prediction attack pattern

Referenced by CWE · attack pattern (2)

  • CWE-384 Session Fixation weakness
  • CWE-664 Improper Control of a Resource Through its Lifetime weakness