前文: 用友ICC网站客服系统远程代码执行漏洞及修复 再暴用友ICC网站客服系统任意文件上传漏洞 再再暴用友ICC网站客服系统任意文件上传漏洞 用友ICC网站客服系统任意文件上传漏洞已经暴过很多次了,上次我也暴了个 昨天看了下代码发现还有个地方存在任意上传。官方修复确实不彻底呀!! 详细说明:漏洞文件:/5107/include/sendmsg.class.php
function saveAttach() { global $errorMsg, $lang, $CONFIG, $COMMON, $basePath; if (empty($_FILES["attach"]["name"])) return '';
//生成留言附件保存目录. www.2cto.com $path = 'data/leavewordfile/'.date("Ymd").'/'; if (!is_dir($CONFIG->basePath.$path)) { $COMMON->createDir($CONFIG->basePath.$path); } //文件名. $fileName = date('YmdHis').rand(100000, 999999).strrchr($_FILES['attach']['name'], '.'); $sysFileName = $CONFIG->basePath.$path.$fileName; $urlFileName = $CONFIG->baseUrl.$path.$fileName; if (!empty($_FILES['attach']['name'])) { //附件文件非空时检测文件是否合法. if ($this->checkFileType(strrchr($_FILES['attach']['name'], '.'))) { //附件文件类型不合法// $errorMsg .= $lang['attach_type']; }else if ($_FILES['attach']['size'] >= 5242880 || $_FILES['attach']['size'] <= 0) { //附件文件大小不合法/ $errorMsg .= $lang['attach_size']; } } //上传附件// move_uploaded_file($_FILES["attach"]["tmp_name"], $sysFileName); chmod($sysFileName, 0444); return $urlFileName; }
没过滤啊。。导致可以直接上传php
具体利用:
打开:http:// www.2cto .com /5107/msg/sendmsg.php 附件那里直接传php
上传后的地址会在 /data/leavewordfile/日期/随即文件名.php
文件名虽然随即了。 但是可以拿工具扫猜。基本上只是时间问题 !
修复方案:过滤拉。
希望不要再让我找到你们的这类 漏洞 哦。。 作者 鬼哥
查看更多关于(第N次)用友ICC网站客服系统任意文件上传漏洞的详细内容...