phpems设置缺陷直接添加管理员导致getshell

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: phpems 默认uc_key是1234567890 导致可以用uc的加密函数加密恶意代码带到sql语句中。 ### 详细说明: ``` if(!defined('IN_UC')) { error_reporting(0); set_magic_quotes_runtime(0); defined('MAGIC_QUOTES_GPC') || define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc()); require_once 'config.inc.php'; $_DCACHE = $get = $post = array(); $code = @$_GET['code']; //code=加密代码 parse_str(_authcode($code, 'DECODE', UC_KEY), $get); //到这里进行解密 //var_dump($get); if(MAGIC_QUOTES_GPC) { $get = _stripslashes($get); //不明白这里用意,解密后把反斜杠去掉 } $timestamp = time(); echo $timestamp - $get['time']; if($timestamp - $get['time'] > 3600) { //time可控 exit('Authracation has expiried'); } if(empty($get)) { exit('Invalid Request'); } $action = $get['action']; //action可控 require_once 'uc_client/lib/xml.class.php'; $post = xml_unserialize(file_get_contents('php://input')); if(in_array($get['action'], array('test', 'deleteuser', 'renameuser', 'gettag', 'synlogin', 'synlogout', 'updatepw', 'updatebadwords', 'updatehosts', 'updateapps', 'updateclient',...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息