[ZJCTF 2019]NiZhuanSiWei1

[ZJCTF 2019]NiZhuanSiWei1

image-20250225204157091

简单扫了一眼,大概考的就是文件包含和php反序列化,但是貌似没有看到可以反序列化的代码

有三个可以进行GET传参的的参数,text,file,password。

file_get_contents(&text,‘r’)的意思是使用该函数的r模式,将字符串的写进文件中,所以我们需要使用data伪协议将字符串写入文件,payload如下

?text=data://text/plain,welcome to the zjctf

image-20250225205430902

include(&file),可以看到我们的useless.php被包含起来了,那我们可以利用php://filter伪协议将包含的文件内容输出,payload如下

?file=php://filter/read=convert.base64-encode/resource=useless.php
posted @ 2025-03-05 22:33  朱迪Judy  阅读(20)  评论(0)    收藏  举报