文件包含漏洞-moctf

打开网页调试可以看见flag.php文件包含漏洞,将文件包含漏洞转化为代码执行漏洞

----------不知道怎么过渡的过渡

讲下php://input

一般可能认为它是拿来接post过来的数据的,但只要构造了合适的POST参数,是可以利用来getshell的

构造url  http://119.23.73.3:5001/web8/index.php?file=php://input,返回wrong answer发现文件包含漏洞可执行

----------继续不知道怎么过渡的过渡

再讲下php://filter

这个函数是真的厉害,可以读取文件中的内容再传回来

插段官方解释

-------------回到题目

构造url  http://119.23.73.3:5001/web8/index.php?file=php://filter/read=convert.base64-encode/resource=flag.php

这里用base64过滤下无效字符

传回来解密就拿到flag了

猜你喜欢

转载自blog.csdn.net/xiaorouji/article/details/79598629
今日推荐