recon_03 (directory listing)
Last updated
Last updated
View the exercise here: PentesterLab: Recon 03
For this challenge, your goal is to find a directory with directory listing in the main website for hackycorp.com.
When accessing a directory on a webserver, multiple things can happen:
an "index" file is present and it will get returned. N.B.: the file is not necessarily named index, this can be configured. But most of the time, the file will be named index.html
no "index" file is present and the webserver will list the content of the directory. This can obviously leak information.
Indexing directory can be disabled on most webservers. For example, with Apache, you need to use the option: -Indexes.
To find directories, with indexing turned on. You need to browse the source of the HTML pages and look at the directories used to store files. Once you have a list of directories, you can access each of them individually.
Go to hackycorp.com
> Right-click > then View Page Source
Click /images/logo.png
Then it will lead you to the site: https://hackycorp.com/images/logo.png
Erase the /logo.png
in the URL - this is a classic directory listing misconfiguration
Click key.txt
file to see the flag.