BlackJumboDog — 1 vulnerability check

noctis ships 1 vulnerability check for BlackJumboDog, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

BlackJumboDog FTP Server Multiple Command Buffer Overflow

CVECVE-2004-1439
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Servicesftp
Detectionset_var, tcp_dialogue, script, match · highest QoD 70
Feedtests/vulnerabilities/blackjumbodog/CVE-2004-1439.yaml

BlackJumboDog before 3.6.2 copies the argument of several FTP commands (USER and PASS before any login, then RETR, CWD, XMKD and XRMD) into a fixed-size stack buffer without checking its length: an overlong argument overwrites the stack and lets a remote attacker run code on the Windows host or crash the server. The check reads the FTP greeting and reports a BlackJumboDog server ("BlackJumboDog Version x.y.z", including the -RAS edition) older than 3.6.2. It is a version check: the flaw is only triggered by overwriting server memory, so no exploit is sent.

How noctis detects it

  1. TCP dialogue: QUIT
  2. Parses / computes the next value with a Rhai script
  3. Checks bjdver for ^[0-9] → finding QoD 70: FTP greeting: BlackJumboDog Version … (before 3.6.2; overflow not triggered).

References:

Feed source — tests/vulnerabilities/blackjumbodog/CVE-2004-1439.yaml
# BlackJumboDog FTP server — stack overflow in the USER / PASS / RETR / CWD /
# XMKD / XRMD argument handling (CVE-2004-1439), fixed in 3.6.2 (28 July 2004).
#
# Backlog issue #1535. Source NVT: OpenVAS/Greenbone
# pre2008/Black_JumboDog_FTP_overflow.nasl (OID 1.3.6.1.4.1.25623.1.0.14256,
# GPL-2.0-only). Its safe-checks branch is a greeting version check
# (BlackJumboDog 3.0 – 3.6.1); its other branch sends "USER " + 300 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 stack, so
# there is no benign proof. Greeting form from the public exploit output
# (bugtraq 2004-09 / EDB-439) and nmap-service-probes:
#   220 FTP ( BlackJumboDog Version 3.6.1 ) ready
#   220 FTP ( BlackJumboDog(-RAS) Version 3.6.1 ) ready   (NVT comment; the
#   -RAS edition may also print "BlackJumboDog-RAS" — both forms accepted)
# Range widened from the NVT's 3.0–3.6.1 to every release before 3.6.2 (the
# vendor note says "3.6.1 and earlier"). Nothing is sent but QUIT.
uid: e3a1534f-60b6-40c4-90d9-f255c6fe6a44
name: "BlackJumboDog FTP Server Multiple Command Buffer Overflow (CVE-2004-1439)"
description: |
  BlackJumboDog before 3.6.2 copies the argument of several FTP commands
  (USER and PASS before any login, then RETR, CWD, XMKD and XRMD) into a
  fixed-size stack buffer without checking its length: an overlong argument
  overwrites the stack and lets a remote attacker run code on the Windows host
  or crash the server. The check reads the FTP greeting and reports a
  BlackJumboDog server ("BlackJumboDog Version x.y.z", including the -RAS
  edition) older than 3.6.2. It is a version check: the flaw is only triggered
  by overwriting server memory, so no exploit is sent.
cves: [CVE-2004-1439]
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: [blackjumbodog, ftp, buffer-overflow, windows, version-check, unauthenticated]
services: [ftp]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2004-1439"
  - "https://www.kb.cert.org/vuls/id/714584"
  - "https://seclists.org/bugtraq/2004/Sep/90"
  - "https://www.exploit-db.com/exploits/439"

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: version
    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[ -].*\\bBlackJumboDog(?:\\(-RAS\\)|-RAS)? Version ([0-9]+(?:\\.[0-9]+)*)", t);
      if m.len() < 2 { "" } else {
        let p = split(m[1], ".");
        let major = int(p[0]);
        let minor = if p.len() > 1 { int(p[1]) } else { 0 };
        let patch = if p.len() > 2 { int(p[2]) } else { 0 };
        if major < 3 || (major == 3 && (minor < 6 || (minor == 6 && patch < 2))) { m[1] } else { "" }
      }
    store_as: bjdver

  - id: vulnerable-version
    action: match
    source: bjdver
    pattern: "^[0-9]"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.45
        qod: 70
        evidence: "FTP greeting: BlackJumboDog Version {{bjdver}} (before 3.6.2; overflow not triggered)."
        remediation: "Upgrade BlackJumboDog to 3.6.2 or later, and restrict the FTP service to trusted networks."

View these feeds on GitHub