Principle of XSS

Source: Internet
Author: User

The cross-site scripting Attack (Cross-site Scripting) is a security vulnerability of a Web site application and is one of the code injection attacks. Types of XSS: Reflective XSS:
    • Non-persistent XSS (requires self-triggering, input-output). It is "reflected" from the target server by means of error messages, search results, and so on.
    • Non-persistent: This type of attack is often only one-time.
    • Way: The attacker sends a malicious link containing the injected script to the victim by mail, and the victim clicks on the link, the injected script is routed to the target server, and the server "bounces" the script into the victim's browser to execute the script on that browser.
    • Eg:http://www.baidu.com?input=<script>alert (Document.cookie) </script>
Storage-Type XSS:
    • Persistent XSS (input-Save to database-output)
    • By entering the script to the database, when others see the content, it will be malicious attacks, the victim's information or other, sent to the attacker's server.
DOM-XSS:
    • dom-based XSS Vulnerability is a vulnerability to the Document object model, which involves two levels, HTML layers, and JavaScript layers, more precisely server scripts and client script.
    • The user requested a URL that was designed by the attacker, which contained embedded JavaScript, and the attacker could use a script to obtain a user cookie
Fishing:
    • Scam users enter sensitive information to send sensitive information such as user name, password, etc. to the attacker.
Cross-site Request forgery:
    • Cross-siterequest forgery CSRF, which is a derivative of XSS, is the way that the script forges the victim to send a legitimate request
Inject malicious software:
    • With XSS attacks, attackers can introduce malicious software into scripts such as "viruses", "Trojans", "worms" and so on,
How to deal with the above attacks:
    • For reflective XSS as well as some Dom XSS, the general recommendation is to develop some automated tools for scanning, supplemented by manual analysis, on the other hand can be found using search engines, the specific white hat.
    • For storage types: Many are initiated using the Rich Text editor, so it is recommended to use ANTIXSS similar class libraries for input filtering.

Comprehensive network technical articles, if there are errors, please correct me, thank you very much!

Principle of XSS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.