### 简要描述:
验证不足啊。
### 详细说明:
在api/uc.php中
```
define('IN_PHPMPS', true);
define('UC_CLIENT_VERSION', '1.5.0'); //note UCenter 版本标识
define('UC_CLIENT_RELEASE', '20081031');
define('API_DELETEUSER', 1); //note 用户删除 API 接口开关
define('API_RENAMEUSER', 1); //note 用户改名 API 接口开关
define('API_GETTAG', 1); //note 获取标签 API 接口开关
define('API_SYNLOGIN', 1); //note 同步登录 API 接口开关
define('API_SYNLOGOUT', 1); //note 同步登出 API 接口开关
define('API_UPDATEPW', 1); //note 更改用户密码 开关
define('API_UPDATEBADWORDS', 1); //note 更新关键字列表 开关
define('API_UPDATEHOSTS', 1); //note 更新域名解析缓存 开关
define('API_UPDATEAPPS', 1); //note 更新应用列表 开关
define('API_UPDATECLIENT', 1); //note 更新客户端缓存 开关
define('API_UPDATECREDIT', 0); //note 更新用户积分 开关
define('API_GETCREDITSETTINGS', 0); //note 向 UCenter 提供积分设置 开关
define('API_GETCREDIT', 0); //note 获取用户的某项积分 开关
define('API_UPDATECREDITSETTINGS', 0); //note 更新应用积分设置 开关
define('API_RETURN_SUCCEED', '1');
define('API_RETURN_FAILED', '-1');
define('API_RETURN_FORBIDDEN', '-2');
//note 普通的 http 通知方式
if(!defined('IN_UC'))
{
error_reporting(0);
set_magic_quotes_runtime(0);
defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
include '../include/common.php';
include '../include/uc.inc.php';
$_DCACHE = $get = $post = array();
$code = @$_GET['code'];
parse_str(_authcode($code, 'DECODE', UC_KEY), $get);
if(MAGIC_QUOTES_GPC) {
$get = _stripslashes($get);
}
$action = $get['action'];
require_once '../uc_client/lib/xml.class.php';
$post = xml_unserialize(file_get_contents('php://input'));
```
UC_KEY 默认为phpmps。 官网的也如此。
为1的我们都可以调用。
那就来调用这个把
```
function updatepw($get, $post) {
global $db,$table;
if(!API_UPDATEPW) {
return API_RETURN_FORBIDDEN;
}
$username = $get['username'];
$password = $get['password'];
$newpw = md5($password);
$db->query("UPDATE {$table}member SET password='$newpw' WHERE username='$username'");
return API_RETURN_SUCCEED;
}
```
这里 是个update的语句 所以我们可以更改其他用户的密码。
然后我们自己生成一个加密的注入语句。。。
### 漏洞证明:
测试demo。
[<img src="https://images.seebug.org/upload/201405/1013151135efb205e610c368f945be317597368b.jpg" alt="ph1.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201405/1013151135efb205e610c368f945be317597368b.jpg)
暂无评论