Remote vile inclusion is a special case of file inclusion vulnerabilities we've seen in the previous
video how we were able to include any file in the server and have access to it through local file inclusion
vulnerabilities in today's video.
If the server is configured to allow a certain function called allow your URL and allow your I'll f
open then we will be able to include any file from any computer into the Target's Web site so we will
literally be able to inject MEP HP file into the target's computer.
What this would lead to is basically it will.
We can run payloads we can run reverse shells and we can run even system commands and get access to
the targets our full control to the target server.
So first of all let's just go here and will be using the same file inclusion vulnerability that we were
using in the previous video.
So it's in the page parameter right here.
The only difference is you need to enable the function that makes this that convert the local file inclusion
to a remote file inclusion.
So hence the name local allows you to access local files.
Remote will allow you to access and inject remote files so to enable that.
I'm gonna go to my methods portable machine.
I'm just gonna show you how to enable it so you can test this vulnerability yourself.
So we're coming here to our with exploitable.
And I'm gonna go into the PSP settings so the P2P settings are stored in a file and to access that we're
gonna use nano which is a text editor and then I'm gonna put the file location which is in UTC BHP 5
CGI and BHP they are tiny.
So that's the location where the BHP configuration is stored.
I'm going to open it using a file like the third called Nano and I'm just going to exit this.
I'm going to open it a pseudo as the root actually in Cali we never needed to use sudo because we log
in as root but with the exploitable you need to use sudo when you want to do rude actions.
So you say sudo and then you put the command that you want to run OK.
So these are the configurations for the BHP that's installed on the web server on the target and we're
looking for a function called allow your l f open.
So I'm gonna type in control and W at the same time and that'll allow me to search and I'm gonna search
for low you are L and we can see here that I have a line or a left open is on and allow your URL include
is on as well.
So these two functions if they're enabled then the local file inclusion vulnerability that we have can
be used as a remote file inclusion so to exert this control and X and it's gonna ask you if you want
to save just type in y and enter for me I didn't change anything so that you need to do that once you
do that you need to restart your web server.
So you're going to do it you see and it's got these Apache to restart and you'll need to do this as
sudo actually and this is done now so everything should be ready for you.