Lucent VitalSuite — 1 vulnerability check

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

← All products · Feeds on GitHub

Lucent VitalSuite VsSetCookie.exe authentication bypass

CVECVE-2002-0236
Severityhigh · CVSS 7.5
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/lucent-vitalsuite/CVE-2002-0236.yaml

Detects VsSetCookie.exe of Lucent VitalSuite 8.0 to 8.2 (VitalNet, VitalEvent, VitalHelp/VitalAnalysis), which hands out a valid session cookie for any user named in the request without asking for a password (CVE-2002-0236). The test requests VsSetCookie.exe under the web root, /cgi-bin and /scripts and reports one that answers with HTTP 200 with a page (not a file download) while a random name with the same extension in the same directory is refused with a 4xx status, so servers that answer every path are not reported. When the scan request carries credentials with a user name, it also calls VsSetCookie.exe?vsuser=<that user> and confirms the bypass when a cookie comes back for that account, without any password, while a random non-existent user gets none.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/VsSetCookie.exe
  3. HTTP(S) request GET {{dir}}/{{ctl}}.exe
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET {{dir}}/VsSetCookie.exe?vsuser={{cred_username}}
  6. HTTP(S) request GET {{dir}}/VsSetCookie.exe?vsuser={{ctl}}
  7. Parses / computes the next value with a Rhai script
  8. Checks verdict for ^VSSETCOOKIE_BYPASS$ → finding QoD 75: Lucent VitalSuite VsSetCookie.exe issues session cookies without a password — CVE-2002-0236
  9. Checks verdict for ^VSSETCOOKIE_PRESENT$ → finding QoD 70: Lucent VitalSuite VsSetCookie.exe present — CVE-2002-0236

References:

Feed source — tests/vulnerabilities/lucent-vitalsuite/CVE-2002-0236.yaml
# Lucent VitalSuite 8.0–8.2 (VitalNet, VitalEvent, VitalHelp/VitalAnalysis)
# VsSetCookie.exe authentication bypass (CVE-2002-0236, BID 3784, ISS X-Force
# 7936, Bugtraq 2002-02)
#
# Credit: target file adapted from Greenbone's `pre2008/vssetcookie.nasl`
# (GPL-2.0-only, John Lampe), which reports when /VsSetCookie.exe is installed
# (http_is_cgi_installed_ka) under / and the CGI directories, and documents the
# manual test `/cgi-bin/VsSetCookie.exe?vsuser=<user name>`.
#
# CVE facts (NVD): a direct HTTP request to VsSetCookie.exe returns a valid
# session cookie for the user named in the request, without any password, so
# whoever guesses a user name gets that user's access to the VitalSuite web
# console. NVD has a CVSS v2 score only (7.5).
#
# Detection:
#  - presence (QoD 70): VsSetCookie.exe answers HTTP 200 with a page while a
#    random sibling .exe name in the same directory is refused with a 4xx
#    status;
#  - exploitation proof (QoD 75, only when the scan request carries a user
#    name in `credentials`): VsSetCookie.exe?vsuser=<that user> returns a
#    Set-Cookie header while the same request for a random, non-existent user
#    returns none — a session cookie issued for a real account with no
#    password sent. The password of the credentials is never used.
#
# Better than the reference check:
#  - the random sibling control suppresses catch-all / soft-404 servers that
#    answer 200 for any name; a control that gets no reply gives no finding;
#  - a 200 that is a file download (binary content type or an "MZ" body) is
#    not reported (installer mirror, directory without execute permission);
#  - with an operator-supplied user name the bypass itself is proven, and a
#    program that hands a cookie to any name (not tied to an account) stays at
#    the presence level.
uid: 8dc350ce-73c9-47c4-9a3a-2858571fcddb
name: "Lucent VitalSuite VsSetCookie.exe authentication bypass (CVE-2002-0236)"
description: |
  Detects VsSetCookie.exe of Lucent VitalSuite 8.0 to 8.2 (VitalNet,
  VitalEvent, VitalHelp/VitalAnalysis), which hands out a valid session cookie
  for any user named in the request without asking for a password
  (CVE-2002-0236). The test requests VsSetCookie.exe under the web root,
  /cgi-bin and /scripts and reports one that answers with HTTP 200 with a page
  (not a file download) while a random name with the same extension in the
  same directory is refused with a 4xx status, so servers that answer every
  path are not reported. When the scan request carries credentials with a user
  name, it also calls VsSetCookie.exe?vsuser=<that user> and confirms the
  bypass when a cookie comes back for that account, without any password,
  while a random non-existent user gets none.
cves: [CVE-2002-0236]
cvss: 7.5
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [lucent, vitalsuite, vitalnet, cgi, auth-bypass, session-cookie]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2002-0236"
  - "http://www.securityfocus.com/bid/3784"
  - "http://www.iss.net/security_center/static/7936.php"
  - "http://marc.info/?l=bugtraq&m=101294507827698&w=2"

steps:
  # Random names shared by every location: the sibling program for the
  # soft-404 control and the non-existent user for the cookie control.
  - id: mint-control
    action: script
    code: '"noctis" + rand_hex(8)'
    store_as: ctl

  # ── Per location: this step and every following one ──
  # Pre-initialised so a skipped or failed request leaves no undefined
  # variable behind.
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0}
    loop:
      over: ["", "/cgi-bin", "/scripts"]
      var: dir

  - id: init-control
    action: set_var
    var_name: control
    var_value: {status: 0}

  - id: init-user
    action: set_var
    var_name: user_cookie
    var_value: {status: 0}

  - id: init-ghost
    action: set_var
    var_name: ghost_cookie
    var_value: {status: 0}

  - id: probe-program
    action: http_request
    method: GET
    path: "{{dir}}/VsSetCookie.exe"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: page

  - id: probe-control
    action: http_request
    method: GET
    path: "{{dir}}/{{ctl}}.exe"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "page.status == 200"
    store_as: control

  - id: presence
    action: script
    code: |
      let present = false;
      if page.status == 200 && control.status >= 400 && control.status < 500 {
        // A program that runs answers with a page; a file the server only
        // hands out is a download: binary content type or the "MZ" header.
        let ct = "";
        if "content-type" in page.headers { ct = tolower(page.headers["content-type"]); }
        let download = ct.contains("octet-stream") || ct.contains("msdownload") || ct.contains("msdos-program") || ct.contains("x-dosexec") || page.body.starts_with("MZ");
        present = !download;
      }
      present
    store_as: present

  # Bypass proof: a cookie for the operator's account, none for a ghost user.
  - id: probe-user
    action: http_request
    method: GET
    path: "{{dir}}/VsSetCookie.exe?vsuser={{cred_username}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'present && cred_enabled && is_def_var("cred_username")'
    store_as: user_cookie

  - id: probe-ghost
    action: http_request
    method: GET
    path: "{{dir}}/VsSetCookie.exe?vsuser={{ctl}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'present && user_cookie.status > 0 && "set-cookie" in user_cookie.headers'
    store_as: ghost_cookie

  # Fixed verdict strings as the match source, so no cookie value reaches the
  # finding.
  - id: verdict
    action: script
    code: |
      let v = "";
      if present {
        v = "VSSETCOOKIE_PRESENT";
        if user_cookie.status > 0 && "set-cookie" in user_cookie.headers && ghost_cookie.status > 0 && !("set-cookie" in ghost_cookie.headers) {
          v = "VSSETCOOKIE_BYPASS";
        }
      }
      v
    store_as: verdict

  - id: bypass-confirmed
    action: match
    source: verdict
    pattern: '^VSSETCOOKIE_BYPASS$'
    on_match:
      finding:
        title: "Lucent VitalSuite VsSetCookie.exe issues session cookies without a password — CVE-2002-0236"
        description: "{{dir}}/VsSetCookie.exe returned a session cookie for the scan's user name with no password sent, while a random non-existent user name got none. Anyone who knows or guesses a user name can log in to the VitalSuite web console as that user (CVE-2002-0236)."
        remediation: "Upgrade Lucent VitalSuite past 8.2 or apply the vendor fix for VsSetCookie.exe, or remove VsSetCookie.exe from the web server's CGI directory and restrict access to the VitalSuite web console to trusted hosts."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{dir}}/VsSetCookie.exe?vsuser=<scan user> returned HTTP {{user_cookie.status}} with a Set-Cookie header; GET {{dir}}/VsSetCookie.exe?vsuser={{ctl}} (random user) returned HTTP {{ghost_cookie.status}} without one"
      stop: true

  - id: program-present
    action: match
    source: verdict
    pattern: '^VSSETCOOKIE_PRESENT$'
    on_match:
      finding:
        title: "Lucent VitalSuite VsSetCookie.exe present — CVE-2002-0236"
        description: "{{dir}}/VsSetCookie.exe answered, while a random .exe name in the same directory was refused. In Lucent VitalSuite 8.0 to 8.2 this program returns a valid session cookie for any user named in the request without a password (CVE-2002-0236). The bypass itself was not confirmed: the scan request carried no user name, or no cookie tied to that account came back."
        remediation: "Upgrade Lucent VitalSuite past 8.2 or apply the vendor fix for VsSetCookie.exe, or remove VsSetCookie.exe from the web server's CGI directory and restrict access to the VitalSuite web console to trusted hosts."
        confidence_delta: 0.40
        qod: 70
        evidence: "GET {{dir}}/VsSetCookie.exe returned HTTP {{page.status}}; control GET {{dir}}/{{ctl}}.exe returned HTTP {{control.status}}"
      stop: true

View these feeds on GitHub