DeskNow — 1 vulnerability check

noctis ships 1 vulnerability check for DeskNow, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

DeskNow Mail and Collaboration Server attachment upload / file delete directory traversal

CVECVE-2005-0332
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/desknow/CVE-2005-0332.yaml

Reads the DeskNow Mail and Collaboration Server start page (/desknow/index.html, then /index.html), extracts the version printed after the DeskNow® mark and compares it numerically with 2.5.14, the first release that fixes the directory traversals in the webmail attachment upload (attachment.do AttachmentsKey, which lets a logged-in user write a JSP page into the web root and run it) and in the document repository delete (file.do select_file, arbitrary file deletion). Version-based: nothing is uploaded or deleted and no login is attempted.

How noctis detects it

  1. HTTP(S) request GET /desknow/index.html
  2. HTTP(S) request GET /index.html
  3. Parses / computes the next value with a Rhai script
  4. Checks dn.version for ^[0-9] → finding QoD 70: DeskNow … — attachment upload / file delete directory traversal (CVE-2005-0332)
Feed source — tests/vulnerabilities/desknow/CVE-2005-0332.yaml
# DeskNow Mail and Collaboration Server directory traversals — CVE-2005-0332
#
# DeskNow (Ventia, Java webmail/groupware on Tomcat) 2.5.12 and earlier let a
# logged-in webmail user write an attachment anywhere through "../" in the
# AttachmentsKey parameter of attachment.do (a JSP dropped under
# /desknow/jsp/ then runs as LOCAL SYSTEM on the default Windows install),
# and delete any file through "../" in the select_file parameter of file.do
# (document repository). Advisory: SIG^2 G-TEC, Bugtraq 2005-02-02
# (seclists.org/bugtraq/2005/Feb/25). 2.5.13 was an incomplete fix; 2.5.14
# (2005-01-27) is the fixed release.
#
# Why a version check (QoD 70): both flaws need a webmail login, and the only
# behavioural proofs are the exploit itself — writing a file outside the
# attachment directory, or deleting one. The product is closed source and the
# advisory does not give the compose/upload request layout, so no benign
# in-band proof can be built. The feed reads the version DeskNow prints on its
# start page ("DeskNow&reg; <version>") and compares it with 2.5.14.
#
# Improvements over the source NASL:
#   - The NASL matches the version with a prefix regex on the whole page; the
#     feed extracts the version after the product token and compares it
#     component by component (2.5.140 / 2.50.1 cannot read as vulnerable), and
#     accepts the literal ® and &#174; forms of the mark as well as &reg;.
#   - Both /desknow/index.html (default context) and /index.html (DeskNow
#     deployed as the ROOT context) are read; the NASL needed the web-mirror
#     results to find the root install.
#
# CVSS: CVE-2005-0332 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT pre2008/desknow_multiple_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.16308, GPL-2.0-only).
uid: 17b67f14-3715-431a-b0c6-62e3151a6ef1
name: "DeskNow Mail and Collaboration Server attachment upload / file delete directory traversal (CVE-2005-0332)"
description: "Reads the DeskNow Mail and Collaboration Server start page (/desknow/index.html, then /index.html), extracts the version printed after the DeskNow® mark and compares it numerically with 2.5.14, the first release that fixes the directory traversals in the webmail attachment upload (attachment.do AttachmentsKey, which lets a logged-in user write a JSP page into the web root and run it) and in the document repository delete (file.do select_file, arbitrary file deletion). Version-based: nothing is uploaded or deleted and no login is attempted."
category: rce
cves: [CVE-2005-0332]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [desknow, webmail, java, directory-traversal, file-upload, file-delete, version-check]
services: [http, https]
author: noctis
version: "1.0.0"

steps:
  # Pre-set so the version script can test them when a request failed.
  - id: init-ctx
    action: set_var
    var_name: dn_ctx
    var_value: false

  - id: init-root
    action: set_var
    var_name: dn_root
    var_value: false

  - id: page-desknow
    action: http_request
    method: GET
    path: "/desknow/index.html"
    port: "{{port}}"
    tls_insecure: true
    store_as: dn_ctx

  - id: page-root
    action: http_request
    method: GET
    path: "/index.html"
    port: "{{port}}"
    tls_insecure: true
    store_as: dn_root

  # Version after the product mark, from whichever start page carries it.
  # Vulnerable: anything below 2.5.14 (2.5.13 was an incomplete fix).
  - id: version
    action: script
    store_as: dn
    code: |
      let pages = [];
      if type_of(dn_ctx) == "map" && dn_ctx.status == 200 { pages.push(dn_ctx.body); }
      if type_of(dn_root) == "map" && dn_root.status == 200 { pages.push(dn_root.body); }
      let res = #{ ok: false, version: "", vuln: false };
      for body in pages {
        if res.ok { break; }
        let m = eregmatch("DeskNow(?:&reg;|&#174;|\\x{00AE})\\s*([0-9]+)\\.([0-9]+)(?:\\.([0-9]+))?(?:[^0-9.]|$)", body);
        if type_of(m) == "array" && m.len() >= 3 {
          let a = int(m[1]); let b = int(m[2]);
          let c = 0;
          let v = m[1] + "." + m[2];
          if m.len() >= 4 && m[3] != "" { c = int(m[3]); v += "." + m[3]; }
          let vuln = a < 2 || (a == 2 && (b < 5 || (b == 5 && c < 14)));
          res = #{ ok: true, version: v, vuln: vuln };
        }
      }
      res

  - id: version-match
    action: match
    source: dn.version
    pattern: "^[0-9]"
    condition: "dn.ok == true && dn.vuln == true"
    on_match:
      finding:
        confidence_delta: 0.35
        qod: 70
        title: "DeskNow {{dn.version}} — attachment upload / file delete directory traversal (CVE-2005-0332)"
        description: "The DeskNow Mail and Collaboration Server start page reports version {{dn.version}}, older than 2.5.14. In these releases a logged-in webmail user can write an attachment outside the temporary directory through '../' in the AttachmentsKey parameter of attachment.do — for example a JSP page under /desknow/jsp/ that then runs with the server's privileges (LOCAL SYSTEM on a default Windows install) — and can delete any file through '../' in the select_file parameter of file.do."
        remediation: "Upgrade DeskNow Mail and Collaboration Server to 2.5.14 or later."
        evidence: "DeskNow version {{dn.version}} read from the start page (fixed in 2.5.14)"
      stop: true

View these feeds on GitHub