CA License — 1 vulnerability check

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

← All products · Feeds on GitHub

CA License Service 1.53–1.61.8 Multiple Remote Buffer Overflows

CVECVE-2005-0581, CVE-2005-0582, CVE-2005-0583
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Servicesunknown
Detectionset_var, tcp_open, tcp_send, sleep, tcp_close, script, match · highest QoD 70
Feedtests/vulnerabilities/ca-license/CVE-2005-0581.yaml

The Computer Associates License Client and Server (lic98rmt, shipped with BrightStor ARCserve, eTrust, Unicenter and other CA products) listen on TCP 10202-10204. Versions 1.53 through 1.61.8 overflow stack buffers on long GETCONFIG / GCR fields (CVE-2005-0581), on invalid characters in a GETCONFIG file name (CVE-2005-0582) and on a malformed GCR checksum (CVE-2005-0583), each letting an unauthenticated remote attacker run code as SYSTEM. Fixed in 1.61.9.

What the test sends: it opens one TCP connection, reads the greeting the License Server sends on connect (a client agent stays silent), then sends the service's own benign request `A0 GETCONFIG SELF 0<EOM>` — the same request the License Server sends to every peer. If no answer carrying a version arrives within 500 ms, it waits 1.5 s and asks once more on the same connection, so a slow service is still read.

What confirms the finding: a `VERSION<n x.y.z>` field in the greeting or the reply whose version lies between 1.53 and 1.61.8 (compared numerically). The finding names the version and the operating system (`OS<…>`) the service reports. Services that answer without such a field, or with 1.61.9 or later, are not reported.

This is a version check (QoD 70) on purpose: all three bugs are memory corruptions that only a crash or injected code would prove, so no overflow is ever sent and the reply is only read. `category: rce` classifies the bugs; the probe itself is passive (not tagged `intrusive`). The ports are matched as service `unknown`, since port scanners have no name or version probe for this protocol.

How noctis detects it

  1. Opens a persistent TCP/TLS socket
  2. Sends A0 GETCONFIG SELF 0<EOM> on the open socket
  3. Sends A0 GETCONFIG SELF 0<EOM> on the open socket
  4. Parses / computes the next value with a Rhai script
  5. Checks ver.version for ^1\. → finding QoD 70: CA License service answered GETCONFIG with VERSION … (OS '…'), within the affected range 1.53–1.61.8 (GETCONFIG/GCR stack overflows fixed i…

References:

Feed source — tests/vulnerabilities/ca-license/CVE-2005-0581.yaml
# Detection logic ported from the OpenVAS/Greenbone NVT
# pre2008/CA_License_Service_Stack_Overflow.nasl (OID 1.3.6.1.4.1.25623.1.0.17307,
# GPL-2.0-only). Kept as a comment: the description is product documentation.
uid: c13c24a9-131a-4b4e-a5e0-9df0b9cf494e
name: "CA License Service 1.53–1.61.8 Multiple Remote Buffer Overflows (CVE-2005-0581)"
description: |
  The Computer Associates License Client and Server (lic98rmt, shipped with
  BrightStor ARCserve, eTrust, Unicenter and other CA products) listen on TCP
  10202-10204. Versions 1.53 through 1.61.8 overflow stack buffers on long
  GETCONFIG / GCR fields (CVE-2005-0581), on invalid characters in a GETCONFIG
  file name (CVE-2005-0582) and on a malformed GCR checksum (CVE-2005-0583),
  each letting an unauthenticated remote attacker run code as SYSTEM. Fixed in
  1.61.9.

  What the test sends: it opens one TCP connection, reads the greeting the
  License Server sends on connect (a client agent stays silent), then sends the
  service's own benign request `A0 GETCONFIG SELF 0<EOM>` — the same request the
  License Server sends to every peer. If no answer carrying a version arrives
  within 500 ms, it waits 1.5 s and asks once more on the same connection, so a
  slow service is still read.

  What confirms the finding: a `VERSION<n x.y.z>` field in the greeting or the
  reply whose version lies between 1.53 and 1.61.8 (compared numerically). The
  finding names the version and the operating system (`OS<…>`) the service
  reports. Services that answer without such a field, or with 1.61.9 or later,
  are not reported.

  This is a version check (QoD 70) on purpose: all three bugs are memory
  corruptions that only a crash or injected code would prove, so no overflow
  is ever sent and the reply is only read. `category: rce` classifies the bugs;
  the probe itself is passive (not tagged `intrusive`). The ports are matched
  as service `unknown`, since port scanners have no name or version probe for
  this protocol.
cves: [CVE-2005-0581, CVE-2005-0582, CVE-2005-0583]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.30
tags: [computer-associates, ca-license, lic98rmt, brightstor, arcserve, etrust, buffer-overflow, version-check, unauthenticated]
services: [unknown]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2005-0581"
  - "https://nvd.nist.gov/vuln/detail/CVE-2005-0582"
  - "https://nvd.nist.gov/vuln/detail/CVE-2005-0583"
  - "https://seclists.org/bugtraq/2005/Mar/55"
  - "https://www.exploit-db.com/exploits/16744"
  - "https://www.exploit-db.com/papers/16745"

steps:
  # Pre-initialise what the script reads, so a refused connection or a silent
  # peer never leaves an undefined variable (that would abort the test).
  - id: init_op
    action: set_var
    var_name: op
    var_value: {connected: false, banner: ""}

  - id: init_r1
    action: set_var
    var_name: r1
    var_value: {responded: false, response: ""}

  - id: init_r2
    action: set_var
    var_name: r2
    var_value: {responded: false, response: ""}

  - id: init_ver
    action: set_var
    var_name: ver
    var_value: {vulnerable: false, version: "", os: ""}

  # The License Server greets with its own GETCONFIG; a client agent stays silent.
  - id: open
    action: tcp_open
    handle: calic
    port: "{{port}}"
    read_banner: true
    # Runs on unknown ports: a service that never greets costs the whole
    # first-byte wait (timeout_secs), so keep it short.
    timeout_secs: 3
    store_as: op

  # The benign request the License Server itself sends to every peer.
  - id: getconfig
    action: tcp_send
    handle: calic
    send: "A0 GETCONFIG SELF 0<EOM>\r\n"
    condition: "op.connected == true"
    store_as: r1

  # No VERSION yet (reply later than the 500 ms read): wait, ask once more and
  # read whatever arrived meanwhile.
  - id: wait_late
    action: sleep
    duration_ms: 1500
    condition: "op.connected == true && !ereg(\"VERSION<\", \"\" + op.banner + r1.response)"

  - id: getconfig_again
    action: tcp_send
    handle: calic
    send: "A0 GETCONFIG SELF 0<EOM>\r\n"
    condition: "op.connected == true && !ereg(\"VERSION<\", \"\" + op.banner + r1.response)"
    store_as: r2

  - id: close
    action: tcp_close
    handle: calic

  # VERSION<3 1.61.0> — the second field is the lic98rmt version.
  - id: version
    action: script
    store_as: ver
    code: |
      let text = "";
      for part in [op.banner, r1.response, r2.response] {
        if type_of(part) == "string" { text += part + "\n"; }
      }
      // Missing groups come back as "" (eregmatch), so m always has 5 entries on a match.
      let m = eregmatch("VERSION<[0-9]+ ([0-9]+)\\.([0-9]+)(\\.([0-9]+))?>", text, false);
      if m.len() < 5 {
        #{ vulnerable: false, version: "", os: "" }
      } else {
        let major = int(m[1]);
        let minor = int(m[2]);
        let patch = if m[4] == "" { 0 } else { int(m[4]) };
        let vuln = major == 1 && ((minor >= 53 && minor <= 60) || (minor == 61 && patch <= 8));
        let o = eregmatch("OS<([^>]*)>", text, false);
        let os = if o.len() > 1 { o[1] } else { "" };
        #{ vulnerable: vuln, version: m[1] + "." + m[2] + m[3], os: os }
      }

  - id: vulnerable_version
    action: match
    source: ver.version
    pattern: "^1\\."
    condition: "ver.vulnerable == true"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.45
        qod: 70
        evidence: "CA License service answered GETCONFIG with VERSION {{ver.version}} (OS '{{ver.os}}'), within the affected range 1.53–1.61.8 (GETCONFIG/GCR stack overflows fixed in 1.61.9; not triggered, it would crash the service)."

View these feeds on GitHub