I'm currently doing a CTF challenge and have extracted what I assume is the flag by injecting a relative path into the $filename
parameter of a call to the PHP function
file_get_contents($filename)
that is executed by an Apache server on the target system.
I got the name of the file the flag was hidden in through a hint at some other point but I was wondering:
Is there a file that's commonly present on a Linux system that holds information about the directory structure and files contained in these directories?
I've tried searching through several log files in order to find references to interesting files but I've yet to find a detailed list of file names. I also do not have permission to read entire device files. I do have full control over the $filename
parameter but from I gathered, I can only insert absolute or relative paths without wildcards in there.