DevoyBB — 1 vulnerability check

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

← All products · Feeds on GitHub

DevoyBB Web Forum 1.0.0 SQL Injection and Cross-Site Scripting (version check)

CVECVE-2004-2177, CVE-2004-2178
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 70
Feedtests/vulnerabilities/devoybb/devoybb-multiple-flaws.yaml

Requests index.php of a DevoyBB Web Forum at the web root and under the usual install folders (/devoybb, /forum, /forums, /board). The page is recognised as DevoyBB by its "- Powered by DevoyBB" title, and the version is read from the "Powered by DevoyBB <version>" footer link (to xtreme-boards.com in 1.0.0, to devoybb.com from 1.0.1 on). Versions 0.x and 1.0.0 are reported: they are affected by an SQL injection (CVE-2004-2178) and a cross-site scripting flaw (CVE-2004-2177), fixed in 1.0.1. The flaws themselves are not exercised, as their entry points were never published; only one page per folder is read.

How noctis detects it

  1. HTTP(S) request GET {{dir}}/index.php
  2. Parses / computes the next value with a Rhai script
  3. Checks ver_hit for ^/ → finding QoD 70: DevoyBB Web Forum 1.0.0 SQL Injection and Cross-Site Scripting (version check)

References:

Feed source — tests/vulnerabilities/devoybb/devoybb-multiple-flaws.yaml
# DevoyBB Web Forum 1.0.0 multiple flaws — CVE-2004-2177 (XSS), CVE-2004-2178 (SQLi)
#
# NVD: "Cross-site scripting (XSS) vulnerability in DevoyBB Web Forum 1.0.0"
# and "SQL injection vulnerability in DevoyBB Web Forum 1.0.0 ... via unknown
# vectors" (MaxPatrol advisory 11, BID 11428, fixed in 1.0.1). The vectors were
# never published and SourceForge only keeps releases from 1.0.2a on, so the
# vulnerable code cannot be diffed against the fix: no benign in-band proof is
# possible, and this is a version check (QoD 70).
#
# Real page layout (DevoyBB 1.0.2a, styles/default/templates/index.htm and
# footer.htm): the <title> and the footer sit on DIFFERENT lines —
#   <title>$boardname: Main Page - Powered by DevoyBB</title>
#   ...
#   Powered by <a href="http://www.devoybb.com" target="_blank"><strong>$version</strong></a>
# with $version = "DevoyBB 1.0.2a" (libraries/sql.php). In 1.0.0 the footer
# link pointed to xtreme-boards.com (the product's former name): the 1.0.2a
# DOCS/Changelog.txt, "1.0.1 RC 1", changes $version="DevoyBB 1.0.0" and
# "Fixes all links from Xtreme-Boards.com to DevoyBB.com", footer.htm
# included. Both link hosts are accepted.
#
# Ported from OpenVAS/Greenbone NVT pre2008/devoyBB_flaws.nasl
# (OID 1.3.6.1.4.1.25623.1.0.15556, GPL-2.0-only). Improvements: the source
# check runs one line-based egrep needing title AND footer on the same line,
# which the real multi-line page never satisfies, and its footer regex wants
# the devoybb.com link that only appeared in the fixed 1.0.1, so it could not
# fire on a real 1.0.0. This feed checks the two markers separately over the
# whole page and accepts the xtreme-boards.com link of 1.0.0. It also tries
# the usual install folders (/devoybb, /forum, /forums, /board), not only the
# web root.
#
# CVSS: NVD v2 only (no v3 score): 7.5 for CVE-2004-2178.
uid: f2fc7066-5d39-411c-9a30-0ead2a39d6de
name: "DevoyBB Web Forum 1.0.0 SQL Injection and Cross-Site Scripting (version check)"
description: |
  Requests index.php of a DevoyBB Web Forum at the web root and under the
  usual install folders (/devoybb, /forum, /forums, /board). The page is
  recognised as DevoyBB by its "- Powered by DevoyBB" title, and the version
  is read from the "Powered by DevoyBB <version>" footer link (to
  xtreme-boards.com in 1.0.0, to devoybb.com from 1.0.1 on).
  Versions 0.x and 1.0.0 are reported: they are affected by an SQL injection
  (CVE-2004-2178) and a cross-site scripting flaw (CVE-2004-2177), fixed in
  1.0.1. The flaws themselves are not exercised, as their entry points were
  never published; only one page per folder is read.
cves: [CVE-2004-2177, CVE-2004-2178]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [devoybb, php, forum, sqli, xss, version-check, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2004-2177"
  - "https://nvd.nist.gov/vuln/detail/CVE-2004-2178"
  - "http://www.securityfocus.com/bid/11428"
  - "https://sourceforge.net/projects/devoybb/"
  # OpenVAS/Greenbone NASL pre2008/devoyBB_flaws.nasl (GPL-2.0-only)

steps:
  # Loop group: the steps below run once per install folder; a finding stops it.
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/devoybb", "/forum", "/forums", "/board"]

  - id: index-probe
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: page

  # Title and footer are matched separately: they are on different lines.
  - id: version-check
    action: script
    code: |
      let body = if page.status == 200 && type_of(page.body) == "string" { page.body } else { "" };
      let hit = "";
      if body.contains(" - Powered by DevoyBB</title>") {
        let m = eregmatch("Powered by <a href=[\"']?http://www\\.(devoybb|xtreme-boards)\\.com[^>]*><strong>DevoyBB ([0-9][0-9A-Za-z.]*)</strong>", body, true);
        if type_of(m) == "array" && m.len() > 2 {
          let v = m[2];
          if ereg("^(0\\.[0-9]|1\\.0(\\.0)?$)", v) {
            hit = (if dir == "" { "/" } else { dir }) + " (DevoyBB " + v + ")";
          }
        }
      }
      hit
    store_as: ver_hit

  - id: report-version
    action: match
    source: ver_hit
    pattern: "^/"
    condition: 'ver_hit != ""'
    on_match:
      finding:
        title: "DevoyBB Web Forum 1.0.0 SQL Injection and Cross-Site Scripting (version check)"
        description: "The forum's index page identifies DevoyBB Web Forum at version 1.0.0 or earlier. These versions are affected by an SQL injection that lets a remote attacker run arbitrary SQL commands (CVE-2004-2178) and by a cross-site scripting flaw (CVE-2004-2177). The flaws were not exercised: their entry points were never published, so the result rests on the version shown in the page footer."
        remediation: "Upgrade DevoyBB to 1.0.1 or later. The project is no longer maintained: consider replacing the forum."
        confidence_delta: 0.40
        qod: 70
        evidence: "install dir {{ver_hit}}: \"- Powered by DevoyBB\" title and \"Powered by DevoyBB <version>\" footer"
      stop: true

View these feeds on GitHub