Cross-site Scripting - Exploit Examples

Exploit Examples

Attackers intending to exploit cross-site scripting vulnerabilities must approach each class of vulnerability differently. For each class, a specific attack vector is described here. The names below are technical terms, taken from the cast of characters commonly used in computer security.

Non-persistent:

  1. Alice often visits a particular website, which is hosted by Bob. Bob's website allows Alice to log in with a username/password pair and stores sensitive data, such as billing information.
  2. Mallory observes that Bob's website contains a reflected XSS vulnerability.
  3. Mallory crafts a URL to exploit the vulnerability, and sends Alice an email, enticing her to click on a link for the URL under false pretenses. This URL will point to Bob's website (either directly or through an iframe or ajax), but will contain Mallory's malicious code, which the website will reflect.
  4. Alice visits the URL provided by Mallory while logged into Bob's website.
  5. The malicious script embedded in the URL executes in Alice's browser, as if it came directly from Bob's server (this is the actual XSS vulnerability). The script can be used to send Alice's session cookie to Mallory. Mallory can then use the session cookie to steal sensitive information available to Alice (authentication credentials, billing info, etc.) without Alice's knowledge.

Persistent attack:

  1. Mallory posts a message with malicious payload to a social network.
  2. When Bob reads the message, Mallory's XSS steals Bob's cookie.
  3. Mallory can now hijack Bob's session and impersonate Bob.

Framework:

The Browser Exploitation Framework could be used to attack the web site and the user's local environment.

Read more about this topic:  Cross-site Scripting

Famous quotes containing the words exploit and/or examples:

    The American mood, perhaps even the American character, has changed. There are few manifestations any longer of the old American self-assurance which so irritated Dickens.... Instead, there is a sense of frustration so perceptible that even our politicians ... have attempted to exploit it.
    Archibald MacLeish (1892–1982)

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)