帝友P2P借贷系统某处代码执行漏洞

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

### 简要描述: 唉……这代码质量,顿时给跪下了。 ### 详细说明: 这个洞洞需要结合上次爆的默认密钥一起来爽。 ====================上集回顾==================== 帝友在整个程序中使用了自定义的对称加密方式(通常被定义为authcode或类似名称),而如果不显式指定或修改源码,函数将会调用默认密钥。这是本漏洞触发的前置条件。 ===================上集回顾完=================== 随着审计工作的愉快进行,我发现到/plugins/avatar/avatar.class.php中一个方法长得很有趣: ``` function onuploadavatar() { @header("Expires: 0"); @header("Cache-Control: private, post-check=0, pre-check=0, max-age=0", FALSE); @header("Pragma: no-cache"); //header("Content-type: application/xml; charset=utf-8"); $this->init_input($this->getgpc('agent', 'G')); $uid = $this->input('uid'); if(empty($uid)) { return -1; } if(empty($_FILES['Filedata'])) { return -3; } list($width, $height, $type, $attr) = getimagesize($_FILES['Filedata']['tmp_name']); $imgtype = array(1 => '.gif', 2 => '.jpg', 3 => '.png'); $filetype = $imgtype[$type]; $tmpavatar = AVATAR_DATADIR.'./tmp/upload'.$uid.$filetype; //【这里拼合了$uid和$filetype两个变量作为move_uploaded_file的参数】 file_exists($tmpavatar) && @unlink($tmpavatar);...

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