Yealink — 1 vulnerability check

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

← All products · Feeds on GitHub

CVECVE-2013-5755, CVE-2013-5756, CVE-2013-5757, CVE-2013-5758, CVE-2013-5759
Severitycritical · CVSS 10.0
Categorydefault-credentials — Default credentials
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 97
Feedtests/vulnerabilities/yealink/yealink-sip-t38g-default-credentials.yaml

Yealink SIP-T38G IP phones ship hardcoded web accounts user/user, admin/admin and var/var (CVE-2013-5755). The check logs in to the web interface with each pair over HTTP Basic auth and confirms it reaches the authenticated "IP Phone" page, after making sure a random account is refused so a finding proves the default credential. Once logged in, an attacker can reach the cgiServer.exx path traversal and command execution flaws (CVE-2013-5756 to CVE-2013-5759).

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET / HTTP/1.0
  2. Checks gate.banner for (?im)^WWW-Authenticate:\s*Basic realm="Gigabit Color IP Phone SIP-T38…
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET / HTTP/1.0
  5. Parses / computes the next value with a Rhai script
  6. Raw TCP (TLS on HTTPS), sent verbatim: GET / HTTP/1.0
  7. Checks login.banner for (?s)^HTTP/1\.[01] 200\b.*<title>IP Phone< → finding QoD 97: Logged in to the Yealink SIP-T38G web interface with the default credential …: GET / returned HTTP 200 with the authenticated 'IP Phone' pa…

References:

Feed source — tests/vulnerabilities/yealink/yealink-sip-t38g-default-credentials.yaml
# Yealink SIP-T38G VoIP phone — hardcoded web accounts user:user, admin:admin
# and var:var (CVE-2013-5755). CVE-2013-5756..5759 (path traversal, command
# execution and absolute-path issues in /cgi-bin/cgiServer.exx, reachable once
# logged in) are listed by the NASL and kept for tracking, but are not probed
# here: this feed only proves the default login.
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_yealink_voip_phone_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804468, GPL-2.0-only):
#   1. Product gate: the unauthenticated root page must answer with
#      `WWW-Authenticate: Basic realm="Gigabit Color IP Phone SIP-T38G"`.
#   2. For each of user:user, admin:admin, var:var: GET / with HTTP Basic auth
#      must answer HTTP 200 with "<title>IP Phone<" — the authenticated web UI,
#      a read-only post-login proof. Every working pair is reported, as the
#      NASL lists all of them.
#
# Deviation from the NASL (stronger detection, stated in the PR):
#   * Accept-any-password control: before the default logins, GET / is sent
#     with a random user and a random password. If that already opens the web
#     UI, the server does not check credentials at all (honeypot, broken auth)
#     and the feed reports nothing — the NASL would report all three pairs.
#     The random account does not exist on a real phone, so no real account
#     sees an extra failed login.
#
# Nothing is changed on the phone.
uid: 57a16c14-f1e0-4179-9bbd-569183fcc638
name: "Yealink SIP-T38G VoIP Phone Default Web Credentials"
description: |
  Yealink SIP-T38G IP phones ship hardcoded web accounts user/user, admin/admin
  and var/var (CVE-2013-5755). The check logs in to the web interface with each
  pair over HTTP Basic auth and confirms it reaches the authenticated "IP Phone"
  page, after making sure a random account is refused so a finding proves the
  default credential. Once logged in, an attacker can reach the cgiServer.exx
  path traversal and command execution flaws (CVE-2013-5756 to CVE-2013-5759).
cves: [CVE-2013-5755, CVE-2013-5756, CVE-2013-5757, CVE-2013-5758, CVE-2013-5759]
cvss: 10.0
severity: critical
category: default-credentials
confidence_base: 0.30
tags: [openvas-migrated, yealink, voip, ip-phone, default-credentials, http]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5755"
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5756"
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5757"
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5758"
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5759"
  - "https://www.exploit-db.com/exploits/33739"
  - "OpenVAS/Greenbone NASL 2014/gb_yealink_voip_phone_mult_vuln.nasl (GPL-2.0-only)"

steps:
  - id: init-product
    action: set_var
    var_name: product
    var_value: false
  - id: init-anycred
    action: set_var
    var_name: anycred
    var_value: false
  # Pre-init the stored result the control script reads, so the script never
  # sees an undefined variable when the control step does not run.
  - id: init-ctrl
    action: set_var
    var_name: ctrl
    var_value: {banner: null}

  # 1. Product gate — the SIP-T38G Basic-auth realm on the root page (NASL banner check).
  - id: gate-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: gate
  - id: gate-match
    action: match
    source: gate.banner
    pattern: '(?im)^WWW-Authenticate:\s*Basic realm="Gigabit Color IP Phone SIP-T38G"'
    on_match:
      set_vars:
        product: true

  # 2. Control — a random account must not open the web UI.
  - id: control-auth
    action: script
    code: 'base64_encode("noctis" + rand_hex(6) + ":" + rand_hex(10))'
    store_as: bad_auth
    condition: "product"
  - id: control
    action: tcp_connect
    port: "{{port}}"
    send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\nAuthorization: Basic {{bad_auth}}\r\n\r\n"
    store_as: ctrl
    condition: "product"
  - id: control-check
    action: script
    code: |
      let b = ctrl.banner;
      type_of(b) == "string"
        && ereg("^HTTP/1\\.[01] 200", b)
        && b.contains("<title>IP Phone<")
    store_as: anycred
    condition: "product"

  # 3. Default logins — one request + one match per pair (the loop groups the
  #    three steps). No stop: every working pair gets its own finding.
  - id: init-login
    action: set_var
    var_name: login
    var_value: {banner: null}
    loop:
      var: acct
      over:
        - {label: "user/user", b64: "dXNlcjp1c2Vy"}
        - {label: "admin/admin", b64: "YWRtaW46YWRtaW4="}
        - {label: "var/var", b64: "dmFyOnZhcg=="}
  - id: login
    action: tcp_connect
    port: "{{port}}"
    send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\nAuthorization: Basic {{acct.b64}}\r\n\r\n"
    store_as: login
    condition: "product && !anycred"
  - id: detect-default
    action: match
    source: login.banner
    pattern: '(?s)^HTTP/1\.[01] 200\b.*<title>IP Phone<'
    condition: "product && !anycred"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "Logged in to the Yealink SIP-T38G web interface with the default credential {{acct.label}}: GET / returned HTTP 200 with the authenticated 'IP Phone' page, while a random account was refused."

View these feeds on GitHub