Local File Inclusion
Also known as LFI, when an attacker can get a website to include a file that was not intended to be an option for this application.
Following we find a typical process for leveraging this vulnerability:
Check if parameters in the URL receive the name of a file
When this doesn't work directly, we can try to get to the root folder
Sometimes, we will need to check the page code to see the input conditions.
The code is searching for a file whose name starts with file
Example source code
We can use the \
to bypass this verification
Also if we use ..././
the code will do the replacement and leave us anyway with ../
, and we will also bypass this verification
Last updated
Was this helpful?