HomeSeer — 1 vulnerability check

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

← All products · Feeds on GitHub

HomeSeer HS2 Web Interface Log Viewer Stored Cross-Site Scripting

CVECVE-2011-4836
Severitymedium · CVSS 4.3
Categoryxss — XSS
Serviceshttp, https
Detectionscript, set_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/homeseer/CVE-2011-4836.yaml

The HomeSeer HS2 web interface records the URI of a request for an unknown page and prints it in the /elog event log viewer without HTML escaping, allowing stored cross-site scripting in the administrator's browser.

This check identifies HomeSeer from its Server header, requests a URI /stat<noctis-RANDOM> carrying an inert element with a random name, then reads /elog. The vulnerability is confirmed when the log page contains that element unescaped.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Raw TCP (TLS on HTTPS), sent verbatim: GET /stat{{sc.want}} HTTP/1.0
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET /elog HTTP/1.0
  5. Parses / computes the next value with a Rhai script
  6. Checks lg.banner for <noctis → finding QoD 75: HomeSeer HS2 /elog Stored XSS (CVE-2011-4836)

References:

Feed source — tests/vulnerabilities/homeseer/CVE-2011-4836.yaml
# HomeSeer HS2 web interface — stored XSS through the log viewer (CVE-2011-4836)
#
# HS2 2.5.0.20 writes the URI of a request for an unknown page into its event
# log and the /elog viewer prints that log entry without HTML escaping. A
# request for /stat<script>…</script> therefore ends up as live markup in the
# log page that the administrator reads. The issue also lists CVE-2011-4835
# (directory traversal) and CVE-2011-4837 (CSRF on /ctrl); neither is an XSS,
# so only CVE-2011-4836 is claimed by this feed.
#
# Detection (QoD 75): gated on a "Server: HomeSeer" banner. A request for
#   /stat<noctis-<random>>
# is sent verbatim (a raw socket keeps the angle brackets that an HTTP client
# would percent-encode), then /elog is fetched; the vulnerability is confirmed
# when the log page carries the element verbatim. The marker is an inert
# custom element with a random name, so no script runs and no static page can
# match. The only side effect is one line in the target's event log, the same
# as any request for an unknown page.
#
# Source: OpenVAS/Greenbone NVT 2011/gb_homeseer_hs2_web_interface_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.902648, GPL-2.0-only).
uid: 7f50a20a-f3f7-455e-9de6-50d95ccbae69
name: "HomeSeer HS2 Web Interface Log Viewer Stored Cross-Site Scripting (CVE-2011-4836)"
description: |
  The HomeSeer HS2 web interface records the URI of a request for an unknown
  page and prints it in the /elog event log viewer without HTML escaping,
  allowing stored cross-site scripting in the administrator's browser.

  This check identifies HomeSeer from its Server header, requests a URI
  /stat<noctis-RANDOM> carrying an inert element with a random name, then
  reads /elog. The vulnerability is confirmed when the log page contains that
  element unescaped.
cves: [CVE-2011-4836]
cvss: 4.3
severity: medium
category: xss
confidence_base: 0.30
tags: [homeseer, hs2, xss, stored, home-automation]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4836"

steps:
  - id: gen-marker
    action: script
    code: |
      let tok = "noctis" + rand_int(10000000, 99999999);
      #{ want: "<" + tok + ">" }
    store_as: sc

  - id: init-seed
    action: set_var
    var_name: seed
    var_value: {connected: false, banner: ""}

  - id: init-log
    action: set_var
    var_name: lg
    var_value: {connected: false, banner: ""}

  # Product gate: HomeSeer announces itself in the Server header.
  - id: seed
    action: tcp_connect
    port: "{{port}}"
    send: "GET /stat{{sc.want}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 5
    store_as: seed

  - id: gate-check
    action: script
    code: |
      let b = if type_of(seed.banner) == "string" { seed.banner } else { "" };
      ereg("(?i)\\r\\nServer: *HomeSeer", b)
    store_as: gk

  - id: log
    action: tcp_connect
    port: "{{port}}"
    send: "GET /elog HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 5
    condition: "gk"
    store_as: lg

  - id: check
    action: script
    code: |
      let b = if type_of(lg.banner) == "string" { lg.banner } else { "" };
      b.contains(sc.want)
    store_as: hit

  - id: report
    action: match
    source: lg.banner
    pattern: "<noctis"
    condition: "gk && hit"
    on_match:
      finding:
        title: "HomeSeer HS2 /elog Stored XSS (CVE-2011-4836)"
        description: "The HomeSeer HS2 event log viewer (/elog) printed the URI of a request for an unknown page without HTML escaping: an attacker can store script in the log that runs in the administrator's browser when the log is viewed."
        remediation: "Upgrade HomeSeer HS2 to a release that HTML-escapes logged URIs, and do not expose the web interface to untrusted networks."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET /stat{{sc.want}} was stored, and /elog returned the element unescaped"
      stop: true

View these feeds on GitHub