最近在整理收藏夹,发现了一个关于XSS绕过的网站,以前没有怎么关注,今天看到了就测试了一下,共有5个小案例,都是比较简单的,绕过方法分享给大家。
XSS绕过案例网站:
共有5个小题目,每个小题目都有一些限制条件。
1、No security. Everything goes.
2、Personalized CSS. no html symbols allowed.
3、Html escaped. Image,avatar,etc url form.
4、 Nothing is escaped.. but some *******s are stripped.
5、Poor addslashes security.
2、Personalized CSS. no html symbols allowed.
3、Html escaped. Image,avatar,etc url form.
4、 Nothing is escaped.. but some *******s are stripped.
5、Poor addslashes security.
1、Form One -- No security. Everything goes.
无安全方面的限制,直接使用
即可绕过
2、Form Two -- Personalized CSS. no html symbols allowed.
限制条件:只能使用CSS,不允许使用html标签
我们知道利用expression可以用来构造XSS,但是只能在IE下面测试,所以下面的测试请在IE6中执行。
body { background:black; xss:expression(alert(/waitalone.cn/));/*IE6下测试*/ }
3、Form Three -- Html escaped. Image,avatar,etc url form.
限制条件:对HTML进行了转义,Image标签可用。
测试输入的字符会被插入到src地址中,那么可以使用伪协议来绕过。
直接输入
javascript:alert(/waitalone.cn/);
即可绕过 //IE6下
或者你也可以使用事件来绕过,注意闭合语句即可,如下:
1" onerror=alert(/waitalone.cn/); var a="1
4、Form Four -- Nothing is escaped.. but some *******s are stripped.
限制条件:使用了关键字过滤。
我测试了一下,大部分都过滤了,有部分未过滤,经测试script/onerror过滤了,但是onclick未过滤,使用onclick事件绕过
IE6下测试
5、Form Five -- Poor addslashes security.
限制条件:使用addslashes对特征字符进行了转义
也就是说我们的XSS语句中不能出现单引号,双引号等等特征字符。
直接使用
即可绕过
或者使用String.fromCharCode方法,如下:
from www.waitalone.cn.thanks for it.
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论