Skip to content

Mingsoft MCMS v5.2.8 SQL注入【后台】 #97

Closed
@thunder-sec

Description

漏洞分析

漏洞路由位置/${ms.manager.path}/mdiy/page/verify,漏洞点在如下方法,if...else两个条件中的validated方法均存在问题。

image-20220717104840622

调用了父类的validated方法,validated方法中将传入的fieldName和fieldValue复制where对象中,并调用了appBiz.queryBySQL方法。

image-20220717104959321

queryBySQL的实现方法如下调用了getDao().queryBySQL(table, fields, wheres, null,null, null, null,null);

image-20220717102319042

image-20220717102446760

getDao().queryBySQL调用的具体SQL语句如下,其中key值对应的Map类型对象where,也就是前端传进来的fieldName

image-20220717102719639

漏洞验证

构造如下请求包,如果数据库长度大于1,即成功睡眠3秒。

image-20220717104101033

debug输出sql语句

image-20220717104329648

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions