[ACTF2020 新生赛]Include

[ACTF2020 新生赛]Include

wp from Kuller_Yan

打开靶机发现一个超链接,点击之后出现一段话
“Can you find out the flag?”
查看源码注入,无果,
抓包,无果
仔细看url,发现有flag.php
在这里插入图片描述
判断此题为PHP伪协议题目
构建payload

?file=php://filter/read=convert.base64-encode/resource=flag.php

穿插知识点:

php://filter 伪协议

该伪协议读取源代码并进行base64编码输出,不然会直接当做php代码执行就看不到源代码内容了。

php://filter/read=convert.base64-encode/resource=XXX.php

得到base64编码的flag.php,进行解码:
在这里插入图片描述

over~

原文地址:https://www.cnblogs.com/Kuller-Yan/p/13060272.html