ELOG — 1 vulnerability check
noctis ships 1 vulnerability check for ELOG, covering 5 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
ELOG Unauthenticated Configuration File Download (GetConfig)
| CVE | CVE-2019-3992, CVE-2019-3993, CVE-2019-3994, CVE-2019-3995, CVE-2019-3996 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/elog/elog-config-file-disclosure.yaml |
Sends an unauthenticated GET /?cmd=GetConfig to the ELOG (elogd) web server and confirms that the reply is served as the `export.txt` download and contains the logbook configuration file itself (its `[section]` headers). ELOG before 3.1.4-283534d returns its whole elogd.cfg this way, including hashed logbook passwords. Fixed servers answer "Cloning not allowed" unless cloning was enabled. No configuration content is copied into the finding.
How noctis detects it
- HTTP(S) request
GET /?cmd=GetConfig - Parses / computes the next value with a Rhai script
- Checks
leak.redactedfor^\[global\]\n<redacted>$→ finding QoD 75: ELOG Configuration File Disclosure (CVE-2019-3992)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-3992
- https://nvd.nist.gov/vuln/detail/CVE-2019-3993
- https://nvd.nist.gov/vuln/detail/CVE-2019-3994
- https://nvd.nist.gov/vuln/detail/CVE-2019-3995
- https://nvd.nist.gov/vuln/detail/CVE-2019-3996
- https://www.tenable.com/security/research/tra-2019-53
- https://bitbucket.org/ritt/elog/commits/283534d97d5a181b09960ae1f0c53dbbe42d8a90
Feed source — tests/vulnerabilities/elog/elog-config-file-disclosure.yaml
# ELOG (Electronic Logbook, elogd) before 3.1.4-283534d — unauthenticated
# configuration file download through `?cmd=GetConfig` (CVE-2019-3992),
# Tenable TRA-2019-53. The same advisory and fix cover the password hash
# disclosure (CVE-2019-3993), two crashes (CVE-2019-3994, CVE-2019-3995) and
# the unintended HTTP GET proxy (CVE-2019-3996).
#
# elogd's request dispatcher answers `GET /?cmd=GetConfig` (no logbook in the
# path) with download_config(): the whole elogd.cfg as text/plain, under
# `Content-disposition: attachment; filename="export.txt"`. The fix (bitbucket
# ritt/elog, released with 3.1.4-283534d) only serves it when the
# administrator set `Allow clone = 1` in [global]; otherwise the reply is
# `Cloning not allowed. Set "Allow clone = 1" to enable cloning.` (text/html).
# elogd.cfg holds every logbook's settings, including the hashed
# `Write/Admin password` entries (CVE-2019-3992 record).
#
# Credit: detection logic adapted from the OpenVAS/Greenbone NVT
# 2019/stefan_ritt/gb_elog_mult_vuln_dec19.nasl
# (OID 1.3.6.1.4.1.25623.1.0.143249, GPL-2.0-only): GET /?cmd=GetConfig,
# header pattern `filename="export.txt"`.
#
# Proof: downloading the configuration without credentials IS the
# CVE-2019-3992 exploit, read-only (QoD 75). The other four CVEs are not sent
# (two are crashes, the proxy and hash reads need more than one request); the
# finding names CVE-2019-3992 only.
#
# Deviations from the NASL (stronger detection, documented in the PR):
# * the header match alone could be any download served as export.txt;
# here the body must also contain an elogd.cfg section header line
# (`[global]`, `[<logbook>]`), so a non-config reply does not count;
# * no product-detection pre-gate and no install-directory loop: the
# request goes to the web root, where elogd dispatches it (GetConfig is
# only handled without a logbook in the path);
# * nothing from the configuration reaches the finding (it can hold
# password hashes): the match runs on a fixed placeholder and the evidence
# only gives the reply size and how many sections / password keys it had.
#
# Verified on real targets: elogd 3.1.3-7933898 (docker gbrandt1/elog)
# returns the file; elogd 3.1.4 git283534d (docker solans/centos7-elog)
# answers "Cloning not allowed". A fixed elogd whose administrator set
# `Allow clone = 1` still serves the file to anyone and is reported too
# (same exposure, opted-in).
uid: 43bf788f-02ca-4993-ac55-2053ac04c4ca
name: "ELOG Unauthenticated Configuration File Download (GetConfig)"
description: |
Sends an unauthenticated GET /?cmd=GetConfig to the ELOG (elogd) web server
and confirms that the reply is served as the `export.txt` download and
contains the logbook configuration file itself (its `[section]` headers).
ELOG before 3.1.4-283534d returns its whole elogd.cfg this way, including
hashed logbook passwords. Fixed servers answer "Cloning not allowed" unless
cloning was enabled. No configuration content is copied into the finding.
cves: [CVE-2019-3992, CVE-2019-3993, CVE-2019-3994, CVE-2019-3995, CVE-2019-3996]
cvss: 7.5
severity: high
category: exposure
confidence_base: 0.30
tags: [elog, elogd, logbook, information-disclosure, configuration, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3992"
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3993"
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3994"
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3995"
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3996"
- "https://www.tenable.com/security/research/tra-2019-53"
- "https://bitbucket.org/ritt/elog/commits/283534d97d5a181b09960ae1f0c53dbbe42d8a90"
- "OpenVAS/Greenbone NASL 2019/stefan_ritt/gb_elog_mult_vuln_dec19.nasl (OID 1.3.6.1.4.1.25623.1.0.143249, GPL-2.0-only)"
steps:
- id: init-cfg-r
action: set_var
var_name: cfg_r
var_value: {status: 0, body: "", headers: {}}
# 1 — the unauthenticated download request.
- id: probe
action: http_request
method: GET
path: "/?cmd=GetConfig"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: cfg_r
# 2 — parse: 200 + export.txt attachment + at least one elogd.cfg
# `[section]` line. Only counts and a fixed placeholder leave this step.
- id: parse
action: script
code: |
let out = #{ leaked: false, sections: 0, pw_keys: 0, size: 0, server: "-", redacted: "" };
if cfg_r.status == 200 && type_of(cfg_r.body) == "string" {
let cd = cfg_r.headers["content-disposition"];
let is_export = type_of(cd) == "string" && ereg("filename=\"?export\\.txt\"?", cd, true);
let secs = egrep("^[ \\t]*\\[[^\\]\\r\\n]+\\][ \\t]*$", cfg_r.body);
if is_export && secs != "" {
out.leaked = true;
out.sections = split(secs, "\n").len();
let pw = egrep("^[ \\t]*[A-Za-z ]*password[ \\t]*=", cfg_r.body, true);
if pw != "" { out.pw_keys = split(pw, "\n").len(); }
out.size = strlen(cfg_r.body);
let sv = cfg_r.headers["server"];
if type_of(sv) == "string" { out.server = sv; }
out.redacted = "[global]\n<redacted>";
}
}
out
store_as: leak
# 3 — report on the fixed placeholder; no configuration text in the finding.
- id: confirm
action: match
condition: "leak.leaked == true"
source: leak.redacted
pattern: '^\[global\]\n<redacted>$'
on_match:
finding:
title: "ELOG Configuration File Disclosure (CVE-2019-3992)"
description: "An unauthenticated GET /?cmd=GetConfig returned the ELOG server configuration file (elogd.cfg) as the export.txt download. The file describes every logbook and can hold hashed logbook and administrator passwords. ELOG before 3.1.4-283534d serves it to anyone; that release also fixes a password hash disclosure, two denial-of-service crashes and an HTTP proxy abuse (CVE-2019-3993 to CVE-2019-3996)."
remediation: "Update ELOG to 3.1.4-283534d or later and leave `Allow clone` unset (or 0) in the [global] section unless configuration cloning is required. Change the logbook passwords the configuration file held."
cves: [CVE-2019-3992]
cvss: 7.5
severity: high
confidence_delta: 0.55
qod: 75
evidence: "GET /?cmd=GetConfig without credentials returned HTTP {{cfg_r.status}}, attachment export.txt, {{leak.size}} bytes of configuration with {{leak.sections}} [section] header(s) and {{leak.pw_keys}} password key(s) (content withheld); server: {{leak.server}}"
stop: true