BUUCTF[极客大挑战 2019]Secret File
挺有意思的一道题,打开链接。
![图片[1]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226130433119.png?imageView2/0/format/webp/q/75)
蒋璐源的秘密?没兴趣,本人不喜欢探索别人的秘密。好吧,hacker喜欢。F12查看一下源码。
![图片[2]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210434626.png?imageView2/0/format/webp/q/75)
出现下一个页面,点击试试
![图片[3]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210435256.png?imageView2/0/format/webp/q/75)
![图片[4]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210436858.png?imageView2/0/format/webp/q/75)
嗯?!闪电侠也看不清,估计是玩我呢,退回刚刚的页面,F12看看
![图片[5]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210437117.png?imageView2/0/format/webp/q/75)
果然,同样的错误不允许犯两次,嗯。。。。怎么办呢?抓个包看看。
![图片[6]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210438660.png?imageView2/0/format/webp/q/75)
访问该页面
![图片[7]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210438442.png?imageView2/0/format/webp/q/75)
果然就是这里,代码审计一下,包含一个file的文件,用get方式传输,如果存在…/,tp,input,data等就会输出Oh no!并且退出,说明要包含的文件不能有上述字符,构造payload:?file=flag.php
![图片[8]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210439136.png?imageView2/0/format/webp/q/75)
以为是背景颜色的问题,所以更改背景颜色为white,然而。。。并没有什么卵用。
![图片[9]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210441791.png?imageView2/0/format/webp/q/75)
再看一下代码,嗯。。。应该是文件包含漏洞,使用PHP协议构造payload:?file=php://filter/read/convert.base64-encode/resource=flag.php
![图片[10]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210442689.png?imageView2/0/format/webp/q/75)
将下面出现的base64加密的密文进行解密得到
![图片[11]-BUUCTF[极客大挑战 2019]Secret File – 蒋璐源的秘密?-安全小天地](https://img.godyu.com/2023/12/20231226210444567.png?imageView2/0/format/webp/q/75)
得到flag flag{1ca8bff6-1ff3-4511-903a-fc44f98bc21c}
THE END
暂无评论内容