NetWin WebNews — 1 vulnerability check
noctis ships 1 vulnerability check for NetWin WebNews, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
NetWin WebNews Webnews.exe group parameter buffer overflow
| CVE | CVE-2002-0290 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 70 |
| Feed | tests/vulnerabilities/netwin-webnews/CVE-2002-0290.yaml |
Detects the NetWin WebNews CGI program Webnews.exe, a web front end to Usenet news. WebNews 1.1 and older copy an overlong "group" query parameter (about 1500 bytes) into a fixed stack buffer, which lets a remote attacker run code with the rights of the web server account (CVE-2002-0290). The test requests Webnews.exe under the web root, /cgi-bin and /scripts, and reports one that answers with HTTP 200 with a page (not a file download) while a random name with the same extension in the same directory is refused with a 4xx status (so servers that answer every path are not reported). The long parameter is never sent; the vendor patch kept the program name, so a patched installation is reported too and its build date must be checked against the vendor's February 2002 fix.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{loc.dir}}/Webnews.exe - HTTP(S) request
GET {{loc.dir}}/{{ctl}}.exe - Parses / computes the next value with a Rhai script
- Checks
verdictfor^WEBNEWS_PROGRAM_PRESENT$→ finding QoD 70: NetWin WebNews Webnews.exe present — CVE-2002-0290
References:
- https://nvd.nist.gov/vuln/detail/CVE-2002-0290
- https://seclists.org/bugtraq/2002/Feb/250
- https://www.securityfocus.com/bid/4124
Feed source — tests/vulnerabilities/netwin-webnews/CVE-2002-0290.yaml
# NetWin WebNews 1.1 — Webnews.exe "group" parameter stack buffer overflow
# (CVE-2002-0290, NGSSoftware advisory NISR18022002, Bugtraq 2002-02-18,
# BID 4124)
#
# Credit: target file adapted from Greenbone's `pre2008/webnews.nasl`
# (GPL-2.0-only, OID 1.3.6.1.4.1.25623.1.0.11732), which reports when
# /Webnews.exe is installed (http_is_cgi_installed_ka) under / and the CGI
# directories.
#
# Advisory facts: WebNews is NetWin's web front end to Usenet news, a CGI
# (Webnews.exe) usually installed under IIS 4/5 on Windows NT/2000. In WebNews
# 1.1 and older, a query string whose "group" parameter is overlong (about
# 1500 bytes), sent with a valid session "utoken", overflows a stack buffer and
# runs code as the IIS anonymous account. NetWin shipped a patched build on
# 2002-02-14 under the same program name; the advisory names no fixed version
# number and no version string the program prints.
#
# Why no exploitation proof: the only trigger is the overflow itself, which
# crashes the CGI or runs attacker code. No benign request tells 1.1 from the
# patched build, so this is a presence check at QoD 70.
#
# Better than the reference check:
# - a random sibling name with the same extension in the same directory is
# requested as a control and must be refused with a 4xx status, so
# catch-all / soft-404 servers that answer 200 for any name are not
# reported; a control that gets no reply gives no finding (fail-closed);
# - a 200 that is a file download (binary content type or a body starting
# with "MZ") is not reported: an installer mirror, or a directory without
# execute permission that serves the binary instead of running it;
# - the long "group" value is never sent.
uid: e44f2a6d-775b-4d20-acf1-1a0fc3e79ced
name: "NetWin WebNews Webnews.exe group parameter buffer overflow (CVE-2002-0290)"
description: |
Detects the NetWin WebNews CGI program Webnews.exe, a web front end to
Usenet news. WebNews 1.1 and older copy an overlong "group" query parameter
(about 1500 bytes) into a fixed stack buffer, which lets a remote attacker
run code with the rights of the web server account (CVE-2002-0290). The test
requests Webnews.exe under the web root, /cgi-bin and /scripts, and reports
one that answers with HTTP 200 with a page (not a file download) while a
random name with the same extension in the same directory is refused with a
4xx status (so servers that answer every path are not reported). The long
parameter is never sent; the vendor patch kept the program name, so a
patched installation is reported too and its build date must be checked
against the vendor's February 2002 fix.
cves: [CVE-2002-0290]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [netwin, webnews, usenet, cgi, buffer-overflow, rce]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2002-0290"
- "https://seclists.org/bugtraq/2002/Feb/250"
- "https://www.securityfocus.com/bid/4124"
steps:
# Random sibling name for the soft-404 control, shared by every location.
- id: mint-control
action: script
code: '"noctis" + rand_hex(8)'
store_as: ctl
# ── Per location: this step and every following one ──
# Pre-initialised so a failed request leaves no undefined variable behind.
- id: init-page
action: set_var
var_name: page
var_value: {status: 0}
loop:
over:
- {dir: ""}
- {dir: "/cgi-bin"}
- {dir: "/scripts"}
var: loc
- id: init-control
action: set_var
var_name: control
var_value: {status: 0}
- id: probe-program
action: http_request
method: GET
path: "{{loc.dir}}/Webnews.exe"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: page
- id: probe-control
action: http_request
method: GET
path: "{{loc.dir}}/{{ctl}}.exe"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: "page.status == 200"
store_as: control
# Fixed verdict string as the match source, so no page content reaches the
# finding.
- id: verdict
action: script
code: |
let v = "";
// A CGI that runs answers with a page; a file the server only hands out
// (installer mirror, directory without execute permission) is a
// download: binary content type or the "MZ" header of a Windows binary.
let download = false;
if page.status == 200 {
let ct = "";
if "content-type" in page.headers { ct = tolower(page.headers["content-type"]); }
download = ct.contains("octet-stream") || ct.contains("msdownload") || ct.contains("msdos-program") || ct.contains("x-dosexec") || page.body.starts_with("MZ");
}
if page.status == 200 && !download && control.status >= 400 && control.status < 500 { v = "WEBNEWS_PROGRAM_PRESENT"; }
v
store_as: verdict
- id: program-present
action: match
source: verdict
pattern: '^WEBNEWS_PROGRAM_PRESENT$'
on_match:
finding:
title: "NetWin WebNews Webnews.exe present — CVE-2002-0290"
description: "{{loc.dir}}/Webnews.exe of NetWin WebNews answered, while a random .exe name in the same directory was refused. WebNews 1.1 and older overflow a stack buffer when Webnews.exe receives an overlong group parameter, letting a remote attacker run code as the web server account (CVE-2002-0290). The overflow was not sent, so an installation carrying the vendor patch cannot be told apart."
remediation: "Install NetWin's patched WebNews build of February 2002 or later, or remove Webnews.exe from the web server. Restrict the query string length the web server accepts (for example IIS URLScan / request filtering MaxQueryString) as a stopgap."
confidence_delta: 0.40
qod: 70
evidence: "GET {{loc.dir}}/Webnews.exe returned HTTP {{page.status}}; control GET {{loc.dir}}/{{ctl}}.exe returned HTTP {{control.status}}"
stop: true