NetDynamics — 1 vulnerability check
noctis ships 1 vulnerability check for NetDynamics, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
NetDynamics ndcgi.exe reusable session ID
| CVE | CVE-2001-0922 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 70 |
| Feed | tests/vulnerabilities/netdynamics/CVE-2001-0922.yaml |
Detects the ndcgi.exe CGI gateway of a NetDynamics 4.x / 5.x application server. NetDynamics issues a session ID (the SPIDERSESSION and uniqueValue values of its login page) before the user logs in and keeps it valid for the account that logs in next, so an attacker who fetched the login page can replay those values a few seconds after a legitimate login and run application commands as that user (CVE-2001-0922). The vendor never released a fix. The test requests ndcgi.exe under the web root, /cgi-bin, /scripts, /cgi and /cgi-win and reports one that answers (HTTP 200 with a page, or a redirect to an application) while a random .exe name in the same directory is refused (404, 403, 401…), so servers that answer every path are not reported. No session is replayed.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/ndcgi.exe - HTTP(S) request
GET {{dir}}/{{ctl}}.exe - Parses / computes the next value with a Rhai script
- Checks
verdictfor^NDCGI_PRESENT$→ finding QoD 70: NetDynamics ndcgi.exe present — CVE-2001-0922
References:
Feed source — tests/vulnerabilities/netdynamics/CVE-2001-0922.yaml
# NetDynamics 4.x / 5.x application server — ndcgi.exe session ID reuse
# (CVE-2001-0922, NMRC advisory "NetDynamics Session ID is Reusable",
# Bugtraq 2001-11-26)
#
# Credit: target file adapted from Greenbone's `pre2008/ndcgi.nasl`
# (GPL-2.0-only), which reports when /ndcgi.exe is installed
# (http_is_cgi_installed_ka) under / and the CGI directories, unless a random
# .exe name is "installed" too.
#
# Advisory facts: ndcgi.exe is the CGI front end of a NetDynamics
# application (/cgi-bin/ndcgi.exe/<mapping>/<command>). Its login page hands
# out a session ID (hidden SPIDERSESSION and uniqueValue fields) before
# anyone logs in, and the state table keeps that ID valid for the account
# that logs in next for about 15 seconds. An attacker who loads the login
# page, waits for a user to log in and replays both values in a command
# request runs that command with the user's rights. Tested on NetDynamics
# 4.x and 5.x on Solaris 7/8; Sun never shipped a fix (product end of life).
#
# Why no exploitation proof: the replay only works while a real user logs in
# within the 15 s window, and a hijacked session would act as that user — a
# scanner must not do that. The application's mappings are site-specific
# and no NetDynamics version is ever disclosed, so this is a presence check
# at QoD 70; with no fix ever released, any ndcgi.exe found is affected.
#
# Better than the reference check:
# - a random sibling name with the same extension in the same directory is
# requested as a control and must be refused (see below), so
# catch-all / soft-404 servers are not reported; a control that gets no
# reply gives no finding (fail-closed);
# - a 200 that is a file download (binary content type or a body starting
# with "MZ") is not reported: a directory without execute permission that
# serves the program instead of running it;
# - a gateway that redirects (301/302/303/307/308) to its default application
# counts as present, the control still has to be refused (400/401/403/404/
# 405/410 — a 429 rate limit or 408 timeout is not a refusal);
# - /cgi and /cgi-win are probed besides /, /cgi-bin and /scripts.
uid: 367b7d32-5906-46ca-9325-4898a9e28604
name: "NetDynamics ndcgi.exe reusable session ID (CVE-2001-0922)"
description: |
Detects the ndcgi.exe CGI gateway of a NetDynamics 4.x / 5.x application
server. NetDynamics issues a session ID (the SPIDERSESSION and uniqueValue
values of its login page) before the user logs in and keeps it valid for
the account that logs in next, so an attacker who fetched the login page
can replay those values a few seconds after a legitimate login and run
application commands as that user (CVE-2001-0922). The vendor never
released a fix. The test requests ndcgi.exe under the web root, /cgi-bin,
/scripts, /cgi and /cgi-win and reports one that answers (HTTP 200 with a page, or a
redirect to an application) while a random .exe name in the same
directory is refused (404, 403, 401…), so servers that answer every path
are not reported. No session is replayed.
cves: [CVE-2001-0922]
cvss: 7.5 # NVD has only a CVSS v2 score
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [netdynamics, ndcgi, cgi, session-hijacking, auth-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2001-0922"
- "https://diswww.mit.edu/menelaus/bt/23254"
steps:
# Random sibling name for the soft-404 control, shared by every location.
- 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 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", "/cgi", "/cgi-win"]
var: dir
- id: init-control
action: set_var
var_name: control
var_value: {status: 0}
- id: probe-gateway
action: http_request
method: GET
path: "{{dir}}/ndcgi.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 || (page.status >= 301 && page.status <= 303) || page.status == 307 || page.status == 308"
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 hit = page.status == 200 || (page.status >= 301 && page.status <= 303) || page.status == 307 || page.status == 308;
// A gateway that runs answers with a page; a program the server only
// hands out (directory without execute permission) is a download:
// binary content type or the "MZ" header of a Windows binary.
if page.status == 200 {
let ct = "";
if "content-type" in page.headers { ct = tolower(page.headers["content-type"]); }
if ct.contains("octet-stream") || ct.contains("msdownload") || ct.contains("msdos-program") || ct.contains("x-dosexec") || page.body.starts_with("MZ") { hit = false; }
}
// Refused = 400/401/403/404/405/410; a rate limit (429) or timeout (408)
// on the second request is not a refusal.
if hit && [400, 401, 403, 404, 405, 410].contains(control.status) { v = "NDCGI_PRESENT"; }
v
store_as: verdict
- id: gateway-present
action: match
source: verdict
pattern: '^NDCGI_PRESENT$'
on_match:
finding:
title: "NetDynamics ndcgi.exe present — CVE-2001-0922"
description: "{{dir}}/ndcgi.exe answered while a random .exe name in the same directory was refused. NetDynamics 4.x and 5.x keep a session ID handed out on the login page (SPIDERSESSION / uniqueValue) valid for the next user who logs in, so an attacker can replay it within about 15 seconds of a login and act as that user (CVE-2001-0922). No fix was ever released. No session was replayed."
remediation: "Retire NetDynamics (end of life, never fixed) or take ndcgi.exe off the web server. Until then, configure NetDynamics to refuse multiple logins for the same account so a hijack is at least visible to the user, and restrict the application to trusted networks."
confidence_delta: 0.40
qod: 70
evidence: "GET {{dir}}/ndcgi.exe returned HTTP {{page.status}}; control GET {{dir}}/{{ctl}}.exe returned HTTP {{control.status}}"
stop: true