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);</span>
$info = $field->get($fieldid);?
问题就出在标红的。。跟进去看下
立即学习“PHP免费学习笔记(深入)”;
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...所以忘了过滤。。。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号