CAPEC-21: Exploitation of Trusted Identifiers
Description
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.
- Likelihood of attack
- High
- Typical severity
- High
- Abstraction
- MetaA decidedly abstract characterisation of a methodology or technique.
Mechanism of attack: Subvert Access Control
Prerequisites
- Server software must rely on weak identifier proof and/or verification schemes.
- Identifiers must have long lifetimes and potential for reusability.
- Server software must allow concurrent sessions to exist.
Skills required
- LowTo achieve a direct connection with the weak or non-existent server session access control, and pose as an authorized user
Consequences
- ConfidentialityAccess ControlAuthentication
Gain Privileges
- Confidentiality
Read Data
- Integrity
Modify Data
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 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 identifier (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 authenticity of all identifiers at runtime.
Related weaknesses (CWE)
- CWE-6J2EE Misconfiguration: Insufficient Session-ID Length
- CWE-290Authentication Bypass by Spoofing
- CWE-302Authentication Bypass by Assumed-Immutable Data
- CWE-346Origin Validation Error
- CWE-384Session Fixation
- CWE-539Use of Persistent Cookies Containing Sensitive Information
- CWE-602Client-Side Enforcement of Server-Side Security
- CWE-642External Control of Critical State Data
- CWE-664Improper Control of a Resource Through its Lifetime
ATT&CK techniques (CAPEC taxonomy mapping)
Across MITRE's defensive frameworks
Linked through the 3 ATT&CK techniques above.
Counter with D3FEND
Defensive techniques MITRE D3FEND maps to the same ATT&CK techniques.
- D3-ANCIAuthentication Cache Invalidation3 shared
- D3-CCSACredential Compromise Scope Analysis3 shared
- D3-CHCredential Hardening3 shared
- D3-CRCredential Revocation3 shared
- D3-CROCredential Rotation3 shared
- D3-CTSCredential Transmission Scoping3 shared
- D3-DUCDecoy User Credential3 shared
- D3-MFAMulti-factor Authentication3 shared
- D3-RICReissue Credential3 shared
- D3-TBAToken-based Authentication2 shared
- D3-TBToken Binding2 shared
- D3-STSession Termination1 shared