CAPEC Definitions

    CAPEC Definitions / CAPEC-31

    CAPEC-31: Accessing/Intercepting/Modifying HTTP Cookies

    This attack relies on the use of HTTP Cookies to store credentials, state information and other critical data on client systems. There are several different forms of this attack. The first form of this attack involves accessing HTTP Cookies to mine for potentially sensitive data contained therein. The second form involves intercepting this data as it is transmitted from client to server. This intercepted information is then used by the adversary to impersonate the remote user/session. The third form is when the cookie's content is modified by the adversary before it is sent back to the server. Here the adversary seeks to convince the target server to operate on this falsified information.

    Severity:High
    Possibility:High

    Extended Description

    No Extended Description.

    Mitigations

    Design: Use input validation for cookies

    Design: Generate and validate MAC for cookies

    Implementation: Use SSL/TLS to protect cookie in transit

    Implementation: Ensure the web server implements all relevant security patches, many exploitable buffer overflows are fixed in patches issued for the software.

    Relationships with other CAPECs

    CAPEC-39: Manipulating Opaque Client-based Data Tokens

    CAPEC-157: Sniffing Attacks

    Prerequisites

    Target server software must be a HTTP daemon that relies on cookies.

    The cookies must contain sensitive information.

    The adversary must be able to make HTTP requests to the server, and the cookie must be contained in the reply.

    Related Weaknesses

    CWE-565: Reliance on Cookies without Validation and Integrity Checking

    CWE-302: Authentication Bypass by Assumed-Immutable Data

    CWE-311: Missing Encryption of Sensitive Data

    CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')

    CWE-539: Use of Persistent Cookies Containing Sensitive Information

    CWE-20: Improper Input Validation

    CWE-315: Cleartext Storage of Sensitive Information in a Cookie

    CWE-384: Session Fixation

    CWE-472: External Control of Assumed-Immutable Web Parameter

    CWE-602: Client-Side Enforcement of Server-Side Security

    CWE-642: External Control of Critical State Data