Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X Web SECURITY-XSS more X
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Author: cyberphreak
Translation: the soul [S.S.T]
~ Introduction
In this article I will explain all about XSS and more about it. Through this document, I hope to give you an idea of what XSS is, why XSS is used, and how to use
returns it to the Web Front-end;
5. the front-end is displayed according to pre-rules, including the front-end executable code of user a with HTML tags and JS, so that user a can execute any threatening code preset by user B on the machine B.
For example, if user a modifies user remarks to , run the code on user B's page according to the preceding procedure.
For example, a hacker preinvestigates the code logic of a BBS post to display the content, and then posts a post:
After submission, it ap
I. Introduction to XSS attacksAs an HTML injection attack, the core idea of an XSS attack is to inject malicious code into an HTML page, and the injection method used by XSS is very ingenious.In an XSS attack, there are typically three roles involved: The attacker, the target server, and the victim's browser.Since some
Mainly http:// I .sohu.com/Persistent and reflective xss9Description: extended type:Http:// I .sohu.com/app/friend/#/a/search/user/search/find.do? _ Input_encode = UTF-8 nick = xsserReflected type:Http:// I .sohu.com/a/register/passport/getNicks? Callback = test Http:// I .sohu.com/a/checkpassword/checkPassword? Xpt = vn = test Http:// I .sohu.com/a/assistant/personal/get? Xpt = _ = vn = Http:// I .sohu.com/a/app/discuss/newcount.htm? Cb = "/> Http://stat. I .sohu.com/guest/count/count.do? T
There are countless discussions about how XSS is formed, how it is injected, how it can be done, and how to prevent it.
Almost every article that talks about XSS will mention how to prevent it at the end. However, most of them remain unchanged. Escape, filter, or forget something. Despite all the well-known principles, XSS
embed malicious JavaScript, for example, you can obtain the javascript: document. cookie and so on. The other is that the area that supports rich text does not filter malicious JavaScript, such as the blogArticleAttackers can obtain malicious javascript such as cookies embedded in the content.CodeThese two types of phenomena are too many. On the contrary, the rich text area will be better, for example, UBB used in most forums. In addition, everyone w
is offering shit. View the source code function, resulting in the inability to unify the In this case, I can only filter part of the look-up is a harmful HTML tags, and it is well known that such blacklist verification is not safe. /* * Cross-site scripting (XSS) is a type of computer security vulnerability * Typically found in Web applications. XSS enables at
APIs for reading data may exist in the Web application code, such as Request. queryString (), $ _ GET, etc. If these APIS exist, it indicates that XSS injection may be introduced. Through static analysis tools, we can easily find all the APIs that read data, and check whether XSS injection is filtered for each data input point in detail. As you can see, static analysis only helps us locate XSSPossible loca
Stored on the server or database, many victims are victims.
Scenario 2:
A.com can post an article. After I log on to a.com, I published an article in a.com, which contains malicious code. to save the article. At this time, Tom and Jack saw my published article. When I checked my article, they all caught up. Their cookie information was sent to my server, and the attack was successful! In this process, there are multiple victims.The Stored XSS vulner
This article is from: Gao Shuang | coder. Original article address: http://blog.csdn.net/ghsau/article/details/17027893. Please note.XSS, also known as CSS, is short for cross sitescript. It is a common vulnerability in web programs. XSS is a passive and used for client attacks, so it is easy to ignore its dangers. The principle is that attackers input (pass in) malicious HTML code to a website with the XSS
executes the script on the victim's computer.So, what is the XSS vulnerability?As a web developer or tester, you know that the technical underpinnings of Web applications are made up of HTTP and HTML. The HTTP protocol is the transport mechanism for HTML, and you can use code to design Web page layouts and build pages.If the WEB application accepts input from a user through an HTTP request, such as GET or POST, and then uses the output HTML code to d
on JavaScript and HTML tags (sometimes with a CSS-style XSS vector).There are generally four ways to do this:
Page label comes with script
Dom property comes with script
Request address comes with script
Enter blank break filter limit
Give two little plums:The means of XSS attack defenseBecause the root of
There are many ways to launch XSS attacks on a Web site, and just using some of the built-in filter functions of PHP is not going to work, even if you will Filter_var,mysql_real_escape_string,htmlentities,htmlspecialchars , strip_tags These functions are used and do not necessarily guarantee absolute security.
So how to prevent XSS injection? The main still need
WEB security: Introduction and solutions to XSS and SQL Injection Vulnerabilities1. Cross-site scripting (XSS)
How XSS attacks work
XSS, also known as CSS (Cross Site Script), is a Cross-Site scripting attack. It indicates that a malicious attacker inserts malicious script code into a Web page, and the program does not
Read Catalogue
Types and characteristics of XSS
XSS Prevention
Summarize
XSS, also known as Cross site Scripting, is the focus of XSS not across sites, but in the execution of scripts. With the development of Web front-end applications, XSS vulnerabilit
text file (do not have any space or line breaks before) and use IE6 to open it (no malicious code, just a demo ):+/V8 + ADw-script + AD4-alert (document. location) + ADw-/script + AD4-
The most common method is the application of JSONP. The solution is to filter out all non-letter and digit underline characters. there is also a way to output space or line feed at the beginning of the page, so that the UTF7-XSS
suggest you take a look at the html/javascript trigger events and tags.
No matter what you do, do not think that xss is a weakness. Many websites use sessions. I can see that many websites use cookies only for sessions in the background. When doing high concurrency, if no one requires session, the front-end uses cookies.
Here is an example. you have to penetrate a website, but you do not know the administrator or who the website belongs to. When you
the server (database);3) Filter the user input of the special string, to escape it, as followsThe sample string "", following the escaped stringStringescapeutils-Htmlutils-4) HTTP-Related settings A) Cookie.sethttponly (true);-Protect user cookiesB) Res.setheader ("X-frame-options", "Sameorigin"); X-frame-options the corresponding attribute value meaningDENY: This page is not allowed to be loaded as frameSameorigin: This page only allows same-origin
embedded in the article will be executed in her browser, and her session cookie or other information will be stolen by Alex.
Dom-Based XSS vulnerabilities threaten individual users, while stored XSS vulnerabilities threaten a large number of users.
XSS vulnerability repair
Principle: do not trust customer input dataNote: the attack code is not necessarily in sc
absrtact : The attack on the Web server can also be said to be various, a variety of, common with horse-hung, SQL injection, buffer overflow, sniffing, using IIS and other targets for webserver vulnerability attacks. This article combines the common SQL injection, cross-site Scripting Attack (XSS), cross-site request forgery (CSRF) attack in Web TOP10, and introduces the corresponding precautionary method.keywords : SQL injection,
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.