MyBB 1.4 admin remote code execution vulnerability
by flyh4t
date: 2010-01-10
测试版本MyBB 1.44.11
[一]漏洞分析
在index.php文件336行左右代码如下:
//index.php,336行左右 $plugins->run_hooks("index_end"); |
看以下eval()函数中的内容是否可以控制,继续找到templates类查看get函数的定义
//inc/class_templates.php,65行左右 function get($title, $eslashes=1, $htmlcomments=1) // if(!isset($this->cache[$title])) if(!$gettemplate) $this->cache[$title] = $gettemplate['template']; if($htmlcomments) if($eslashes) |
从上面的代码可以看出,get()函数是从数据库里面取出模板的内容经过处理后返回给eval函数。继续来跟以下,看看数据库里面的数据是如何来的