SmarterStats — 2 vulnerability checks

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

← All products · Feeds on GitHub

SmarterTools SmarterStats 6.2.4100 Multiple Vulnerabilities (XSS, Referer Leak, Content-Type)

CVECVE-2011-4750, CVE-2011-4751, CVE-2011-4752
Severitycritical · CVSS 10.0
Categoryxss — XSS
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/smarterstats/smarterstats-6-2-4100-multiple-vulns.yaml

Requests the SmarterStats login page (/login.aspx, then /SmarterStats/login.aspx) and reads the edition and version printed in its footer link. Versions 6.2 through 6.2.4100 are reported: they are affected by stored and reflected cross-site scripting in the client report pages, leak data through Referer headers on frmGettingStarted.aspx and send wrong Content-Type headers on report pages. All three flaws need a logged-in session, so the finding rests on the version alone.

How noctis detects it

  1. HTTP(S) request GET /login.aspx
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET /SmarterStats/login.aspx
  4. Parses / computes the next value with a Rhai script
  5. Checks ver.version for ^6\.2 → finding QoD 70: SmarterStats … … reported by … (6.2 through 6.2.4100 are affected: authenticated XSS in client report pages, Referer leak on frmGettingStar…

References:

Feed source — tests/vulnerabilities/smarterstats/smarterstats-6-2-4100-multiple-vulns.yaml
# SmarterTools SmarterStats 6.2.4100 — multiple vulnerabilities
# CVE-2011-4750 (stored/reflected XSS), CVE-2011-4751 (frmGettingStarted.aspx
# Referer/access-log leak), CVE-2011-4752 (wrong Content-Type on report pages).
#
# Version check (QoD 70). Every flaw sits in the authenticated client area:
# the XSS proofs store or post report names through ASP.NET postbacks
# (/Client/frmCustomReport.aspx, frmFavoriteReport.aspx…) after login, the
# Referer leak and the Content-Type issue only affect a logged-in browser.
# There is no unauthenticated, read-only request that shows any of them, so
# the feed reads the version that the login page prints in its footer link
# ("SmarterStats Enterprise 6.2.4100").
#
# Improvements over the source check:
#   - The version is read only from the product's own footer link text
#     (">SmarterStats <Enterprise|Professional|Free> <x.y.z><"), not from any
#     ">SmarterStats" string on the page, and the login page must carry a
#     SmarterStats marker first.
#   - The login page is also looked up under /SmarterStats/ (IIS virtual
#     directory installs), which the source check never requests.
#
# Ported from OpenVAS/Greenbone NVT 2011/gb_smartertools_smarterstats_mult_vuln.nasl
# (GPL-2.0-only): /login.aspx, "Login to SmarterStats" marker and the
# 6.2 – 6.2.4100 range come from that plugin.
uid: 6be2249b-3d12-45cf-aa0c-efccfef6def3
name: "SmarterTools SmarterStats 6.2.4100 Multiple Vulnerabilities (XSS, Referer Leak, Content-Type)"
description: |
  Requests the SmarterStats login page (/login.aspx, then
  /SmarterStats/login.aspx) and reads the edition and version printed in its
  footer link. Versions 6.2 through 6.2.4100 are reported: they are affected
  by stored and reflected cross-site scripting in the client report pages,
  leak data through Referer headers on frmGettingStarted.aspx and send wrong
  Content-Type headers on report pages. All three flaws need a logged-in
  session, so the finding rests on the version alone.
cves: [CVE-2011-4750, CVE-2011-4751, CVE-2011-4752]
cvss: 10.0
severity: critical
category: xss
confidence_base: 0.30
tags: [smartertools, smarterstats, xss, information-disclosure, version-check, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4750"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4751"
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4752"
  - "http://xss.cx/examples/exploits/stored-reflected-xss-cwe79-smarterstats624100.html"
  # OpenVAS/Greenbone NASL 2011/gb_smartertools_smarterstats_mult_vuln.nasl (GPL-2.0-only)

steps:
  # Pre-initialise every stored result read in a condition below.
  - id: init-root
    action: set_var
    var_name: root_login
    var_value: {status: 0, body: ""}

  - id: init-vdir
    action: set_var
    var_name: vdir_login
    var_value: {status: 0, body: ""}

  - id: login-root
    action: http_request
    method: GET
    path: "/login.aspx"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    store_as: root_login

  - id: root-is-smarterstats
    action: script
    code: |
      root_login.status == 200 && ereg("Login to SmarterStats|<title>Login - SmarterStats</title>|>SmarterStats (Enterprise|Professional|Free) [0-9]", root_login.body)
    store_as: root_ok

  - id: login-vdir
    action: http_request
    method: GET
    path: "/SmarterStats/login.aspx"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    condition: "root_ok == false"
    store_as: vdir_login

  # Footer link text: "SmarterStats Enterprise 6.2.4100</a>" (5.x/6.x) —
  # the version must follow the edition word and end at the closing tag.
  - id: parse-version
    action: script
    code: |
      let body = if root_ok { root_login.body } else { vdir_login.body };
      let path = if root_ok { "/login.aspx" } else { "/SmarterStats/login.aspx" };
      let status = if root_ok { root_login.status } else { vdir_login.status };
      let m = if status == 200 && type_of(body) == "string" {
        eregmatch(">SmarterStats (Enterprise|Professional|Free) ([0-9]+)\\.([0-9]+)(\\.([0-9]+))?(\\.[0-9]+)?</a>", body)
      } else { [] };
      if m.len() < 6 {
        #{ found: false, vulnerable: false, version: "", edition: "", path: path }
      } else {
        let major = int(m[2]);
        let minor = int(m[3]);
        let build = if m[5] == "" { 0 } else { int(m[5]) };
        // A fourth part (6.2.4100.x) is a later revision of the last affected build.
        let version = m[2] + "." + m[3] + (if m[5] == "" { "" } else { "." + m[5] }) + m[6];
        let in_range = build < 4100 || (build == 4100 && m[6] == "");
        #{ found: true, vulnerable: major == 6 && minor == 2 && in_range, version: version, edition: m[1], path: path }
      }
    store_as: ver

  - id: version-match
    action: match
    source: ver.version
    pattern: "^6\\.2"
    condition: "ver.found == true && ver.vulnerable == true"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "SmarterStats {{ver.edition}} {{ver.version}} reported by {{ver.path}} (6.2 through 6.2.4100 are affected: authenticated XSS in client report pages, Referer leak on frmGettingStarted.aspx, wrong Content-Type on report pages)"
      stop: true

SmarterTools SmarterStats 6.0 Login.aspx Credentials Accepted in Query String

CVECVE-2011-2153
Severitymedium · CVSS 5.0
Categoryhardening — Hardening
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 70
Feedtests/vulnerabilities/smarterstats/CVE-2011-2153.yaml

Requests the SmarterStats login page (/login.aspx, then /SmarterStats/login.aspx) with the autologin shortcut (shortcutLink=autologin&txtSiteID=…&txtUser=…&txtPass=…) carrying a random user name and password generated for this scan, so no real account is tried. The page must be the SmarterStats login page, and the edition and version printed in its footer link must be 6.0 or earlier: those releases accept the user name and password in the login URL query string, where access logs, Referer headers and the browser history record them. The evidence also says whether the random values were copied back into the page. The finding rests on the version.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request GET /login.aspx?shortcutLink=autologin&txtSiteID=noctis&txtUser={{rnd_user}}&txtPass={{rn…
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET /SmarterStats/login.aspx?shortcutLink=autologin&txtSiteID=noctis&txtUser={{rnd_user}}…
  6. Parses / computes the next value with a Rhai script
  7. Checks res.version for ^SmarterStats → finding QoD 70: … at … (6.0 and earlier accept txtUser / txtPass in the Login.aspx query string); autologin probe with random credentials: …

References:

Feed source — tests/vulnerabilities/smarterstats/CVE-2011-2153.yaml
# SmarterTools SmarterStats 6.0 — credentials accepted in the Login.aspx
# query string (CVE-2011-2153, "cross-domain Referer leakage").
#
# Login.aspx honours the "autologin" shortcut: shortcutLink=autologin plus
# txtSiteID / txtUser / txtPass in the URL, so passwords end up in access /
# Referer logs and in the browser history; the ASP.NET page also copies the
# query string into its <form action>, re-emitting them in the HTML.
#
# Version check (QoD 70). Proving that the application *uses* the URL
# credentials would need a valid account; echoing the query string back is
# generic ASP.NET WebForms behaviour and proves nothing on its own. So the
# feed sends the autologin shortcut with per-run RANDOM credentials, requires
# the SmarterStats login page, and reports the footer version when it is 6.0
# or earlier. Whether the random values were echoed into the page is only
# recorded in the evidence.
#
# Improvements over the source check:
#   - random credentials instead of admin/admin: no login attempt against a
#     real account (no lockout, no audit-log noise);
#   - a SmarterStats login-page marker and an affected footer version are
#     required — the source check reported any page echoing its query string,
#     so every release, fixed ones included;
#   - the IIS virtual-directory install (/SmarterStats/login.aspx) is tried
#     when the root login page is not the product's;
#   - the source check targets SmarterMail, but CVE-2011-2148 … 2159 all
#     describe the SmarterStats 6.0 web server (NVD CPE smarterstats:6.0), and
#     no SmarterMail autologin shortcut is documented — SmarterMail pages are
#     not reported.
#
# Ported from OpenVAS/Greenbone NVT 2011/gb_smartermail_multiple_vuln_may11.nasl
# (GPL-2.0-only): the autologin URL comes from that plugin. That plugin lists
# CVE-2011-2148 … CVE-2011-2159; only CVE-2011-2153 concerns the request the
# feed sends, so the feed carries that one CVE and its NVD score.
uid: 37c91f5e-7239-4815-86be-bf3fc626001e
name: "SmarterTools SmarterStats 6.0 Login.aspx Credentials Accepted in Query String"
description: |
  Requests the SmarterStats login page (/login.aspx, then
  /SmarterStats/login.aspx) with the autologin shortcut
  (shortcutLink=autologin&txtSiteID=…&txtUser=…&txtPass=…) carrying a random
  user name and password generated for this scan, so no real account is
  tried. The page must be the SmarterStats login page, and the edition and
  version printed in its footer link must be 6.0 or earlier: those releases
  accept the user name and password in the login URL query string, where
  access logs, Referer headers and the browser history record them. The
  evidence also says whether the random values were copied back into the
  page. The finding rests on the version.
cves: [CVE-2011-2153]
cvss: 5.0
severity: medium
category: hardening
confidence_base: 0.30
tags: [smartertools, smarterstats, credentials-in-url, information-disclosure, version-check, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2153"
  - "https://kb.cert.org/vuls/id/240150"
  - "https://portal.smartertools.com/kb/a2450/automate-user-login-to-smarterstats.aspx"
  # OpenVAS/Greenbone NASL 2011/gb_smartermail_multiple_vuln_may11.nasl (GPL-2.0-only)

steps:
  # Per-run random credentials (lowercase hex) — never a real account.
  - id: mint-user
    action: script
    code: '"nu" + rand_hex(5)'
    store_as: rnd_user

  - id: mint-pass
    action: script
    code: '"np" + rand_hex(6)'
    store_as: rnd_pass

  # Pre-initialise every stored result read in a script below.
  - id: init-root
    action: set_var
    var_name: root_login
    var_value: {status: 0, body: ""}

  - id: init-vdir
    action: set_var
    var_name: vdir_login
    var_value: {status: 0, body: ""}

  # Redirects are followed: a failed autologin that bounces back to the login
  # page still yields the page (and its footer version).
  - id: login-root
    action: http_request
    method: GET
    path: "/login.aspx?shortcutLink=autologin&txtSiteID=noctis&txtUser={{rnd_user}}&txtPass={{rnd_pass}}"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    store_as: root_login

  - id: root-is-smarterstats
    action: script
    code: |
      root_login.status == 200 && type_of(root_login.body) == "string" && ereg("Login to SmarterStats|<title>Login - SmarterStats</title>", root_login.body)
    store_as: root_ok

  - id: login-vdir
    action: http_request
    method: GET
    path: "/SmarterStats/login.aspx?shortcutLink=autologin&txtSiteID=noctis&txtUser={{rnd_user}}&txtPass={{rnd_pass}}"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    condition: "root_ok == false"
    store_as: vdir_login

  # Footer link text: "SmarterStats Enterprise 6.0.3920</a>" — same form as
  # the 5.x/6.x login pages read by smarterstats-6-2-4100-multiple-vulns.
  - id: analyse
    action: script
    code: |
      let page = if root_ok { root_login } else { vdir_login };
      let path = if root_ok { "/login.aspx" } else { "/SmarterStats/login.aspx" };
      let body = if page.status == 200 && type_of(page.body) == "string" { page.body } else { "" };
      let product = ereg("Login to SmarterStats|<title>Login - SmarterStats</title>", body);
      let echoed = strstr(body, "txtUser=" + rnd_user + "&") != "" && strstr(body, "txtPass=" + rnd_pass) != "";
      let m = if product { eregmatch(">SmarterStats (Enterprise|Professional|Free) ([0-9]+)\\.([0-9]+)(\\.[0-9]+)*</a>", body) } else { [] };
      if m.len() < 4 {
        #{ found: false, vulnerable: false, version: "", path: path, echo: "" }
      } else {
        let major = int(m[2]);
        let minor = int(m[3]);
        let echo = if echoed { "the random txtUser / txtPass values were copied back into the page" } else { "the random credentials were not echoed in the page" };
        #{ found: true, vulnerable: major < 6 || (major == 6 && minor == 0), version: "SmarterStats " + m[1] + " " + m[2] + "." + m[3], path: path, echo: echo }
      }
    store_as: res

  - id: version-match
    action: match
    source: res.version
    pattern: "^SmarterStats "
    condition: "res.found == true && res.vulnerable == true"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "{{res.version}} at {{res.path}} (6.0 and earlier accept txtUser / txtPass in the Login.aspx query string); autologin probe with random credentials: {{res.echo}}"
      stop: true

View these feeds on GitHub