zoukankan      html  css  js  c++  java
  • Cross-site scripting(XSS)

    https://en.wikipedia.org/wiki/Cross-site_scripting

    Definition

    Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications.

    XSS enables attackers to inject client-side scripts into web pages viewed by other users.

    A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy.

    Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007.[1]

    Bug bounty company HackerOne in 2017 reported that XSS is still a major threat vector.[2]

    XSS effects vary in range from petty nuisance to significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner.

    Types

    There is no single, standardized classification of cross-site scripting flaws, but most experts distinguish between at least two primary flavors of XSS flaws: non-persistent and persistent.

    Some sources further divide these two groups into traditional (caused by server-side code flaws) and DOM-based (in client-side code). 

    Non-persistent (reflected)

    The non-persistent (or reflected) cross-site scripting vulnerability is by far the most basic type of web vulnerability.[13] These holes show up when the data provided by a web client, most commonly in HTTP query parameters (e.g. HTML form submission), is used immediately by server-side scripts to parse and display a page of results for and to that user, without properly sanitizing the content.[14]

    Because HTML documents have a flat, serial structure that mixes control statements, formatting, and the actual content, any non-validated user-supplied data included in the resulting page without proper HTML encoding, may lead to markup injection.[13][14] A classic example of a potential vector is a site search engine: if one searches for a string, the search string will typically be redisplayed verbatim on the result page to indicate what was searched for. If this response does not properly escape or reject HTML control characters, a cross-site scripting flaw will ensue.[15]

    A reflected attack is typically delivered via email or a neutral web site. The bait is an innocent-looking URL, pointing to a trusted site but containing the XSS vector. If the trusted site is vulnerable to the vector, clicking the link can cause the victim's browser to execute the injected script. 

     

    Persistent (or stored)

    Server-side versus DOM-based vulnerabilities

    Self-XSS

    Mutated XSS (mXSS)

    Example

    https://www.owasp.org/images/2/22/20110412-aspnet_viewstate_security-alexandre.pdf

  • 相关阅读:
    HDU 3835 R(N)
    HDU 2498 Digits
    HUST 1027 Enemy Target!
    【POJ 3714】 Raid
    【POJ 2965】 The Pilots Brothers' refrigerator
    【POJ 2054】 Color a Tree
    【POJ 1328】 Radar Installation
    【POJ 3190】 Stall Reservations
    【POJ 3614】 Sunscreen
    【BZOJ 3032】 七夕祭
  • 原文地址:https://www.cnblogs.com/chucklu/p/10058574.html
Copyright © 2011-2022 走看看