CTF-Web-[极客大挑战 2019]Secret File
博客说明
文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!本文仅用于学习与交流,不得用于非法用途!
CTP平台
网址
题目
Web类,[极客大挑战 2019]Secret File

打开题目的实例

思路
看到这种题目,首先到处点一点,看看有什么奇怪的地方,然后打开源代码,差不多就是这样,不过我无意中拖动鼠标选择文字的时候,找到了一个东西

不过你这里能够找到,源代码里面肯定也能,不信打开试一下便知

然后我们进入到它所提示的界面,是这个样子的

我们点击secret

这显然不是的,回到上一个界面,查看源代码

发现一个不对劲的地方,代码提示的方法是action,而跳转的却是end

说明这个跳转的时间特别快,我们需要抓包,有一个抓包神器BrupSuite,使用它发现action有一个隐藏的回应

我们加上路径访问试一下,又提示我们找flag.php

跟着提示来,是这个页面,没有像之前一样是隐藏的按钮,查看源代码,发现还是没有

好像到这里听住了,前端隐藏了,代码里面肯定有,只是我们看不到,结合题目一下想到的文件隐藏
php://filter
php://filter是php的一个协议,可以用来查找漏洞
使用方法
php://filter/convert.base64-encode/resource=目标文件
对于这个题目我们直接在访问secr3t.php的后面加上?file=php://filter/convert.base64-encode/resource=flag.php
完整路径
请注意各自的路径的前面部分并不相同

这时候下面多出了一个base64加密,这是我们使用php://filter得到的,把它试着去解密一下
base64加解密网站

发现flag出来了,这个真的是!!!
感谢
BUUCTF
以及勤劳的自己
网友评论