1 Star 2 Fork 0

xieqiang / cve

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dedecms rce.md 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
xieqiang 提交于 2023-04-19 12:22 . update dede/dedecms rce.md.

DEDECMS v5.7.106 has a command execution vulnerability

In the uploads/dede/config.php file, we find that the file written in the UpDateMemberModCache() function is.inc, but the content written here is obtained from the database, and the database content is under our control.

The failure to include the global filter function config.php is the key vulnerability

输入图片说明

The file is written to config_passport.php. We can add the content we want through the membership model management function point. After adding the content in the database is as follows

输入图片说明

输入图片说明

Let's take a look at the member model.inc file

输入图片说明

We successfully escape our content by escaping the single quotation mark with the \ backslash, closing it with the following single quotation mark, and then closing all the preceding content with parentheses.

输入图片说明

View the call to UpDateMemberModCache

This function is used in dede/member_model_add.php. After testing, it is found that if a new member template is added through member model management, the content will be written to the member_model.inc file

输入图片说明

inc file cannot be used, we go to the system function point to find a place where we can edit the file, and then include member_model.inc to successfully getshell.

Create a new file through the file manager, and then include the.inc file we just did, so that we can successfully bypass the malicious function detection of dede, and finally getshell.

输入图片说明

Access the 1.php file

输入图片说明

1
https://gitee.com/xieqiangweb/cve.git
git@gitee.com:xieqiangweb/cve.git
xieqiangweb
cve
cve
master

搜索帮助