We all know that json is similar to a dictionary. Here we will not repeat it here. The XSS directly uses the Code:
Json = new JSONObject (); json. put ("code", 200); json. put ("info", "{'replace ': function () {alert (/xss/) ;}}"); json. put ("msg", "success"); System. out. println (json); // output: {"code": 200, "info": {"replace": function () {
0x01 Preface:The above section (http://www.freebuf.com/articles/web/40520.html) has explained the principle of XSS and the method of constructing different environments. This issue is about the classification and mining methods of XSS.When the first phase comes out, the feedback is very good, but there are still a lot of people asking questions, I will answer here.Q 1: If I enter a PHP statement will not execute.Answer 1: No, because
;
This way the client is exposed to XSS attacks, and the workaround is to use the htmlencode,php function in the variable htmlentitiesphp code
$a = "";
$b = "
?>
$b)?>
"#" >$a)?>
Output HTML code in HTML properties
div id="div" name ="$var">div>
In this case the defense is also using HTMLEncodeImplemented in owasp-php: PHP code
$immune _htmlattr = Array (', ', '. ', ' -', ' _ ');
Original http://alihassanpenetrationtester.blogspot.com/2013/01/bypassing-xss-filters-advanced-xss.htmlHi friends, last time, I explained what's XSS and how a attacker can inject malicious script in your site. As I promised earlier, I am writing this advanced XSS tutorial for you (still more articles would come).Sometimes, website owner use
Baidu map persistent XSS Vulnerability
1. Baidu map has a reflection-form XSS vulnerability, but it can become persistent.
2. An XSS connection exists.
http://map.baidu.com/?newmap=1shareurl=2l=12tn=B_NORMAL_MAPc=13382905,3515188s=bd%26fstq%3D1%26from%3Dwebmap%26c%3D179%26pn%3D0%26rn%3D10%26wd%3D
3. The above code starts with the parameter fstq, and all subseque
XSS Filter的浏览器,马上就会出现一个黑色的矩形。但是前面已经提到过,Chrome的XSS Auditor会捕获这种攻击,还是继续吧: 现在我们要在
http://site.com/xss.php?x=
Do not forget to perform URL encoding:
http://site.com/xss.php?x=%3Csvg%3E%3Cuse%20height=200%20width=200%20xlink:href=%27http://site.com/xss.php?x=%3Csvg%20id%3D%22rectangle%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20%20%20
0x00 background
Microsoft has added xss Filter since IE8 beta2. Like most security products, the protection countermeasure is to use rules to filter Attack codes. Based on the availability and efficiency considerations, add the blacklist and whitelist policies (same-origin policies ).
After several generations of updates and tests by a large number of hack enthusiasts (Microsoft prefers to attract some talents to help find vulnerabilities), IE9 has a
Cosine (@evilcos)0x01. XSS multiple ways to get plaintext passwordsI have felt the great innovation of the web trend, especially the recent HTML5 is getting more and more fire. Browsers in the client partition the Web OS, as long as the user experience good functionality, the browser will learn from each other, and then to implement, but there are always some differences, some of the difference is the user experience, and some may bring security issue
anti- XSS attack What is XSS attack code example:$XSS = $_get[' xss_input ');Echo ' The character you entered is Echo ' The character you typed is ?>Note: If you want the form to submit data to your page,the action is set to emptyIf we enter "" in the form, theresult we receive isEcho ' The character you typed is so it pops up the
statements. of course, an error will also be prompted.
At that time, we found that all information in the current table can be queried after the SQL statement can be executed. for example, the correct administrator account and password are used for logon intrusion ..
Solution 1:
Use javascript scripts to filter out special characters (not recommended, and the indicator is not cured)
If javascript is disabled, attackers can still launch SQL injection attacks ..
Solution 2:
Use the built-in funct
The test will involve the XSS test, the following summary of the knowledge of XSSXSS Cross-site scripting feature is the ability to inject malicious HTML/JS code into the user's browser, hijacking user sessionsCommon alert to verify that a Web site has a vulnerabilityIf a vulnerability is identified, it can be compromised as the injected content is differentFor example: stealing cookies, web-linked horses,
Test 178 Intranet through a storage XSS
Test the 178 Intranet attachment payload through a storage XSS
Site: http://apt.178.com/The input is not filtered when an app or ringtone resource is added.As follows:
After the upload, it will be displayed on the front-end only after the Administrator reviews it.Then you can manage it blindly.I'm so excited that I have successfully received cookies and other informa
with cross-site vulnerabilities, and then construct cross-site statements. By combining other technologies, such as social engineering, cheat the administrator of the target server to open it, and then use the following technology to get a shell.
XSS attack methods
External attacks:
In traditional cross-site exploitation methods, attackers usually construct a cross-site webpage, and then put a cookie-collecting page in another space, next, w
mounted to the master node, we can quickly mount its interface with a hook:
// Our defense system (function () {function installHook (window) {// Save the upper-level interface var raw_fn = window. element. prototype. setAttribute; // hook the current interface window. element. prototype. setAttribute = function (name, value) {// try alert (name); // call raw_fn.apply (this, arguments );};} // first protect the current page installHook (window); docu
master node, we can quickly mount its interface with a hook:
// Our defense system (function () {function installhook (window) {// Save the upper-level interface var raw_fn = Window. element. prototype. setattribute; // hook the current interface window. element. prototype. setattribute = function (name, value) {// try alert (name); // call raw_fn.apply (this, arguments );};} // first protect the current page installhook (window); document. addeventl
flexibility of the script, we not only support wildcard characters to match the site name, but the regular expression is also fully supported. At the same time, in order to facilitate testing, the debug console can dynamically modify the policy.Below, we find a page with XSS in it and try it out immediately:Refresh, XSS performed:Although the non-homologous execution, but at least a
/*** Title: Discuz Small set of Xss vulnerabilities in series X* Author: sogili @ 0 xsec* From: 0xsec.org* Website: 0xsec.org sogili.com**/
DiscuzMinor Product Version X SeriesXssVulnerability set.
InvolvedDiscuz x1.0X1.5Version. PlusQQBookmarksXssOne.
SogiliA small result of whining.
Discuz x1.0 personal space template custom content Xss
Similar to the previous times, they are all img labels.After loggin
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.