SunFTP — 1 vulnerability check
noctis ships 1 vulnerability check for SunFTP, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
SunFTP Server Long Request Buffer Overflow
| CVE | CVE-2000-0856 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | ftp |
| Detection | set_var, tcp_dialogue, script, match · highest QoD 70 |
| Feed | tests/vulnerabilities/sunftp/CVE-2000-0856.yaml |
SunFTP build 9, a small FTP server written in Delphi, copies an incoming request line into a fixed-size buffer without checking its length: a line of more than about 2100 characters overwrites the server's memory, which crashes the service and may let a remote attacker run code. The product was discontinued and no fixed build exists. The check reads the FTP greeting ("220 ... FTP Server (SunFTP b9) ready") and reports a SunFTP server whose build number is 9 or lower. It is a version check: the flaw is only triggered by overwriting server memory, so no exploit is sent.
How noctis detects it
- TCP dialogue:
QUIT - Parses / computes the next value with a Rhai script
- Checks
sunbuildfor^[0-9]→ finding QoD 70: FTP greeting: SunFTP b… (build 9 or earlier; the product was discontinued without a fix; overflow not triggered).
References:
- https://nvd.nist.gov/vuln/detail/CVE-2000-0856
- https://seclists.org/bugtraq/2000/Sep/8
- https://www.securityfocus.com/bid/1638
Feed source — tests/vulnerabilities/sunftp/CVE-2000-0856.yaml
# SunFTP (small Delphi FTP server distributed from xs4all.dk/sunftp, CPE
# xs4all_data:xs4all_data_sunftp) build 9 — buffer overflow on an input line
# longer than ~2100 bytes (CVE-2000-0856, BID 1638, SecuriTeam / Beyond
# Security advisory, bugtraq 2000-09-01). The project was discontinued and no
# fixed build was released.
#
# Backlog issue #1568. Source NVT: OpenVAS/Greenbone
# pre2008/sunftpd_overflow.nasl (OID 1.3.6.1.4.1.25623.1.0.11373,
# GPL-2.0-only). Its safe-checks branch reports a greeting containing
# "SunFTP b9"; its other branch sends 2200 bytes and reports when the server
# stops answering — that is the overflow itself (a crash), so it is not
# ported.
#
# Version check on purpose: the only trigger overwrites the server's memory,
# so there is no benign proof. Greeting form quoted by the advisory:
# 220 hostname FTP Server (SunFTP b9) ready on port 21.
# Deviations from the NVT:
# * the build number is anchored ("SunFTP b9" no longer matches a
# hypothetical b90) and earlier builds (b1–b8) are reported too: the
# advisory knows no fixed build and the product ends at build 9;
# * the product token must sit on a 220 greeting line, so a reply that
# merely echoes "SunFTP b9" later in the dialogue does not count.
# Nothing is sent but QUIT.
uid: fdf3e4f4-da33-419b-b71c-cb16589ffd30
name: "SunFTP Server Long Request Buffer Overflow (CVE-2000-0856)"
description: |
SunFTP build 9, a small FTP server written in Delphi, copies
an incoming request line into a fixed-size buffer without checking its
length: a line of more than about 2100 characters overwrites the server's
memory, which crashes the service and may let a remote attacker run code.
The product was discontinued and no fixed build exists. The check reads the
FTP greeting ("220 ... FTP Server (SunFTP b9) ready") and reports a SunFTP
server whose build number is 9 or lower. It is a version check: the flaw is
only triggered by overwriting server memory, so no exploit is sent.
cves: [CVE-2000-0856]
cvss: 7.5 # NVD publishes only a CVSS v2 base score (7.5) for this CVE
severity: high
category: rce
confidence_base: 0.30
tags: [sunftp, ftp, buffer-overflow, version-check, unauthenticated]
services: [ftp]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2000-0856"
- "https://seclists.org/bugtraq/2000/Sep/8"
- "https://www.securityfocus.com/bid/1638"
steps:
- id: init-greet
action: set_var
var_name: greet
var_value: {banner: "", transcript: ""}
# The greeting, then QUIT (its read also catches a late greeting).
- id: greeting
action: tcp_dialogue
port: "{{port}}"
read_banner: true
timeout_secs: 10
commands:
- "QUIT"
store_as: greet
- id: build
action: script
code: |
let t = "";
if type_of(greet.banner) == "string" { t += greet.banner; }
if type_of(greet.transcript) == "string" { t += "\n" + greet.transcript; }
let m = eregmatch("(?im)^220[ -].*\\bSunFTP b([0-9]{1,3})\\b", t);
if m.len() < 2 { "" } else if int(m[1]) <= 9 { m[1] } else { "" }
store_as: sunbuild
- id: vulnerable-build
action: match
source: sunbuild
pattern: "^[0-9]"
on_match:
stop: true
finding:
confidence_delta: 0.45
qod: 70
evidence: "FTP greeting: SunFTP b{{sunbuild}} (build 9 or earlier; the product was discontinued without a fix; overflow not triggered)."
remediation: "SunFTP is discontinued and no fixed build exists: replace it with a maintained FTP server, and restrict the FTP service to trusted networks meanwhile."