Monday, January 31, 2011

RFI (Remote file Inclusion)

Well friends today i am writing about how to hack a website which is RFI vulnerable . RFI means you can upload or link any remote file to the website. If you are lucky enough then you will be able to execute your script as a result you can own that server or you can deface that website completely. If the server is unpatched then it can be exploited using this vulnerability. This method is as powerful as SQL injection and requires a little brain compared to later. So guys lets have a look on how to get a RFI vulnerable site and how to hack it :)

Before going below make sure that you are using strong proxy :P

To find a RFI vulnerable website you can use google dorks. If you need dorks then mail me i'll send you huge list of dorks .
for example :
http://targetsite.com/index.php?page=home


you can easily guess what above url is doing , it simply fetches some text data from server and displaying it in webpage. This is the stage where you need a little brain and your creativity :P
let's say i am changing above url as :



http://targetsite.com/index.php?page=http://www.google.com

If you are redirected to google's page then you got RFI vulnerability is site woooohhhhhhh.....

real example :
http://www.cbspk.com/v2/index.php?page=http://www.google.com.
This site is RFI vulnerable but server is patched

Don't get too much excited because now real stuff starts. so keep ypur eyes open.
Now what you all need to do is upload your shell in your server and redirect target site to that shell. If your shell successfully executes then its time to party....now you can handle your target site. If your shell does not executes then dont worry try once more by adding nullbyte , even if u dont succeed try using changing shells extension like shell.php to shell.php;jpg.


NOTE:shell will only execute if server has php support and is unpatched.


Now here you may also need some basic knowledge about bash commands because now days most of the servers are on LINUX.
i wish you happy hacking :=)

No comments:

Post a Comment