Sometimes we might need help from a tool to fuzz all possible payloads.
Fuzzing Parameters
There could be hidden parameters and these parameters tend to be less secure than public ones.
For example, we can fuzz the page for common GET parameters, as follows:
LFI Wordlists
There are a number of LFI Wordlists we can use for this scan. A good wordlist is LFI-Jhaddix.txt, as it contains various bypasses and common files, so it makes it easy to run several tests at once.
Fuzzing Server Files
It would be helpful to know where servers files exist and whether we can read them.
Such files include: Server webroot path, server configurations file, and server logs.
Server Webroot
Such files include: Server webroot path, server configurations file, and server logs. In this case, we need to figure out the server webroot path.
Depending on our LFI situation, we may need to add a few back directories (e.g. ../../../../), and then add our index.php afterwords.
The following is an example of how we can do all of this with ffuf:
We may also use the same LFI-Jhaddix.txt wordlist we used earlier, as it also contains various payloads that may reveal the webroot. If this does not help us in identifying the webroot, then our best choice would be to read the server configurations, as they tend to contain the webroot and other important information.
Server Logs and Configurations
Identifying logs directory can be helpful for log poisoning or for identifying the server webroot path.
To do so, we may also use the LFI-Jhaddix.txt wordlist, as it contains many of the server logs and configuration paths we may be interested in.
We will read (/etc/apache2/apache2.conf), as it is a known path for the apache server configuration:
In this case, the log path is using a global apache variable (APACHE_LOG_DIR), which are found in another file we saw above, which is (/etc/apache2/envvars), and we can read it to find the variable values:
As we can see, the (APACHE_LOG_DIR) variable is set to (/var/log/apache2), and the previous configuration told us that the log files are /access.log and /error.log, which have accessed in the previous section.