Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
I know
View Details
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web System
>
Content Management System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
4.2K
Star
25.5K
Fork
7K
GVP
铭飞
/
MCMS
Code
Issues
9
Pull Requests
0
Wiki
Insights
Pipelines
Service
Gitee Pages
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
Don’t show this again
Update failed. Please try again later!
Issues
/
详情
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
Mingsoft MCMS v5.2.8 自定义模板处存在SQL注入
Done
#I5I1P5
Thunderclap
Opened this issue
2022-07-20 22:26
# 漏洞分析 漏洞路由位置/${ms.manager.path}/mdiy/model/delete,漏洞点在如下方法,前端传入models对象。对models对象中遍历获取其中的ModelTableName值传入modelBiz.dropTable方法执行。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222129_37054a28_8036023.png "image-20220720213956569.png") 在dropTable方法中调用getDao().dropTable(table)方法。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222202_65dcc9e0_8036023.png "image-20220720215058150.png") 查看dropTable对应的mapper内容如下,直接将table内容进行拼接且未预编译,造成SQL注入。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222232_d805c823_8036023.png "image-20220720215229181.png") # 漏洞验证 首先需要创建自定义模版就需要自定义模板的json内容。通过如下https://code.mingsoft.net/创建自定义模型的json内容。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222258_f81366b2_8036023.png "image-20220720215606438.png") 将创建好的json内容粘贴到网站的自定义模板——自定义模型json中,点击确定。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222318_a8d826eb_8036023.png "image-20220720215732784.png") 开启burpsuite抓包,选择刚新建的这个模版,点击删除按钮。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222346_9536333d_8036023.png "image-20220720215952743.png") 抓包中通过修改modelTableName字段,我们如下是利用堆叠注入方式,创建一个新的数据表。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222411_ddc8847b_8036023.png "image-20220720221527975.png") 通过登陆数据库查看执行结果,发现注入成功,删除了MDIY_MODEL_TEST表,并且成功创建了testtable表。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222432_054cfe58_8036023.png "image-20220720221722996.png")
# 漏洞分析 漏洞路由位置/${ms.manager.path}/mdiy/model/delete,漏洞点在如下方法,前端传入models对象。对models对象中遍历获取其中的ModelTableName值传入modelBiz.dropTable方法执行。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222129_37054a28_8036023.png "image-20220720213956569.png") 在dropTable方法中调用getDao().dropTable(table)方法。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222202_65dcc9e0_8036023.png "image-20220720215058150.png") 查看dropTable对应的mapper内容如下,直接将table内容进行拼接且未预编译,造成SQL注入。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222232_d805c823_8036023.png "image-20220720215229181.png") # 漏洞验证 首先需要创建自定义模版就需要自定义模板的json内容。通过如下https://code.mingsoft.net/创建自定义模型的json内容。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222258_f81366b2_8036023.png "image-20220720215606438.png") 将创建好的json内容粘贴到网站的自定义模板——自定义模型json中,点击确定。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222318_a8d826eb_8036023.png "image-20220720215732784.png") 开启burpsuite抓包,选择刚新建的这个模版,点击删除按钮。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222346_9536333d_8036023.png "image-20220720215952743.png") 抓包中通过修改modelTableName字段,我们如下是利用堆叠注入方式,创建一个新的数据表。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222411_ddc8847b_8036023.png "image-20220720221527975.png") 通过登陆数据库查看执行结果,发现注入成功,删除了MDIY_MODEL_TEST表,并且成功创建了testtable表。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0720/222432_054cfe58_8036023.png "image-20220720221722996.png")
Comments (
0
)
Thunderclap
created
任务
铭飞
changed
issue state
from
待办的
to
进行中
铭飞
set
milestone
to
5.2.9
铭飞
changed
issue state
from
进行中
to
已完成
Expand operation logs
Collapse operation logs
Sign in
to comment
Status
Done
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
5.2.9
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (32)
Tags (16)
master
5.4.1
5.4.0
5.3.6
5.3.5
5.3.4
5.3.3
5.3.2
5.3.1
5.3.0
5.2.11
5.2.10
5.2.9
5.2.8
5.2.7
5.2.6
5.2.5
5.2.4
5.2.3
5.2.2
5.2.0
revert-merge-238-master
5.0.1
5.0.0
4.7.2
4.7.1
4.7.0
4.6.5
4.6.4
4.6.3
4.6.2
4.6.1
5.4.1
5.4.0
5.3.6
5.3.5
5.3.4
5.3.3
5.3.1
5.2.11
5.2.10
5.2.9
5.2.8
5.2.4
5.2.3
5.2.1
5.1
4.6.3
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)
Java
1
https://gitee.com/mingSoft/MCMS.git
git@gitee.com:mingSoft/MCMS.git
mingSoft
MCMS
MCMS
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register