## 概述
Concrete5 是一个全新的内容管理软件(cms)。你可以直接在页面上编辑、排版!而不是像wordpress之类的,需要控制模板或进入编辑器来编辑文字。
而在5.4.2.1版本中存在较多的漏洞,如sql注入,以及xss,以及其他的漏洞
## 详细情况
### sql注入地方
http://yoursite.com/index.php/dashboard/reports/surveys/?ccm_order_by=numberOfResponses&ccm_order_dir
在ccm_order_dir字段没有相关过滤,通过盲注的方式发现此处有注入
比如ccm_order_dir =,(SELECT BENCHMARK(1000000,MD5(1)) FROM btSurveyResults where CURRENT_USER()like 'root@localhost' limit 1) --
就是通过盲注的方式,如果页面返回的速度大于5秒左右,就判断出有注入。
### sql注入详细原因
上源码
File: concrete/controllers/dashboard/reports/surveys.php
class SurveyList extends DatabaseItemList {
protected $itemsPerPage = 10;
protected $autoSortColumns = array('cvName', 'question','numberOfResponses', 'lastResponse');
function __construct() {
$this->setQuery(
'select distinct btSurvey.bID,CollectionVersions.cID, btSurvey.question, CollectionVersions.cvName,(select max(timestamp) from btSurveyResults where btSurveyResults.bID= btSurvey.bID and btSurveyResults.cID = CollectionVersions.cID) as lastResponse, (select count(timestamp) from btSurveyResults where btSurveyResults.bID = btSurvey.bID and btSurveyResults.cID =CollectionVersions.cID) as numberOfResponses ' .
'from btSurvey, CollectionVersions,CollectionVersionBlocks');
$this->filter(false, 'btSurvey.bID =CollectionVersionBlocks.bID');
$this->filter(false, 'CollectionVersions.cID =CollectionVersionBlocks.cID');
$this->filter(false, 'CollectionVersionBlocks.cvID =CollectionVersionBlocks.cvID');
$this->filter(false, 'CollectionVersions.cvIsApproved = 1');
$this->userPostQuery .= 'group by btSurvey.bID,CollectionVersions.cID';
}
}
### xxs地方
http://yousite.com/concrete5.4.2/index.php/login/forgot_password/
使用post发送请求时,rcID字段没有进行过滤,构造"><script>alert(1)</script>即可弹出对话框
### xxs详细原因
源码文件: concrete/single_pages/login.php:
<input type="hidden" name="rcID" value="<?php echo $rcID?>" />
看rcid的赋值,就可以知道。
### 其他漏洞
此外在 index.php/tools/blocks/page_list/blog_rss?bID=30&cID=1&arHandle=Main
字段中的cid直接赋值'号,就会让查询的地方直接闭合,使得没有对cid进行查询,就会看到所有的信息。