XM Events Diary — 2 vulnerability checks

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

← All products · Feeds on GitHub

ASP-DEv XM Events Diary default.asp / diary_viewC.asp cat SQL Injection

CVECVE-2008-5923, CVE-2008-5924
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/xm-events-diary/xm-events-diary-cat-sqli.yaml

ASP-DEv XM Events Diary, a classic ASP events calendar backed by a Microsoft Access database, copies the cat parameter of default.asp (CVE-2008-5923) and diary_viewC.asp (CVE-2008-5924) unescaped into SQL queries, so an unauthenticated attacker can read or change the diary database.

For the default install directory, the web root and /events, this check looks for the "Powered by ASP-DEv XM Diary" footer on default.asp. Where it is found, it requests default.asp and diary_viewC.asp with a random category followed by a single quote, then by a doubled quote. A page is reported as injectable when the single quote makes the database engine raise a syntax error while the doubled quote still returns the diary page (or, when the value is used without quotes, a different database error), which shows the value is inserted into the SQL text without escaping. A doubled quote that is blocked or answered with an unrelated error page is not counted. Only read queries are triggered and nothing is written.

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 {{dir}}/default.asp
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET {{dir}}/default.asp?cat={{mark}}%27
  6. HTTP(S) request GET {{dir}}/default.asp?cat={{mark}}%27%27
  7. Parses / computes the next value with a Rhai script
  8. HTTP(S) request GET {{dir}}/diary_viewC.asp?cat={{mark}}%27
  9. HTTP(S) request GET {{dir}}/diary_viewC.asp?cat={{mark}}%27%27
  10. Parses / computes the next value with a Rhai script
  11. Checks hit_default for ^/ → finding QoD 75: ASP-DEv XM Events Diary default.asp cat SQL Injection (CVE-2008-5923)
  12. Checks hit_viewc for ^/ → finding QoD 75: ASP-DEv XM Events Diary diary_viewC.asp cat SQL Injection (CVE-2008-5924)

References:

Feed source — tests/vulnerabilities/xm-events-diary/xm-events-diary-cat-sqli.yaml
# ASP-DEv XM Events Diary — cat SQL injection (default.asp, diary_viewC.asp)
# — CVE-2008-5923 / CVE-2008-5924   (diary.mdb download: CVE-2008-5925.yaml)
#
# XM Events Diary is a classic ASP + Microsoft Access events calendar. Its
# listing pages splice the `cat` query parameter between quotes into a JET SQL
# query (CVE-2008-5923: default.asp, EDB-32658 / BID 32809; CVE-2008-5924:
# diary_viewC.asp), and its database diary.mdb sits under the web root with no
# access control (CVE-2008-5925). The vendor (asp-dev.com) is gone and no source
# archive could be found, so the query layout comes from the advisories.
#
# Detection, per candidate install directory:
#   - SQLi (QoD 75, per page): once the "Powered by ASP-DEv XM Diary" footer is
#     found on default.asp, request the page with cat=<random>' and with
#     cat=<random>''. An unterminated-string JET/ADO error on the lone quote and none on the
#     doubled quote proves the value reaches the SQL text unescaped. Each
#     finding names only the CVE of the page that answered.
#     The control must come back as the diary page (footer) or as a database
#     error other than an unterminated string ("Syntax error (missing
#     operator)" when cat is used unquoted): a WAF 403 or a generic error page
#     on the control is not a proof, and an unquoted cat is still caught.
#
# Better than the source NASL: the NASL only probes /diary/default.asp and
# reports a lone-quote error, so a page that always shows a JET error (broken
# install) is a false positive; it never tests diary_viewC.asp (CVE-2008-5924)
# nor the diary.mdb download (CVE-2008-5925, separate feed), and misses
# installs at the web root. This feed adds the doubled-quote control, both
# pages and the web-root / /events install paths.
#
# Source: OpenVAS/Greenbone NVT 2009/gb_event_diary_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.900452, GPL-2.0-only).
uid: b830d580-090c-4ce4-9861-8467aaefc187
name: "ASP-DEv XM Events Diary default.asp / diary_viewC.asp cat SQL Injection"
description: |
  ASP-DEv XM Events Diary, a classic ASP events calendar backed by a Microsoft
  Access database, copies the cat parameter of default.asp (CVE-2008-5923) and
  diary_viewC.asp (CVE-2008-5924) unescaped into SQL queries, so an
  unauthenticated attacker can read or change the diary database.

  For the default install directory, the web root and /events, this check
  looks for the "Powered by ASP-DEv XM Diary" footer on default.asp. Where it
  is found, it requests default.asp and diary_viewC.asp with a random category
  followed by a single quote, then by a doubled quote. A page is reported as
  injectable when the single quote makes the database engine raise a syntax
  error while the doubled quote still returns the diary page (or, when the
  value is used without quotes, a different database error), which shows the
  value is inserted into the SQL text without escaping. A doubled quote that
  is blocked or answered with an unrelated error page is not counted. Only
  read queries are triggered and nothing is written.
cves: [CVE-2008-5923, CVE-2008-5924]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [xm-events-diary, asp-dev, sqli, error-based, asp, access]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2008-5923"
  - "https://nvd.nist.gov/vuln/detail/CVE-2008-5924"
  - "https://www.exploit-db.com/exploits/32658"

steps:
  # ── Random category and the per-CVE result slots ──────────────────────────
  - id: gen-marker
    action: script
    code: '"noctis" + rand_str(8)'
    store_as: mark

  - id: init-hit-default
    action: set_var
    var_name: hit_default
    var_value: ""

  - id: init-hit-viewc
    action: set_var
    var_name: hit_viewc
    var_value: ""

  # ── Per candidate install directory (loop group) ──────────────────────────
  - id: init-landing
    action: set_var
    var_name: landing
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["/diary", "", "/events"]

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

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

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

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

  - id: dir-label
    action: script
    code: 'dir + "/"'
    store_as: dlabel

  - id: fetch-default
    action: http_request
    method: GET
    path: "{{dir}}/default.asp"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'hit_default == "" || hit_viewc == ""'
    store_as: landing

  - id: fingerprint
    action: script
    code: |
      let body = if type_of(landing.body) == "string" { landing.body } else { "" };
      ereg("(?i)Powered\\s+by\\s+(<[^>]*>\\s*)?ASP-DEv\\s+XM\\s+(Events\\s+)?Diary", body)
    store_as: is_diary

  # default.asp — CVE-2008-5923
  - id: default-quote
    action: http_request
    method: GET
    path: "{{dir}}/default.asp?cat={{mark}}%27"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'is_diary == true && hit_default == ""'
    store_as: dq

  - id: default-double
    action: http_request
    method: GET
    path: "{{dir}}/default.asp?cat={{mark}}%27%27"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'is_diary == true && hit_default == ""'
    store_as: dd

  - id: default-check
    action: script
    condition: 'is_diary == true && hit_default == ""'
    code: |
      let bq = if type_of(dq.body) == "string" { dq.body } else { "" };
      let bd = if type_of(dd.body) == "string" { dd.body } else { "" };
      let dberr = "(?i)(error '80040e[0-9a-f]{2}'|Microsoft JET Database Engine|\\[Microsoft\\]\\[ODBC|Syntax error[^<]{0,60}query expression|Unclosed quotation mark)";
      let strerr = "(?i)(Syntax error in string|Unclosed quotation mark|Unterminated string)";
      let footer = "(?i)Powered\\s+by\\s+(<[^>]*>\\s*)?ASP-DEv\\s+XM\\s+(Events\\s+)?Diary";
      if ereg(strerr, bq) && !ereg(strerr, bd) && (ereg(footer, bd) || ereg(dberr, bd)) { dlabel } else { "" }
    store_as: hit_default

  # diary_viewC.asp — CVE-2008-5924
  - id: viewc-quote
    action: http_request
    method: GET
    path: "{{dir}}/diary_viewC.asp?cat={{mark}}%27"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'is_diary == true && hit_viewc == ""'
    store_as: vq

  - id: viewc-double
    action: http_request
    method: GET
    path: "{{dir}}/diary_viewC.asp?cat={{mark}}%27%27"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'is_diary == true && hit_viewc == ""'
    store_as: vd

  - id: viewc-check
    action: script
    condition: 'is_diary == true && hit_viewc == ""'
    code: |
      let bq = if type_of(vq.body) == "string" { vq.body } else { "" };
      let bd = if type_of(vd.body) == "string" { vd.body } else { "" };
      let dberr = "(?i)(error '80040e[0-9a-f]{2}'|Microsoft JET Database Engine|\\[Microsoft\\]\\[ODBC|Syntax error[^<]{0,60}query expression|Unclosed quotation mark)";
      let strerr = "(?i)(Syntax error in string|Unclosed quotation mark|Unterminated string)";
      let footer = "(?i)Powered\\s+by\\s+(<[^>]*>\\s*)?ASP-DEv\\s+XM\\s+(Events\\s+)?Diary";
      if ereg(strerr, bq) && !ereg(strerr, bd) && (ereg(footer, bd) || ereg(dberr, bd)) { dlabel } else { "" }
    store_as: hit_viewc

  # ── Findings (second loop group: runs once, after the directory loop) ────
  - id: after-loop
    action: set_var
    var_name: loop_done
    var_value: true
    loop:
      var: pass
      over: ["once"]

  - id: report-default
    action: match
    source: hit_default
    pattern: "^/"
    on_match:
      finding:
        cves: [CVE-2008-5923]
        cvss: 7.5
        severity: high
        title: "ASP-DEv XM Events Diary default.asp cat SQL Injection (CVE-2008-5923)"
        description: "default.asp inserted the cat parameter unescaped into its SQL query: a single quote made the database engine report an unterminated string, while a doubled quote did not (the page or a different database error came back). An unauthenticated attacker can read or modify the diary database."
        remediation: "No fixed release of XM Events Diary is known. Remove the application or restrict access to it; if it must stay, escape the cat parameter (double single quotes) or use parameterised queries in default.asp."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{hit_default}}default.asp?cat={{mark}}' raised an unterminated-string database error, cat={{mark}}'' did not"

  - id: report-viewc
    action: match
    source: hit_viewc
    pattern: "^/"
    on_match:
      finding:
        cves: [CVE-2008-5924]
        cvss: 7.5
        severity: high
        title: "ASP-DEv XM Events Diary diary_viewC.asp cat SQL Injection (CVE-2008-5924)"
        description: "diary_viewC.asp inserted the cat parameter unescaped into its SQL query: a single quote made the database engine report an unterminated string, while a doubled quote did not (the page or a different database error came back). An unauthenticated attacker can read or modify the diary database."
        remediation: "No fixed release of XM Events Diary is known. Remove the application or restrict access to it; if it must stay, escape the cat parameter (double single quotes) or use parameterised queries in diary_viewC.asp."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{hit_viewc}}diary_viewC.asp?cat={{mark}}' raised an unterminated-string database error, cat={{mark}}'' did not"

ASP-DEv XM Events Diary diary.mdb Database Download

CVECVE-2008-5925
Severitymedium · CVSS 5.0
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, script, http_request, match · highest QoD 75
Feedtests/vulnerabilities/xm-events-diary/CVE-2008-5925.yaml

ASP-DEv XM Events Diary, a classic ASP events calendar, stores its Microsoft Access database diary.mdb under the web root without access control. An unauthenticated attacker can download the whole database, including the administrator account.

For the default install directory, the web root and /events, this check requests only the first 32 bytes of diary.mdb (HTTP Range request) and reports the database as downloadable when they carry the Microsoft Access file signature ("Standard Jet DB" or "Standard ACE DB"). No database content is copied into the finding.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/diary.mdb
  3. Parses / computes the next value with a Rhai script
  4. Checks hit_mdb for ^/ → finding QoD 75: ASP-DEv XM Events Diary diary.mdb Database Download (CVE-2008-5925)

References:

Feed source — tests/vulnerabilities/xm-events-diary/CVE-2008-5925.yaml
# ASP-DEv XM Events Diary — diary.mdb database download — CVE-2008-5925
#
# XM Events Diary (classic ASP) keeps its Microsoft Access database diary.mdb
# in the application directory, under the web root, with no access control:
# anyone can download it. The vendor (asp-dev.com) is gone and no source
# archive could be found; the file name comes from the CVE record.
#
# Detection, per candidate install directory (/diary, web root, /events):
# GET diary.mdb with Range: bytes=0-31 and check the Access file signature
# ("Standard Jet DB" / "Standard ACE DB" at offset 4). Only the 32-byte header
# is asked for (a server that ignores Range still sends the whole file, which
# the engine reads but never copies into the finding).
#
# Better than the source NASL: the NASL lists this CVE but never requests the
# database file. The SQL injection CVEs of the same NASL are covered by
# xm-events-diary-cat-sqli.yaml.
#
# Source: OpenVAS/Greenbone NVT 2009/gb_event_diary_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.900452, GPL-2.0-only).
uid: 6810c50b-145c-4c80-92a2-1cadb695d7cd
name: "ASP-DEv XM Events Diary diary.mdb Database Download (CVE-2008-5925)"
description: |
  ASP-DEv XM Events Diary, a classic ASP events calendar, stores its Microsoft
  Access database diary.mdb under the web root without access control. An
  unauthenticated attacker can download the whole database, including the
  administrator account.

  For the default install directory, the web root and /events, this check
  requests only the first 32 bytes of diary.mdb (HTTP Range request) and
  reports the database as downloadable when they carry the Microsoft Access
  file signature ("Standard Jet DB" or "Standard ACE DB"). No database content
  is copied into the finding.
cves: [CVE-2008-5925]
cvss: 5.0
severity: medium
category: exposure
confidence_base: 0.30
tags: [xm-events-diary, asp-dev, asp, access, database-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2008-5925"

steps:
  - id: init-hit
    action: set_var
    var_name: hit_mdb
    var_value: ""

  - id: init-mdb
    action: set_var
    var_name: mdb
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["/diary", "", "/events"]

  - id: dir-label
    action: script
    code: 'dir + "/"'
    store_as: dlabel

  - id: fetch-mdb
    action: http_request
    method: GET
    path: "{{dir}}/diary.mdb"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_mdb == ""'
    headers:
      Range: "bytes=0-31"
    store_as: mdb

  - id: mdb-check
    action: script
    condition: 'hit_mdb == ""'
    code: |
      let body = if type_of(mdb.body) == "string" { mdb.body } else { "" };
      if (mdb.status == 200 || mdb.status == 206)
         && ereg("^(?s).{4}Standard (Jet|ACE) DB", body) { dlabel } else { "" }
    store_as: hit_mdb

  # Second loop group: report once, after the directory loop.
  - id: after-loop
    action: set_var
    var_name: loop_done
    var_value: true
    loop:
      var: pass
      over: ["once"]

  - id: report-mdb
    action: match
    source: hit_mdb
    pattern: "^/"
    on_match:
      finding:
        title: "ASP-DEv XM Events Diary diary.mdb Database Download (CVE-2008-5925)"
        description: "The diary's Microsoft Access database diary.mdb is stored under the web root and is served to unauthenticated clients: its first bytes carry the Access file signature. Anyone can download the whole database, including the administrator account."
        remediation: "Move diary.mdb outside the web root (and update the connection string), or deny HTTP access to .mdb files in the web server configuration."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{hit_mdb}}diary.mdb (Range: bytes=0-31) returned the Microsoft Access file signature (Standard Jet/ACE DB at offset 4); no content was kept"

View these feeds on GitHub