FineCMS注入及getshell
漏洞文件:finecms\controllers\member\ContentController.php
public function editAction() {
<span style="color: #ff0000;">$id = $this->get('id');</span>
<span style="color: #ff0000;"> $data = $this->content->where('userid=' .
$this->memberinfo['id'])->where('id=' . $id)->select(false);</span>
$catid = $data['catid'];
if (empty($data)) $this->memberMsg('信息不存在');
if (empty($catid)) $this->memberMsg('信息栏目不存在');
$model = $this->cache->get('model');
$modelid = $this->cats[$catid]['modelid'];
$fields = $model[$modelid]['fields']
$id,
出现漏洞
exp 代码
exp: 注册用户,发表文章,然后再点击编辑, 编辑文章这儿,抓包,得到cookie 进行注入
实际利用
后台拿shell(demo演示地址是apache)
点击模版设置 利用新建模版来拿shell
http://demo.finecms.net/index.php?s=admin&c=theme&dir=bWVtYmVyLw==&iframe=0
dir后面是目录base64加密的
构造如下,../../就是Li4vLi4v,输入http://www.iick.blog/index.php?s=admin&c=theme&dir=Li4vLi4v=&iframe=0
目录已经跳转 建立a.php.css来拿shell。