首页  >  文章  >  后端开发  >  phpcms2008破绽

phpcms2008破绽

WBOY
WBOY原创
2016-06-13 13:20:13800浏览

phpcms2008漏洞

下面是官方到目前为止还没有打补丁的几个漏洞

http://www.tmdsb.com/flash_upload.php?modelid=1

注入漏洞

<?php require dirname(__FILE__).'/include/common.inc.php';
if($PHPSESSID) 
{
	session_id($PHPSESSID);
	session_start();
}
if($auth) set_cookie('auth', $auth);
if(!get_cookie('cookietime') && $cookietime) set_cookie('cookietime', $cookietime);
require_once 'admin/model_field.class.php';
<span style="color: #ff0000;">$field = new model_field($modelid);
$info = $field->get($fieldid);

?

问题就出在标红的。。跟进去看下

    function __construct($modelid)
    {
		global $db;
		$this->db = &$db;
		$this->table = DB_PRE.'model_field';
		echo($modelid);
		<span style="color: #ff0000;">$model = $this->db->get_one("SELECT * FROM ".DB_PRE."model WHERE modelid=$modelid");</span>
		$this->modelid = $model['modelid'];
		$this->modelname = $model['name'];
		$this->fields =  cache_read($modelid.'_fields.inc.php', CACHE_MODEL_PATH);
		$this->tablename = DB_PRE.'c_'.$model['tablename'];
    }

?

构造方法中调用了select...所以忘了过滤。。。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn