Ds3 Authserver — 1 vulnerability check
noctis ships 1 vulnerability check for Ds3 Authserver, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
DS3 Authentication Server ServerAdmin Multiple Vulnerabilities
| CVE | CVE-2013-4096, CVE-2013-4097, CVE-2013-4098 |
|---|---|
| Severity | critical · CVSS 9.1 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/ds3-authserver/ds3-authserver-mult-vuln.yaml |
Tests DS3 Authentication Server for three flaws in its ServerAdmin pages, none of them fixed by a later release. The feed first requires the login page /ServerAdmin/UserLogin.jsp to answer with the "DS3-AuthServer" Server header. It then opens /ServerAdmin/ErrorViewer.jsp with the message parameter set to a random marker: when the error page prints the marker, anyone can put their own text on a page served by the appliance (CVE-2013-4098). It also posts the connectivity form of /ServerAdmin/TestDRConnection.jsp, as an unauthenticated user, and reports the installation path when the reply holds the "-REG-E-OPEN, error opening registry file" error (CVE-2013-4097). When either flaw is confirmed, the authenticated command injection in /ServerAdmin/TestTelnetConnection.jsp (CVE-2013-4096) is reported as well, from the product identification only, since it cannot be tested without an account. The requests only display pages and error messages and change nothing on the server.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /ServerAdmin/UserLogin.jsp - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /ServerAdmin/ErrorViewer.jsp?message={{tok}} - Parses / computes the next value with a Rhai script
- Checks
inj_prooffor^noctis[0-9a-f]{12}$→ finding QoD 75: DS3 Authentication Server ErrorViewer.jsp Error Message Injection (CVE-2013-4098) - HTTP(S) request
POST /ServerAdmin/TestDRConnection.jspwith a crafted body - Parses / computes the next value with a Rhai script
- Checks
leaked_pathfor^/[^<>&\r\n]+$→ finding QoD 75: DS3 Authentication Server TestDRConnection.jsp Installation Path Disclosure (CVE-2013-4097) - Parses / computes the next value with a Rhai script
- Checks
flawedfor^confirmed$→ finding QoD 70: DS3 Authentication Server TestTelnetConnection.jsp Command Injection (CVE-2013-4096)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2013-4096
- https://nvd.nist.gov/vuln/detail/CVE-2013-4097
- https://nvd.nist.gov/vuln/detail/CVE-2013-4098
- https://packetstormsecurity.com/files/121862/DS3-Authentication-Server-Command-Execution.html
Feed source — tests/vulnerabilities/ds3-authserver/ds3-authserver-mult-vuln.yaml
# DS3 Authentication Server — ServerAdmin multiple vulnerabilities
# CVE-2013-4096, CVE-2013-4097, CVE-2013-4098 (advisory by Pedro Andujar,
# 2013-06-02; no fixed release was ever published).
#
# CVE-2013-4098 /ServerAdmin/ErrorViewer.jsp prints the "message" query
# parameter as the error text, without authentication.
# CVE-2013-4097 /ServerAdmin/TestDRConnection.jsp reveals the installation
# path in a "-REG-E-OPEN, error opening registry file <path>"
# error, without authentication.
# CVE-2013-4096 /ServerAdmin/TestTelnetConnection.jsp runs shell
# metacharacters from HOST_NAME — authenticated users only.
#
# Detection (benign, read-only):
# 1. GET /ServerAdmin/UserLogin.jsp must answer 200 with a
# "Server: DS3-AuthServer" header; nothing else runs otherwise.
# 2. GET /ServerAdmin/ErrorViewer.jsp?message=<random marker> — the error
# page (">Error Page<", ">Error Message:") must print this scan's marker.
# CVE-2013-4098, QoD 75.
# 3. POST /ServerAdmin/TestDRConnection.jsp with the advisory's form
# (HOST_NAME=localhost, other fields empty) — the reply must carry the
# "-REG-E-OPEN, error opening registry file </absolute/path>" error.
# CVE-2013-4097, QoD 75.
# 4. CVE-2013-4096 needs a login whose flow is not public, so it is not
# exploited. When step 2 or 3 proved the server runs the old flawed
# ServerAdmin pages, it is reported at QoD 70 (no release fixes it).
#
# Improvements over the source NASL:
# - A random marker per scan instead of the fixed "Message", so a page that
# always shows the same text is not reported.
# - CVE-2013-4097 is tested on its own (the NASL only infers it).
# - Each finding carries the CVE it proves, instead of the three CVEs on one
# error-page check.
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_ds3_authentication_server_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.803710, GPL-2.0-only). Request/response shapes
# from the original advisory (Packet Storm 121862).
uid: ee4c480e-e8e5-4683-aec8-c54a8e1e3462
name: "DS3 Authentication Server ServerAdmin Multiple Vulnerabilities"
description: |
Tests DS3 Authentication Server for three flaws in its ServerAdmin pages,
none of them fixed by a later release. The feed first requires the login
page /ServerAdmin/UserLogin.jsp to answer with the "DS3-AuthServer" Server
header. It then opens /ServerAdmin/ErrorViewer.jsp with the message
parameter set to a random marker: when the error page prints the marker,
anyone can put their own text on a page served by the appliance
(CVE-2013-4098). It also posts the connectivity form of
/ServerAdmin/TestDRConnection.jsp, as an unauthenticated user, and reports
the installation path when the reply holds the "-REG-E-OPEN, error opening
registry file" error (CVE-2013-4097). When either flaw is confirmed, the
authenticated command injection in /ServerAdmin/TestTelnetConnection.jsp
(CVE-2013-4096) is reported as well, from the product identification only,
since it cannot be tested without an account. The requests only display
pages and error messages and change nothing on the server.
cves: [CVE-2013-4096, CVE-2013-4097, CVE-2013-4098]
cvss: 9.1
severity: critical
category: exposure
confidence_base: 0.30
tags: [ds3, authentication-server, content-injection, information-disclosure, jsp]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2013-4096"
- "https://nvd.nist.gov/vuln/detail/CVE-2013-4097"
- "https://nvd.nist.gov/vuln/detail/CVE-2013-4098"
- "https://packetstormsecurity.com/files/121862/DS3-Authentication-Server-Command-Execution.html"
# OpenVAS/Greenbone NASL 2013/gb_ds3_authentication_server_mult_vuln.nasl (GPL-2.0-only)
steps:
# Random marker for this scan (letters and hex digits only).
- id: marker
action: script
code: |
"noctis" + oob_token.sub_string(0, 8) + oob_token.sub_string(9, 4)
store_as: tok
- id: init-login-r
action: set_var
var_name: login_r
var_value: {status: 0, headers: {}, body: ""}
- id: init-ev-r
action: set_var
var_name: ev_r
var_value: {status: 0, body: ""}
- id: init-dr-r
action: set_var
var_name: dr_r
var_value: {status: 0, body: ""}
- id: login-page
action: http_request
method: GET
path: "/ServerAdmin/UserLogin.jsp"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: login_r
- id: identify
action: script
code: |
let srv = "";
if type_of(login_r.headers) == "map" && "server" in login_r.headers {
srv = login_r.headers["server"].to_string();
}
login_r.status == 200 && srv.to_lower().contains("ds3-authserver")
store_as: is_ds3
# ── CVE-2013-4098: error text taken from the message parameter ──────────
- id: error-viewer
action: http_request
condition: "is_ds3"
method: GET
path: "/ServerAdmin/ErrorViewer.jsp?message={{tok}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: ev_r
- id: injection
action: script
code: |
let b = if type_of(ev_r.body) == "string" { ev_r.body } else { "" };
if is_ds3 && ev_r.status == 200 && b.contains(">Error Page<") && b.contains(">Error Message:") && b.contains(tok) { tok } else { "" }
store_as: inj_proof
- id: report-injection
action: match
source: inj_proof
pattern: "^noctis[0-9a-f]{12}$"
on_match:
finding:
cves: [CVE-2013-4098]
cvss: 9.1
severity: critical
title: "DS3 Authentication Server ErrorViewer.jsp Error Message Injection (CVE-2013-4098)"
description: "An unauthenticated request to /ServerAdmin/ErrorViewer.jsp printed the random text sent in the message parameter as the page's error message. Anyone can make the appliance display text of their choice, for example to send users a convincing phishing message."
remediation: "No fixed release is known. Restrict access to /ServerAdmin/ to administrators' networks, or contact the vendor."
confidence_delta: 0.55
qod: 75
evidence: "GET /ServerAdmin/ErrorViewer.jsp?message={{tok}} returned HTTP 200 with an error page showing the marker {{inj_proof}}"
# ── CVE-2013-4097: installation path in the connectivity-test error ─────
- id: dr-connection
action: http_request
condition: "is_ds3"
method: POST
path: "/ServerAdmin/TestDRConnection.jsp"
port: "{{port}}"
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "HOST_NAME=localhost&FILE_SIZE=&PACKET_SIZE=&MTU_SIZE="
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: dr_r
- id: path-leak
action: script
code: |
let b = if type_of(dr_r.body) == "string" { dr_r.body } else { "" };
let m = eregmatch("-REG-E-OPEN, error opening registry file (<|<)(/[^<>&\r\n]+)(>|>)", b);
if is_ds3 && m.len() > 2 { m[2] } else { "" }
store_as: leaked_path
- id: report-path
action: match
source: leaked_path
pattern: "^/[^<>&\\r\\n]+$"
on_match:
finding:
cves: [CVE-2013-4097]
cvss: 5.3
severity: medium
title: "DS3 Authentication Server TestDRConnection.jsp Installation Path Disclosure (CVE-2013-4097)"
description: "An unauthenticated POST to /ServerAdmin/TestDRConnection.jsp returned a -REG-E-OPEN error message that reveals a file path of the installation."
remediation: "No fixed release is known. Restrict access to /ServerAdmin/ to administrators' networks, or contact the vendor."
confidence_delta: 0.55
qod: 75
evidence: "POST /ServerAdmin/TestDRConnection.jsp (HOST_NAME=localhost) returned the error: -REG-E-OPEN, error opening registry file <{{leaked_path}}>"
# ── CVE-2013-4096: authenticated, reported from the confirmed flaws ─────
- id: old-serveradmin
action: script
code: |
if inj_proof != "" || leaked_path != "" { "confirmed" } else { "" }
store_as: flawed
- id: report-telnet-injection
action: match
source: flawed
pattern: "^confirmed$"
on_match:
finding:
cves: [CVE-2013-4096]
cvss: 8.8
severity: high
title: "DS3 Authentication Server TestTelnetConnection.jsp Command Injection (CVE-2013-4096)"
description: "The server is a DS3 Authentication Server whose ServerAdmin pages still carry the flaws published with this command injection, and no fixed release exists. Any authenticated user can run operating system commands through shell metacharacters in the HOST_NAME field of /ServerAdmin/TestTelnetConnection.jsp. This is reported from the product identification: the feed does not log in or run a command."
remediation: "No fixed release is known. Restrict access to /ServerAdmin/ to administrators' networks, limit and review ServerAdmin accounts, or contact the vendor."
confidence_delta: 0.40
qod: 70
evidence: "DS3-AuthServer Server header on /ServerAdmin/UserLogin.jsp and an unfixed ServerAdmin flaw confirmed above (CVE-2013-4098 and/or CVE-2013-4097)"