the last unbiased stronghold

e107-varoverwrite.txt

e107-varoverwrite.txt
Posted Aug 8, 2008
Authored by James Bercegay | Site gulftech.org

e107 versions 0.7.11 and below suffer from an arbitrary variable overwriting vulnerability.

tags | advisory, arbitrary
MD5 | 64f91d10753297771dc6bbc3da37f21e

e107-varoverwrite.txt

Change Mirror Download
##########################################################
# GulfTech Security Research August 07, 2008
##########################################################
# Vendor : Steve Dunstan
# URL : http://www.e107.org/
# Version : e107 <= 0.7.11
# Risk : Arbitrary Variable Overwriting
##########################################################


Description:
e107 is a popular full featured content management system written
in php. Unfortunately e107 suffers from an arbitrary variable
overwriting issue within it's download.php file that allows a number
of possible attacks to happen including, but possibly not limited to,
arbitrary php code execution and SQL Injection. No authentication
is required to exploit the issue and it can be exploited regardless
of php magic quotes settings. All users are encouraged to upgrade
their e107 installations as soon as possible.


Arbitrary Variable Overwriting:
There is an arbitrary variable overwrite issue in download.php that
is the result of unsafe usage of the php extract() function. Let's
have a look at the code located in download.php @ lines 85-86

case 'list' : // Category-based listing
if (isset($_POST['view'])) extract($_POST);

As we see from the above code it is very much possible to overwrite
any variables declared up to this point, but what is the real risk
here? What attacks are possible because of this issue?

view=1&id=-99') UNION SELECT concat(user_name,char(58), user_password),
2,3,4 FROM e107_user WHERE user_id=1/*

One possible attack could involve an attacker sending a post request
to the downloads category view page (download.php?list.1 for example)
with the above data as the post contents, and as a result the username
and pass hash will be displayed in the page title. This SQL Injection
does require magic quotes to be set to it's default value of off.

view=1&action=maincats&execute=aWQ=&template_load_core=echo%20exec
(base64_decode($_POST[execute]));

In addition to the SQL Injection is an arbitrary php code execution
vulnerability. I found that it is possible to execute arbitrary php
code by sending a post request to the downloads category view page
with the above data as the post contents. The above example will
successfully execute the "id" shell command regardless if php magic
quotes gpc settings. A valid download category must be available
though, but this is trivial since an attacker can use the previously
explained SQL Injection to gain admin credentials and add a download
category. Other attacks may be possible though since a majority of
the important variables within the script are at risk.



Solution:
A fix for the issue mentioned in this advisory can be found in the
public e107 CVS repository, or accessed directly at the link below.

http://e107.cvs.sourceforge.net/e107/e107_0.7/download.php?r1=1.95&r2=1.96&view=patch&pathrev=MAIN



Credits:
James Bercegay of the GulfTech Security Research Team



Related Info:
The original advisory can be found at the following location
http://www.gulftech.org/?node=research&article_id=00122-08072008

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close