notrequired
1. 基础判断
打开会自动跳转到/index.php?file=index.html
尝试任意文件读取,成功读取 /etc/passwd

2. 读取文件
使用php://filter
过滤器读取index.php的base64编码字符串

解码得到:
<?php
if(!isset($_GET["file"])){
header("location: http://ctf.bennetthackingcommunity.cf:8333/index.php?file=index.html");
exit;
}
else{
require($_GET['file']);
}
#note to myself: delete /bin/secrets.txt!
?>
根据提示,读取 /bin/secrets.txt

把BUHC替换为DO即为Flag。
Get Flag!
最后更新于
这有帮助吗?