Trend Micro OfficeScan — 1 vulnerability check

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

← All products · Feeds on GitHub

Trend Micro OfficeScan Unauthenticated NT Domain Disclosure

CVECVE-2017-14085
Severitymedium · CVSS 5.3
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/trend-micro-officescan/CVE-2017-14085.yaml

Tests the Trend Micro OfficeScan 11.0 / XG (12.0) web console for the unauthenticated information disclosure in the remote-install CGI cgiGetNTDomain.exe, fixed by the September 2017 OfficeScan patches. The feed sends a GET for /officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe, and for /console/RemoteInstallCGI/cgiGetNTDomain.exe when the console is published at the web root, without any login or session cookie. A 200 reply whose JSON document carries ERROR_CODE 0 and a RESPONSE.NODES list confirms that the console hands out the NT domains and workgroups of the network to unauthenticated users. An error document without the domain list is not reported. Only the domain list is read; nothing is changed on the server.

How noctis detects it

  1. HTTP(S) request GET /officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET /console/RemoteInstallCGI/cgiGetNTDomain.exe
  4. Parses / computes the next value with a Rhai script
  5. Parses / computes the next value with a Rhai script
  6. Checks hit for ^/.*cgiGetNTDomain\.exe returned [0-9]+ NT domain → finding QoD 75: Trend Micro OfficeScan Unauthenticated NT Domain Disclosure (CVE-2017-14085)

References:

Feed source — tests/vulnerabilities/trend-micro-officescan/CVE-2017-14085.yaml
# Trend Micro OfficeScan unauthenticated NT domain disclosure — CVE-2017-14085
#
# The OfficeScan 11.0 / XG (12.0) web console ships the remote-install CGI
# /officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe. Before the
# September 2017 fixes it answers without any console session and returns the
# NT domains / workgroups the server sees on its network, as a JSON document
# ({"ERROR":{"ERROR_CODE":0},"RESPONSE":{"NODES":[{"NAME":...}]}}).
#
# Detection (benign, read-only): GET the CGI without credentials, under
# /officescan (default install) then at the web root, and require a 200 reply
# carrying ERROR_CODE 0 and a RESPONSE.NODES list. QoD 75 (response analysis).
#
# CVE mapping: the source check is filed under CVE-2017-14083..14089 (the whole
# October 2017 OfficeScan bulletin), but the request it sends only proves
# CVE-2017-14085 (NT domain / PHP version disclosure, NVD 5.3). The other IDs
# are a key-file download, MitM, start-remote-process, Host header injection,
# local privilege escalation and memory corruption — none of them is tested
# here, so only CVE-2017-14085 is reported.
#
# Improvements over the source check:
#   - The source matches any "Content-Length" header plus one of the words
#     NODES / NAME / ERROR_CODE / RESPONSE anywhere in the reply, so an error
#     document ({"ERROR":{"ERROR_CODE":3}}) or a page quoting one of these
#     words is reported. The feed requires ERROR_CODE 0 AND a NODES list.
#   - The source only runs after a separate product detection found the
#     console. The feed probes the default /officescan path and the root path
#     directly.
#
# Ported from OpenVAS/Greenbone NVT 2017/trendmicro/gb_trend_micro_office_scan_mult_vuln.nasl
# (GPL-2.0-only). Request shape cross-checked with the advisory
# "Trend Micro OfficeScan v11.0 and XG (12.0) Unauthorized NT Domain / PHP
# Information Disclosures CVE-2017-14085" (Full Disclosure, 2017-09-29).
uid: e5b5fad0-9c8e-41dc-b06b-b5f3fb237d8b
name: "Trend Micro OfficeScan Unauthenticated NT Domain Disclosure (CVE-2017-14085)"
description: |
  Tests the Trend Micro OfficeScan 11.0 / XG (12.0) web console for the
  unauthenticated information disclosure in the remote-install CGI
  cgiGetNTDomain.exe, fixed by the September 2017 OfficeScan patches. The feed
  sends a GET for /officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe, and
  for /console/RemoteInstallCGI/cgiGetNTDomain.exe when the console is
  published at the web root, without any login or session cookie. A 200 reply
  whose JSON document carries ERROR_CODE 0 and a RESPONSE.NODES list confirms
  that the console hands out the NT domains and workgroups of the network to
  unauthenticated users. An error document without the domain list is not
  reported. Only the domain list is read; nothing is changed on the server.
cves: [CVE-2017-14085]
cvss: 5.3
severity: medium
category: exposure
confidence_base: 0.30
tags: [trend-micro, officescan, apex-one, information-disclosure, nt-domain, iis, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14085"
  - "https://seclists.org/fulldisclosure/2017/Sep/85"
  - "https://success.trendmicro.com/solution/1118372"
  # OpenVAS/Greenbone NASL 2017/trendmicro/gb_trend_micro_office_scan_mult_vuln.nasl (GPL-2.0-only)

steps:
  # ── Pre-initialise every value read later (undefined vars abort/skip) ────
  - id: init-r1
    action: set_var
    var_name: nt_r1
    var_value: {status: 0, body: ""}

  - id: init-r2
    action: set_var
    var_name: nt_r2
    var_value: {status: 0, body: ""}

  - id: init-hit1
    action: set_var
    var_name: hit1
    var_value: ""

  - id: init-hit2
    action: set_var
    var_name: hit2
    var_value: ""

  # ── Default install: console under /officescan ───────────────────────────
  - id: probe-officescan
    action: http_request
    method: GET
    path: "/officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: nt_r1

  - id: check-officescan
    action: script
    condition: "nt_r1.status == 200"
    store_as: hit1
    code: |
      let b = if type_of(nt_r1.body) == "string" { nt_r1.body } else { "" };
      if ereg("\"ERROR_CODE\"\\s*:\\s*\"?0\"?\\s*[,}]", b) && ereg("\"RESPONSE\"\\s*:\\s*\\{[^}]*?\"NODES\"\\s*:\\s*\\[", b) {
        let names = split(b, "\"NAME\"").len() - 1;
        "/officescan/console/RemoteInstallCGI/cgiGetNTDomain.exe returned " + names + " NT domain name(s)"
      } else {
        ""
      }

  # ── Console published at the web root ────────────────────────────────────
  - id: probe-root
    action: http_request
    method: GET
    path: "/console/RemoteInstallCGI/cgiGetNTDomain.exe"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hit1 == ""'
    store_as: nt_r2

  - id: check-root
    action: script
    condition: 'hit1 == "" && nt_r2.status == 200'
    store_as: hit2
    code: |
      let b = if type_of(nt_r2.body) == "string" { nt_r2.body } else { "" };
      if ereg("\"ERROR_CODE\"\\s*:\\s*\"?0\"?\\s*[,}]", b) && ereg("\"RESPONSE\"\\s*:\\s*\\{[^}]*?\"NODES\"\\s*:\\s*\\[", b) {
        let names = split(b, "\"NAME\"").len() - 1;
        "/console/RemoteInstallCGI/cgiGetNTDomain.exe returned " + names + " NT domain name(s)"
      } else {
        ""
      }

  # ── Finding ──────────────────────────────────────────────────────────────
  - id: combine
    action: script
    store_as: hit
    code: |
      hit1 + hit2

  - id: report
    action: match
    source: hit
    pattern: "^/.*cgiGetNTDomain\\.exe returned [0-9]+ NT domain"
    on_match:
      finding:
        title: "Trend Micro OfficeScan Unauthenticated NT Domain Disclosure (CVE-2017-14085)"
        description: "An unauthenticated GET to the OfficeScan web console CGI cgiGetNTDomain.exe returned a successful JSON document (ERROR_CODE 0) listing the NT domains and workgroups seen by the server. Unauthenticated users can enumerate the network's Windows domains, which helps target further attacks."
        remediation: "Apply the Trend Micro OfficeScan 11.0 SP1 / XG critical patches of September 2017 (or upgrade to a supported Apex One release), and restrict access to the OfficeScan web console to administration networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "GET without credentials: {{hit}} (ERROR_CODE 0, RESPONSE.NODES list)"
      stop: true

View these feeds on GitHub