Home > CAPEC List > CAPEC-21: Exploitation of Trusted Credentials (Version 2.11)  

CAPEC-21: Exploitation of Trusted Credentials

Exploitation of Trusted Credentials
Definition in a New Window Definition in a New Window
Attack Pattern ID: 21
Abstraction: Meta
Status: Draft
Completeness: Complete
Presentation Filter:
+ Summary

Attacks on session IDs and resource IDs take advantage of the fact that some software accepts user input without verifying its authenticity. For example, a message queuing system that allows service requesters to post messages to its queue through an open channel (such as anonymous FTP), authorization is done through checking group or role membership contained in the posted message. However, there is no proof that the message itself, the information in the message (such group or role membership), or indeed the process that wrote the message to the queue are authentic and authorized to do so.

Many server side processes are vulnerable to these attacks because the server to server communications have not been analyzed from a security perspective or the processes "trust" other systems because they are behind a firewall. In a similar way servers that use easy to guess or spoofable schemes for representing digital identity can also be vulnerable. Such systems frequently use schemes without cryptography and digital signatures (or with broken cryptography). Session IDs may be guessed due to insufficient randomness, poor protection (passed in the clear), lack of integrity (unsigned), or improperly correlation with access control policy enforcement points.

Exposed configuration and properties files that contain system passwords, database connection strings, and such may also give an attacker an edge to identify these identifiers.

The net result is that spoofing and impersonation is possible leading to an attacker's ability to break authentication, authorization, and audit controls on the system.

+ Attack Steps
  1. Survey the application for Indicators of Susceptibility: Using a variety of methods, until one is found that applies to the target system. the attacker probes for credentials, session tokens, or entry points that bypass credentials altogether.

    Spider all available pages

    Attack known bad interfaces

  1. Fetch samples: An attacker fetches many samples of a session ID. This may be through legitimate access (logging in, legitimate connections, etc) or just systematic probing.

    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.

    An attacker gains access to (legitimately or illegitimately) a nearby system (e.g., in the same operations network, DMZ, or local network) and makes a connections from it, attempting to gain the same privileges as a trusted system.

  1. Impersonate: An attacker can use successful experiments to impersonate an authorized user or system

  2. Spoofing: Bad data can be injected into the system by an attacker.

+ Attack Prerequisites
  • Server software must rely on weak session IDs proof and/or verification schemes

+ Typical Severity


+ Typical Likelihood of Exploit

Likelihood: High

+ Methods of Attack
  • Spoofing
  • API Abuse
  • Injection
+ Examples-Instances


Thin client applications like web applications are particularly vulnerable to session ID attacks. Since the server has very little control over the client, but still must track sessions, data, and objects on the server side, cookies and other mechanisms have been used to pass the key to the session data between the client and server. When these session keys are compromised it is trivial for an attacker to impersonate a user's session in effect, have the same capabilities as the authorized user. There are two main ways for an attacker to exploit session IDs.

A brute force attack involves an attacker repeatedly attempting to query the system with a spoofed session header in the HTTP request. A web server that uses a short session ID can be easily spoofed by trying many possible combinations so the parameters session-ID= 1234 has few possible combinations, and an attacker can retry several hundred or thousand request with little to no issue on their side.

The second method is interception, where a tool such as wireshark is used to sniff the wire and pull off any unprotected session identifiers. The attacker can then use these variables and access the application.

+ Attacker Skills or Knowledge Required

Skill or Knowledge Level: Low

To achieve a direct connection with the weak or non-existent server session access control, and pose as an authorized user

+ Resources Required

Ability to deploy software on network. Ability to communicate synchronously or asynchronously with server

+ Solutions and Mitigations

Design: utilize strong federated identity such as SAML to encrypt and sign identity tokens in transit.

Implementation: Use industry standards session key generation mechanisms that utilize high amount of entropy to generate the session key. Many standard web and application servers will perform this task on your behalf.

Implementation: If the session identifier is used for authentication, such as in the so-called single sign on use cases, then ensure that it is protected at the same level of assurance as authentication tokens.

Implementation: If the web or application server supports it, then encrypting and/or signing the session ID (such as cookie) can protect the ID if intercepted.

Design: Use strong session identifiers that are protected in transit and at rest.

Implementation: Utilize a session timeout for all sessions, for example 20 minutes. If the user does not explicitly logout, the server terminates their session after this period of inactivity. If the user logs back in then a new session key is generated.

Implementation: Verify of authenticity of all session IDs at runtime.

+ Attack Motivation-Consequences
ScopeTechnical ImpactNote
Gain privileges / assume identity
Read application data
Modify application data
+ Injection Vector

Malicious input delivered through standard service calls, e.g. FTP or posting a message to a message queue.

+ Payload

Varies with instantiation of attack pattern. The main goal is so spoof or impersonate a legitimate user.

+ Activation Zone

Client machine and client network (e.g. Intranet)

+ Payload Activation Impact

Enables attacker to impersonate another user and access commands and data (and log behavior to audit logs) on their behalf.

+ Purposes
  • Penetration
+ CIA Impact
Confidentiality Impact: HighIntegrity Impact: HighAvailability Impact: Low
+ Technical Context
Architectural Paradigms
+ References
[R.21.1] [REF-2] G. Hoglund and G. McGraw. "Exploiting Software: How to Break Code". Addison-Wesley. February 2004.
+ Content History
CAPEC Content TeamThe MITRE Corporation2014-06-23Internal_CAPEC_Team
CAPEC Content TeamThe MITRE Corporation2015-11-09Updated Related_Attack_PatternsInternal
Previous Entry Names
DatePrevious Entry Name
2015-11-09Exploitation of Session Variables, Resource IDs and other Trusted Credentials

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