Duxcms3.1.2 代码审计多个漏洞getshell
DuxCMS 是一款基于PHP/MYSQL开发的、专注于多种平台的基础化内容管理框架
1、存储型xss
App\article\admin\ContentAdmin.php
classid没有做过滤
使用admin 123456登录
漏洞位置:文章-文章管理-编辑
添加xsspoc(<img src=1 onerror=alert(1)>)
点击保存
页面弹框
首页也会被影响而弹框
2、SQL注入
App\system\modellSystemModel.php
函数对提交的搜索参数进行判断,当搜索的值不为空时,直接将用户输入的参数拼接到SQL语句中
-
public
function index()
{
- target(this->_middle, 'middle')->setParams(this->urlParams['keyword'] .' - ÎÄÕÂËÑË÷', 'ÎÄÕÂËÑË÷', url('index', ['keyword' =>
- this->assign(
- this->assign('urlParams',
- this->assign('page', data['pageData']['raw'], this->urlParams));
$this->siteDisplay();
- }, function (message, code,
- this->errorCallback(code, url);
-
});
-
}
漏洞位置 工具-队列管理-点击搜索
GET /s/tools/Queue/index?keyword=a%27 HTTP/1.1
Host:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Referer:
Cookie: PHPSESSID=7nuq5fuiausr2qektji23umarb
Upgrade-Insecure-Requests: 1
X-Forwarded-For: 127.0.0.1
利用工具sqlmap跑
3、任意文件上传(getshell)
漏洞代码 app\system\admin\UploadAdmin.php
app\system\model\SystemFileModel.php
App\sytem\adminConfigAdmin.php 可以更改设置
漏洞位置 页面-页面管理
首先我们先修改配置添加上传文件格式php
然后返回页面-页面管理上传php的一句话木马
点击缩略图
上传php文件
访问上传路径成功执行
发布评论