NSCTF测试平台随笔 include

NSCTF
http://ctft.nsctf.cn
题目描述:
你就包含吧!Flag格式flag{xxx}.
http://192.144.182.32:8001/abf20c91a442da48/2/

hint1: 看到数字你就没有扫一波的冲动?
hint2: 有时候base64也不是万金油

打开网页为空白网页,查看源代码显示Include1.php,访问。
得到了网址后缀,include1.php?file=index
依旧为空白,查看网页源代码与index.php相同
直接file=include1,显示了error!
根据习惯,访问flag.php,发现返回200页面存在,大概率需要的flag在这个页面中。

尝试抓包发现cookie中存在tips,访问include2.php,返回了file not found。
使用经典手法?file=php://filter/read=convert.base64-encode/resource=include1访问,结果返回还是error
在群友的提示下使用rot13.?file=php://filter/read=string.rot13/resource=include1
成功返回include1的代码。
直接访问flag后查看源代码得到了rot13编码后的flag

给自己的提醒:不要随意给文件增加后缀,由于之前给file传参为flag.php导致一直无法出结果。

posted @ 2021-09-15 13:48  takakura_anzu  阅读(349)  评论(0)    收藏  举报