Shell Via LFI And /Proc/Self/Environ
This attack needs 3 main things to get it done
Here are some google dorks to find the vulnerability :
Now we have to create a new user agent and put in User Agent field the following code :
Description field is the name of the user agent so put what ever you want like this :
and for other fields remove them, so now create another user agent and in User Agent field put the one following codes but i will use the first one :
it should look like this :
Remmember to change the path in the code to your site and when you upload your shell it must be in .txt not .php format so that the code can read & excute it.
To check if website is vulnerable write ../ in after the paremeter like this
and if you got [function.include] then the website may be vulnerable.
So after getting the error remove ../ and replace with it /etc/passwd like
if you got another [function.include] then add ../ until you got many text ( http headers ) then the site is vulnerable so after you find the passwd file we have to replace /etc/passwd it to be
so the url will be something like this
now change your user agent to the first created user agent that contain <?php phpinfo(); ?> and reload the page , if you got a text similar to PHP VERSION then the site has excuted the code.
So Uploading the shell is the easy same as the above one we have to change our user agent to the second one we created and remmember to fix the paths in your user agent and reload the page.
To access your shell go to
and if that didn't work then try this
And now you have gain access to the server and uploaded your shell successfully.
- Shell --> You can find shells here
- User Agent Switcher Addon --> For Chrome or FireFox
- Hosted Website that allows PHP --> 000WebHost, Zymic, 110MB
Here are some google dorks to find the vulnerability :
Now we have to create a new user agent and put in User Agent field the following code :
and for other fields remove them, so now create another user agent and in User Agent field put the one following codes but i will use the first one :
Remmember to change the path in the code to your site and when you upload your shell it must be in .txt not .php format so that the code can read & excute it.
To check if website is vulnerable write ../ in after the paremeter like this
So after getting the error remove ../ and replace with it /etc/passwd like
now change your user agent to the first created user agent that contain <?php phpinfo(); ?> and reload the page , if you got a text similar to PHP VERSION then the site has excuted the code.
So Uploading the shell is the easy same as the above one we have to change our user agent to the second one we created and remmember to fix the paths in your user agent and reload the page.
To access your shell go to
Comments
Post a Comment