sollae — 1 vulnerability check

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

← All products · Feeds on GitHub

Sollae Systems device Telnet console default password 'sollae' / no password

CVECVE-2018-12924
Severitycritical · CVSS 9.8
Categorydefault-credentials — Default credentials
Servicestelnet
Detectionset_var, script, tcp_open, sleep, tcp_send, tcp_close, match · highest QoD 97
Feedtests/vulnerabilities/sollae/CVE-2018-12924.yaml

The Telnet management console of a Sollae Systems (ezTCP) Serial-Ethernet-Module or Remote-I/O-Device-Server accepted the default password "sollae" (or asked for no password at all) and ran the `st net` status command. An unauthenticated attacker on the network can reconfigure the device and the serial equipment behind it.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Opens a persistent TCP/TLS socket
  3. Sends … on the open socket
  4. Parses / computes the next value with a Rhai script
  5. Parses / computes the next value with a Rhai script
  6. Parses / computes the next value with a Rhai script
  7. Parses / computes the next value with a Rhai script
  8. Sends {{tn_pass}} on the open socket
  9. Sends … on the open socket
  10. Parses / computes the next value with a Rhai script
  11. Sends st net on the open socket
  12. Sends on the open socket
  13. Sends exit on the open socket
  14. Parses / computes the next value with a Rhai script
  15. … and 9 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/sollae/CVE-2018-12924.yaml
# Sollae Systems (ezTCP) Serial-Ethernet-Module / Remote-I/O-Device-Server —
# Telnet management console with the default password "sollae", or with no
# password at all (CVE-2018-12924).
#
# Ported from OpenVAS/Greenbone NVT
# 2018/sollaesystems/gb_sollaesystems_devices_default_telnet_credentials.nasl
# (OID 1.3.6.1.4.1.25623.1.0.112323, GPL-2.0-only): require the Sollae console
# greeting ("Sollae Systems" + "Management Console", or "MIC" +
# "Copyright(c) Sollae Systems Co.,Ltd."); if the greeting already ends on the
# "lsh>" / "msh>" shell prompt the console has no password, else on
# "password:" send "sollae" and require the prompt. Then run the read-only
# status command `st net` and require its "proto" / "peer address" table
# header — output of a real console command, never in what we send.
#
# Deviations from the NASL (stronger detection, documented in the PR):
#   * Accept-any-password guard: after the default password worked, a second
#     connection tries one random password; if that also reaches the shell
#     prompt (honeypot / broken login) the feed reports nothing.
#   * Late greeting: a console that greets after the first 500 ms read is still
#     recognised (wait, then read again) instead of being skipped.
#   * The NASL's MIC gate is missing a `><` (`"Copyright(c) …"` alone is always
#     true); here both markers are really required.
#   * Fallback (QoD 75) when the default password reaches the shell prompt but
#     the `st net` output does not come back (the NASL reports nothing then).
#
# Read-only: `st net` only prints the socket table; nothing is changed on the
# device. A console that rejects "sollae" sees that single attempt and
# nothing else; one wrong-password attempt (the control) is made only after
# the default login already worked. category: default-credentials so operators
# can exclude credential logins.
uid: 0b8cb2d7-7ae8-4060-b38c-6e38f1c54b89
name: "Sollae Systems device Telnet console default password 'sollae' / no password (CVE-2018-12924)"
description: |
  The Telnet management console of a Sollae Systems (ezTCP) Serial-Ethernet-Module
  or Remote-I/O-Device-Server accepted the default password "sollae" (or asked for
  no password at all) and ran the `st net` status command. An unauthenticated
  attacker on the network can reconfigure the device and the serial equipment
  behind it.
cves: [CVE-2018-12924]
cvss: 9.8
severity: critical
category: default-credentials
confidence_base: 0.30
tags: [sollae, eztcp, serial-to-ethernet, iot, ics, telnet, default-credentials, intrusive]
services: [telnet]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-12924"
  - "https://www.seebug.org/vuldb/ssvid-97374"

vars:
  tn_pass: "sollae"

steps:
  # ---------------------------------------------------------------- set-up
  - id: init-gate
    action: set_var
    var_name: gate
    var_value: false

  - id: init-nopw
    action: set_var
    var_name: nopw
    var_value: false

  - id: init-pwprompt
    action: set_var
    var_name: pwprompt
    var_value: false

  - id: init-r-pass
    action: set_var
    var_name: r_pass
    var_value: {response: ""}

  - id: init-r-pass-tail
    action: set_var
    var_name: r_pass_tail
    var_value: {response: ""}

  - id: init-login-ok
    action: set_var
    var_name: login_ok
    var_value: false

  - id: init-stnet-ok
    action: set_var
    var_name: stnet_ok
    var_value: false

  - id: init-ctl-shell
    action: set_var
    var_name: ctl_shell
    var_value: false

  - id: init-late
    action: set_var
    var_name: late
    var_value: {response: ""}

  - id: init-ctl-late
    action: set_var
    var_name: ctl_late
    var_value: {response: ""}

  # Random control password — never "sollae".
  - id: control-password
    action: script
    store_as: ctl_pw
    code: |
      "noctis" + rand_str(12)

  # ------------------------------------------------------ greeting / gate
  - id: open
    action: tcp_open
    handle: tn
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    store_as: conn

  # Neither a password prompt nor a shell prompt in the first read: wait and
  # read again (a zero-byte write only triggers the read).
  - id: late-banner-wait
    action: sleep
    condition: "conn.connected == true && (type_of(conn.banner) != \"string\" || (strstr(tolower(conn.banner), \"password:\") == \"\" && strstr(conn.banner, \"sh>\") == \"\"))"
    duration_ms: 3000

  - id: late-banner
    action: tcp_send
    handle: tn
    condition: "conn.connected == true && (type_of(conn.banner) != \"string\" || (strstr(tolower(conn.banner), \"password:\") == \"\" && strstr(conn.banner, \"sh>\") == \"\"))"
    send: ""
    timeout_secs: 10
    store_as: late

  - id: greeting
    action: script
    condition: "conn.connected == true"
    store_as: greet
    code: |
      let g = "";
      if type_of(conn.banner) == "string" { g += conn.banner; }
      if type_of(late.response) == "string" { g += late.response; }
      g

  - id: gate-check
    action: script
    condition: "conn.connected == true"
    store_as: gate
    code: |
      (strstr(greet, "Sollae Systems") != "" && strstr(greet, "Management Console") != "")
        || (strstr(greet, "MIC") != "" && strstr(greet, "Copyright(c) Sollae Systems Co.,Ltd.") != "")

  # Console without any password: the greeting already ends on the shell prompt.
  - id: nopw-check
    action: script
    condition: "gate == true"
    store_as: nopw
    code: |
      strstr(greet, "lsh>") != "" || strstr(greet, "msh>") != ""

  - id: pwprompt-check
    action: script
    condition: "gate == true && nopw == false"
    store_as: pwprompt
    code: |
      strstr(tolower(greet), "password:") != ""

  # ----------------------------------------------------- default password
  - id: send-pass
    action: tcp_send
    handle: tn
    condition: "pwprompt == true"
    send: "{{tn_pass}}\r\n"
    timeout_secs: 10
    store_as: r_pass

  - id: wait-shell
    action: sleep
    condition: "pwprompt == true"
    duration_ms: 1500

  # Zero-byte write: only reads what the console printed after the password.
  - id: pass-tail
    action: tcp_send
    handle: tn
    condition: "pwprompt == true"
    send: ""
    timeout_secs: 10
    store_as: r_pass_tail

  # Decide on the login BEFORE sending anything else, so a console whose
  # password was changed sees exactly one wrong password (like the NASL), not
  # `st net` / empty line / `exit` as further password attempts.
  - id: check-login
    action: script
    condition: "nopw == true || pwprompt == true"
    store_as: login_ok
    code: |
      let out = "";
      for r in [r_pass, r_pass_tail] {
        if type_of(r.response) == "string" { out += r.response; }
      }
      nopw || strstr(out, "lsh>") != "" || strstr(out, "msh>") != ""

  # ------------------------------------------------- read-only `st net`
  - id: send-cmd
    action: tcp_send
    handle: tn
    condition: "login_ok == true"
    send: "st net\r\n"
    timeout_secs: 10
    store_as: r_cmd

  - id: wait-output
    action: sleep
    condition: "login_ok == true"
    duration_ms: 1500

  # An empty line flushes whatever the console printed after the previous read.
  - id: flush
    action: tcp_send
    handle: tn
    condition: "login_ok == true"
    send: "\r\n"
    timeout_secs: 10
    store_as: r_tail

  - id: logout
    action: tcp_send
    handle: tn
    condition: "login_ok == true"
    send: "exit\r\n"
    timeout_secs: 2

  - id: close
    action: tcp_close
    handle: tn

  # Everything received after the password (or after the greeting when there
  # is none).
  - id: collect
    action: script
    condition: "login_ok == true"
    store_as: tn_out
    code: |
      let out = "";
      for r in [r_pass, r_pass_tail, r_cmd, r_tail] {
        if type_of(r.response) == "string" { out += r.response; }
      }
      out

  - id: check-stnet
    action: script
    condition: "login_ok == true"
    store_as: stnet_ok
    code: |
      strstr(tn_out, "proto") != "" && strstr(tn_out, "peer address") != ""

  # ---------------------------------------- control: random password login
  # Only when the default password looked accepted, to rule out a console that
  # opens the shell for any password.
  - id: ctl-open
    action: tcp_open
    handle: ctl
    port: "{{port}}"
    condition: "pwprompt == true && login_ok == true"
    read_banner: true
    timeout_secs: 10
    store_as: ctl_conn

  - id: ctl-late-wait
    action: sleep
    condition: "pwprompt == true && login_ok == true && (type_of(ctl_conn.banner) != \"string\" || strstr(tolower(ctl_conn.banner), \"password:\") == \"\")"
    duration_ms: 3000

  - id: ctl-late
    action: tcp_send
    handle: ctl
    condition: "pwprompt == true && login_ok == true && (type_of(ctl_conn.banner) != \"string\" || strstr(tolower(ctl_conn.banner), \"password:\") == \"\")"
    send: ""
    timeout_secs: 10
    store_as: ctl_late

  - id: ctl-pass
    action: tcp_send
    handle: ctl
    condition: "pwprompt == true && login_ok == true"
    send: "{{ctl_pw}}\r\n"
    timeout_secs: 10
    store_as: c_pass

  - id: ctl-wait
    action: sleep
    condition: "pwprompt == true && login_ok == true"
    duration_ms: 1500

  - id: ctl-read
    action: tcp_send
    handle: ctl
    condition: "pwprompt == true && login_ok == true"
    send: ""
    timeout_secs: 10
    store_as: c_tail

  - id: ctl-close
    action: tcp_close
    handle: ctl

  - id: ctl-check
    action: script
    condition: "pwprompt == true && login_ok == true"
    store_as: ctl_shell
    code: |
      let out = "";
      for r in [c_pass, c_tail] {
        if type_of(r.response) == "string" { out += r.response; }
      }
      strstr(out, "lsh>") != "" || strstr(out, "msh>") != ""

  # ---------------------------------------------------------------- findings
  - id: finding-nopw
    action: match
    source: tn_out
    pattern: "peer address"
    condition: "nopw == true && stnet_ok == true"
    on_match:
      finding:
        title: "Sollae Systems device Telnet console without password (CVE-2018-12924)"
        description: "The Sollae Systems Telnet management console opened the shell prompt without asking for any password and ran the read-only `st net` status command."
        remediation: "Set a strong management password on the Sollae device (ezManager), disable the Telnet console if unused, and restrict TCP/23 to a management network."
        confidence_delta: 0.65
        qod: 97
        evidence: "Telnet console greeting with shell prompt, no password; `st net` output: {{tn_out}}"
      stop: true

  - id: finding-default-password
    action: match
    source: tn_out
    pattern: "peer address"
    condition: "pwprompt == true && stnet_ok == true && ctl_shell == false"
    on_match:
      finding:
        title: "Sollae Systems device Telnet console default password 'sollae' (CVE-2018-12924)"
        description: "The Sollae Systems Telnet management console accepted the default password '{{tn_pass}}' and ran the read-only `st net` status command, while a random password was rejected."
        remediation: "Change the default 'sollae' password on the device (ezManager), disable the Telnet console if unused, and restrict TCP/23 to a management network."
        confidence_delta: 0.65
        qod: 97
        evidence: "Telnet password '{{tn_pass}}' accepted (random password rejected); `st net` output: {{tn_out}}"
      stop: true

  # Shell prompt after the default password, `st net` output not captured.
  - id: finding-default-password-prompt
    action: match
    source: tn_out
    pattern: "[lm]sh>"
    condition: "pwprompt == true && login_ok == true && stnet_ok == false && ctl_shell == false"
    on_match:
      finding:
        title: "Sollae Systems device Telnet console default password 'sollae' (CVE-2018-12924)"
        description: "The Sollae Systems Telnet management console showed its shell prompt after the default password '{{tn_pass}}', while a random password was rejected. The `st net` command output was not captured."
        remediation: "Change the default 'sollae' password on the device (ezManager), disable the Telnet console if unused, and restrict TCP/23 to a management network."
        confidence_delta: 0.50
        qod: 75
        evidence: "Telnet password '{{tn_pass}}' accepted, shell prompt shown (random password rejected): {{tn_out}}"

View these feeds on GitHub