[极客大挑战 2019]Secret File
打开网站

在注释中发现PHP文件

点击SECRET按钮,并没有什么东西


抓包分析
发现了一个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里
?>
使用php://filter伪协议获得flag.php源码

获得flag

本文来自博客园,作者:oldliutou,转载请注明原文链接:https://www.cnblogs.com/oldliutou/p/15685012.html

浙公网安备 33010602011771号