Misconfigurations & exposures — 44 vulnerability checks

Checks that are not tied to one product: exposed services, weak protocol configuration and features open to abuse. Each one runs on every matching service noctis is given.

← All products · Feeds on GitHub

Apache Spark master exposed without authentication

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 70
Feedtests/vulnerabilities/general/spark-master-exposed.yaml

The Spark standalone master returned cluster status to an unauthenticated request. An exposed master commonly permits unauthenticated application submission (remote code execution on the cluster).

How noctis detects it

  1. HTTP(S) request GET /json/
  2. Checks spark.body for spark:// → finding QoD 70: Apache Spark master exposed without authentication

References:

Feed source — tests/vulnerabilities/general/spark-master-exposed.yaml
# Flag an Apache Spark standalone master exposed without authentication.
# The master UI/REST reachable unauthenticated means the cluster state is
# readable and (via the standalone REST submission gateway) arbitrary
# applications can be submitted — remote code execution on the workers.
# GET /json/ returns the cluster status (spark:// URL, ALIVE, worker list).
uid: 4a9c2e68-7d13-4b05-9f20-6c1b8e34a0d7
name: "Apache Spark master exposed without authentication"
description: |
  The Spark standalone master returned cluster status to an unauthenticated
  request. An exposed master commonly permits unauthenticated application
  submission (remote code execution on the cluster).
cves: []
category: exposure
severity: critical
confidence_base: 0.45
tags: [spark, unauthenticated, exposure, rce, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://spark.apache.org/docs/latest/security.html"
steps:
  - id: spark-json
    action: http_request
    method: GET
    path: "/json/"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: spark
  - id: check-cluster
    action: match
    source: spark.body
    pattern: "spark://"
    condition: "spark.status == 200"
    on_match:
      finding:
        title: "Apache Spark master exposed without authentication"
        description: "GET /json/ returned the Spark cluster status without credentials; the standalone master is exposed."
        remediation: "Enable authentication (spark.authenticate), restrict the master/REST ports (7077/6066/8080) behind the cluster network, and firewall them."
        confidence_delta: 0.35
        qod: 70
        evidence: "GET /json/ (HTTP {{spark.status}}): {{spark.body}}"

finger "0" query discloses unused system accounts

CVECVE-1999-0197
Severitycritical · CVSS 10.0
Categoryexposure — Exposure
Servicesfinger
Detectionscript, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 75
Feedtests/vulnerabilities/general/CVE-1999-0197.yaml

Sends the finger query "0" (as in `finger 0@host`) to the finger service and checks whether the reply lists local accounts: at least two well-known system logins (daemon, bin, sys, adm, lp, uucp, nobody…) must appear as listed entries. A second query for a random login that does not exist serves as a control, so a service that returns the same list for every query is not reported. Vulnerable daemons list every account that has never logged in, which hands an attacker valid login names for password guessing. Read-only: two finger queries, nothing is changed on the target.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. Parses / computes the next value with a Rhai script
  4. Parses / computes the next value with a Rhai script
  5. Parses / computes the next value with a Rhai script
  6. Opens a persistent TCP/TLS socket
  7. Sends 0 on the open socket
  8. Parses / computes the next value with a Rhai script
  9. Sends … on the open socket
  10. Parses / computes the next value with a Rhai script
  11. Opens a persistent TCP/TLS socket
  12. Sends {{ctl}} on the open socket
  13. Sends … on the open socket
  14. Parses / computes the next value with a Rhai script
  15. … and 2 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/general/CVE-1999-0197.yaml
# Detect the finger "0@host" account-list disclosure (CVE-1999-0197).
#
# Port of OpenVAS `2011/gb_finger_unused_account_disc_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.902555, GPL-2.0-only): send the query "0" to the
# finger service and look for system account names in a reply over 150 bytes.
# Affected daemons (SunOS/Solaris in.fingerd, some GNU finger builds) answer "0"
# with every account that has never logged in — the system accounts (daemon,
# bin, sys, adm, lp, uucp, nobody…) plus forgotten user accounts, i.e. a list of
# valid login names to attack.
#
# Read-only: two finger queries, nothing is written on the target.
#
# Better than the NASL:
#  - The NASL takes a bare substring ("lp", "bin", "sys", "adm", "daemon") anywhere
#    in a reply over 150 bytes as proof: "help", "binary", "system", "admin" in any
#    long reply match. Here at least two distinct system account names must appear
#    as a listed login (start of a line, or after "Login:" / "Login name:").
#  - A finger service that dumps the same account list for ANY query is not this
#    bug (general/finger-exposed covers it). A second query for a random
#    non-existent login is the control: when it lists accounts too, no finding.
#    If the control session gets no reply at all, the finding drops to QoD 70.
#  - A daemon slower than the engine's 500 ms read window (#1417), or one that
#    pauses mid-reply, gets a second, late read instead of being missed.
uid: 3f6c2a91-7d4e-4b58-9e0a-c21b5d8f4a63
name: "CVE-1999-0197 — finger \"0\" query discloses unused system accounts"
description: |
  Sends the finger query "0" (as in `finger 0@host`) to the finger service and
  checks whether the reply lists local accounts: at least two well-known system
  logins (daemon, bin, sys, adm, lp, uucp, nobody…) must appear as listed
  entries. A second query for a random login that does not exist serves as a
  control, so a service that returns the same list for every query is not
  reported. Vulnerable daemons list every account that has never logged in,
  which hands an attacker valid login names for password guessing. Read-only:
  two finger queries, nothing is changed on the target.
cves: [CVE-1999-0197]
cvss: 10.0
severity: critical
category: exposure
confidence_base: 0.30
tags: [finger, info-disclosure, user-enumeration, legacy, solaris]
services: [finger]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-1999-0197"
  - "https://www.rfc-editor.org/rfc/rfc1288"
  - "OpenVAS/Greenbone NASL 2011/gb_finger_unused_account_disc_vuln.nasl (OID 1.3.6.1.4.1.25623.1.0.902555, GPL-2.0-only)"

steps:
  # Random control login (8 chars, the classic Unix login-name limit).
  - id: mint-control
    action: script
    code: '"nx" + rand_hex(3)'
    store_as: ctl

  # Pre-initialise every stored result read later (an undefined var aborts the test).
  - id: init
    action: script
    code: '#{ responded: false, response: () }'
    store_as: q0late
  - id: init-ctl-late
    action: script
    code: '#{ responded: false, response: () }'
    store_as: qcl
  - id: init-ctl
    action: script
    code: '#{ responded: false, response: () }'
    store_as: qc
  - id: init-ctl-parse
    action: script
    code: '#{ n: 0, names: "", answered: false, verdict: "none" }'
    store_as: pc

  # ── 1. The "0" query.
  - id: open-zero
    action: tcp_open
    handle: f0
    port: "{{port}}"
    timeout_secs: 10
    store_as: c0
  - id: query-zero
    action: tcp_send
    handle: f0
    condition: "c0.connected == true"
    send: "0\r\n"
    store_as: q0
  # Late read when the reply was empty or too short to list accounts: a slow daemon,
  # or one that pauses mid-reply beyond the engine's 500 ms idle window.
  - id: parse-zero-first
    action: script
    condition: "c0.connected == true"
    store_as: p0
    code: |
      let txt = "";
      if type_of(q0.response) == "string" { txt += q0.response; }
      let accounts = ["daemon", "bin", "sys", "adm", "lp", "uucp", "nuucp", "listen",
                      "nobody", "noaccess", "nobody4", "smtp", "smmsp", "mail", "news",
                      "games", "man", "sync", "operator", "ftp"];
      let n = 0;
      let names = "";
      for a in accounts {
        if ereg("(?m)^\\s*(?:Login(?: name)?:\\s*)?" + a + "(?:\\s|$)", txt) {
          n += 1;
          names += if names == "" { a } else { ", " + a };
        }
      }
      #{ n: n, names: names }
  - id: wait-zero
    action: sleep
    condition: "c0.connected == true && p0.n < 2"
    duration_ms: 3000
  - id: late-zero
    action: tcp_send
    handle: f0
    condition: "c0.connected == true && p0.n < 2"
    send: ""
    store_as: q0late
  - id: close-zero
    action: tcp_close
    handle: f0

  - id: parse-zero
    action: script
    condition: "c0.connected == true"
    store_as: p0
    code: |
      let txt = "";
      if type_of(q0.response) == "string" { txt += q0.response; }
      if type_of(q0late.response) == "string" { txt += "\n" + q0late.response; }
      let accounts = ["daemon", "bin", "sys", "adm", "lp", "uucp", "nuucp", "listen",
                      "nobody", "noaccess", "nobody4", "smtp", "smmsp", "mail", "news",
                      "games", "man", "sync", "operator", "ftp"];
      let n = 0;
      let names = "";
      for a in accounts {
        if ereg("(?m)^\\s*(?:Login(?: name)?:\\s*)?" + a + "(?:\\s|$)", txt) {
          n += 1;
          names += if names == "" { a } else { ", " + a };
        }
      }
      #{ n: n, names: names }

  # ── 2. Control: a random login that does not exist. Only when "0" listed accounts.
  - id: open-ctl
    action: tcp_open
    handle: fc
    port: "{{port}}"
    timeout_secs: 10
    condition: "c0.connected == true && p0.n >= 2"
    store_as: cc
  - id: query-ctl
    action: tcp_send
    handle: fc
    condition: "c0.connected == true && p0.n >= 2 && cc.connected == true"
    send: "{{ctl}}\r\n"
    store_as: qc
  # Always read late on the control: a half-read reply must not pass as "clean".
  - id: wait-ctl
    action: sleep
    condition: "c0.connected == true && p0.n >= 2 && cc.connected == true"
    duration_ms: 3000
  - id: late-ctl
    action: tcp_send
    handle: fc
    condition: "c0.connected == true && p0.n >= 2 && cc.connected == true"
    send: ""
    store_as: qcl
  - id: close-ctl
    action: tcp_close
    handle: fc

  - id: parse-ctl
    action: script
    condition: "c0.connected == true && p0.n >= 2"
    store_as: pc
    code: |
      let txt = "";
      if type_of(qc.response) == "string" { txt += qc.response; }
      if type_of(qcl.response) == "string" { txt += "\n" + qcl.response; }
      let accounts = ["daemon", "bin", "sys", "adm", "lp", "uucp", "nuucp", "listen",
                      "nobody", "noaccess", "nobody4", "smtp", "smmsp", "mail", "news",
                      "games", "man", "sync", "operator", "ftp"];
      let n = 0;
      for a in accounts {
        if ereg("(?m)^\\s*(?:Login(?: name)?:\\s*)?" + a + "(?:\\s|$)", txt) { n += 1; }
      }
      let answered = strlen(txt) > 0;
      let verdict = if !answered { "silent" } else if n >= 2 { "dump" } else { "clean" };
      #{ n: n, names: "", answered: answered, verdict: verdict }

  # ── 3. Findings.
  - id: report-confirmed
    action: match
    source: pc.verdict
    pattern: "^clean$"
    condition: "c0.connected == true && p0.n >= 2"
    on_match:
      finding:
        title: "finger \"0\" query discloses unused system accounts"
        description: "The finger service answers the query \"0\" with a list of local accounts, while a query for a non-existent login lists none. Anyone can collect valid login names (system and never-used accounts) for password guessing."
        remediation: "Disable the finger daemon (comment out the finger line in /etc/inetd.conf or disable the svc:/network/finger service) or apply the vendor fix, and block TCP port 79 at the firewall."
        confidence_delta: 0.55
        qod: 75
        evidence: "finger query \"0\" listed {{p0.n}} system accounts ({{p0.names}}); control query for the non-existent login {{ctl}} answered without listing accounts"

  - id: report-unconfirmed
    action: match
    source: pc.verdict
    pattern: "^silent$"
    condition: "c0.connected == true && p0.n >= 2"
    on_match:
      finding:
        title: "finger \"0\" query discloses unused system accounts (control unanswered)"
        description: "The finger service answers the query \"0\" with a list of local accounts. A control query for a non-existent login got no reply, so a service that lists accounts for every query cannot be ruled out."
        remediation: "Disable the finger daemon (comment out the finger line in /etc/inetd.conf or disable the svc:/network/finger service) or apply the vendor fix, and block TCP port 79 at the firewall."
        confidence_delta: 0.45
        qod: 70
        evidence: "finger query \"0\" listed {{p0.n}} system accounts ({{p0.names}}); control query for {{ctl}} got no reply"

FTP directory writeable by the anonymous account

CVECVE-1999-0527
Severitycritical · CVSS 10.0
Categoryexposure — Exposure
Servicesftp
Detectionscript, tcp_dialogue, match · highest QoD 97
Feedtests/vulnerabilities/general/CVE-1999-0527.yaml

The FTP server lets an anonymous session create directories. Anyone can store arbitrary content on the server (warez/malware drop, disk filling, and, when the tree is shared with a web root or another service, code execution).

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. TCP dialogue: USER anonymous, PASS noctis@example.com, QUIT
  3. Parses / computes the next value with a Rhai script
  4. TCP dialogue: USER anonymous, PASS noctis@example.com, MKD {{tok}}-0, MKD {{tok}}-0 (+29 more)
  5. Parses / computes the next value with a Rhai script
  6. Checks w.line for ^257 → finding QoD 97: FTP directory writeable by the anonymous account (CVE-1999-0527)

References:

Feed source — tests/vulnerabilities/general/CVE-1999-0527.yaml
# Detect FTP directories that the anonymous account can write to (CVE-1999-0527).
#
# Port of OpenVAS `ftp_writeable_directories.nasl` (OID 1.3.6.1.4.1.25623.1.0.19782,
# GPL-2.0-only), MODE_WRITE branch: log in anonymously, MKD a random directory,
# and if the server answers 2xx, RMD it again.
#
# Real, benign exploitation proof: we really create an EMPTY directory with a
# random per-run name and try to remove it straight away. No file is uploaded,
# nothing existing is touched. It writes on the target, hence the `intrusive` /
# `file-write` tags (`general/` only allows `exposure`, so exclude it by tag).
# Leftovers: a server that allows MKD but not RMD (vsftpd anon_mkdir_write_enable
# without anon_other_write_enable) keeps one empty `noctis-<hex>-<i>` directory in
# each writeable candidate; the evidence reports whether removal worked.
# Write commands are only sent after the anonymous login succeeded (230).
#
# Better than the NASL:
#  - The NASL takes any 2xx reply to MKD as proof. A honeypot/tarpit FTP server
#    that answers 257 to everything is a false positive there. Here the finding
#    needs (a) a 257 reply that names OUR random directory and (b) a replayed MKD
#    of the same path NOT answered with 257 (a real server says 550 "exists"),
#    which proves the directory really exists on the server.
#  - The NASL only writes into directories it reaches through a passive-mode
#    LIST crawl. noctis has no FTP data channel, so we try the login directory
#    plus the usual anonymous upload drop-boxes (/incoming, /upload, /pub/...).
#    That also covers unlistable drop-boxes (`-wx`) where MKD is allowed, which a
#    LIST crawl cannot see. Like the NASL, an upload-only drop-box (STOR allowed,
#    MKD refused) is not detected: testing STOR needs the data channel.
#  - The NASL's safe_checks branch only guesses from `drwxrwxrwx` listing bits
#    (heavy FP/FN: the bits say nothing about the FTP server's own ACLs); we
#    don't ship that guess.
uid: c5e9bf0d-d027-41f6-bef0-97e260e08e57
name: "CVE-1999-0527 — FTP directory writeable by the anonymous account"
description: |
  The FTP server lets an anonymous session create directories. Anyone can store
  arbitrary content on the server (warez/malware drop, disk filling, and, when the
  tree is shared with a web root or another service, code execution).
cves: [CVE-1999-0527]
cvss: 10.0
severity: critical
category: exposure
confidence_base: 0.30
tags: [ftp, anonymous, writeable, upload, exposure, intrusive, file-write]
services: [ftp]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-1999-0527"
  - "OpenVAS/Greenbone NASL ftp_writeable_directories.nasl (OID 1.3.6.1.4.1.25623.1.0.19782, GPL-2.0-only)"

steps:
  # Per-run random directory name stem (16 lowercase hex chars).
  - id: mint-token
    action: script
    code: '"noctis-" + rand_hex(8)'
    store_as: tok

  # ── 1. Anonymous login only: no write command reaches a server that refuses it.
  - id: ftp-login
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    commands:
      - "USER anonymous"
      - "PASS noctis@example.com"
      - "QUIT"
    store_as: login

  - id: login-ok
    action: script
    code: |
      let t = if type_of(login.transcript) == "string" { login.transcript } else { "" };
      ereg("(^|\n)230[ -]", t)
    store_as: anon

  # ── 2. Anonymous login again, then for each candidate directory i:
  #       MKD <dir>/<tok>-<i>      (expect 257 on a writeable dir)
  #       MKD <dir>/<tok>-<i>      (replay: a real server now refuses — it exists)
  #       RMD <dir>/<tok>-<i>      (cleanup)
  # Candidate i ↔ directory: 0 login dir, 1 /incoming, 2 /upload, 3 /uploads,
  # 4 /pub, 5 /pub/incoming, 6 /pub/upload, 7 /public, 8 /tmp, 9 /files.
  # Keep this list in sync with `dirs` in the analyze step.
  - id: ftp-write
    action: tcp_dialogue
    condition: "anon == true"
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    commands:
      - "USER anonymous"
      - "PASS noctis@example.com"
      - "MKD {{tok}}-0"
      - "MKD {{tok}}-0"
      - "RMD {{tok}}-0"
      - "MKD /incoming/{{tok}}-1"
      - "MKD /incoming/{{tok}}-1"
      - "RMD /incoming/{{tok}}-1"
      - "MKD /upload/{{tok}}-2"
      - "MKD /upload/{{tok}}-2"
      - "RMD /upload/{{tok}}-2"
      - "MKD /uploads/{{tok}}-3"
      - "MKD /uploads/{{tok}}-3"
      - "RMD /uploads/{{tok}}-3"
      - "MKD /pub/{{tok}}-4"
      - "MKD /pub/{{tok}}-4"
      - "RMD /pub/{{tok}}-4"
      - "MKD /pub/incoming/{{tok}}-5"
      - "MKD /pub/incoming/{{tok}}-5"
      - "RMD /pub/incoming/{{tok}}-5"
      - "MKD /pub/upload/{{tok}}-6"
      - "MKD /pub/upload/{{tok}}-6"
      - "RMD /pub/upload/{{tok}}-6"
      - "MKD /public/{{tok}}-7"
      - "MKD /public/{{tok}}-7"
      - "RMD /public/{{tok}}-7"
      - "MKD /tmp/{{tok}}-8"
      - "MKD /tmp/{{tok}}-8"
      - "RMD /tmp/{{tok}}-8"
      - "MKD /files/{{tok}}-9"
      - "MKD /files/{{tok}}-9"
      - "RMD /files/{{tok}}-9"
      - "QUIT"
    store_as: ftp

  # ── 3. Which directory was really writeable?
  # A directory counts only when exactly ONE 257 reply names `<tok>-<i>`: the first
  # MKD created it and the replay was refused because it now exists. Two 257s for
  # the same name = a server that says "created" to everything → not counted.
  # Replies are matched by name (egrep over the transcript), so a slow reply that
  # shifts the per-command `responses` alignment cannot misattribute a 257.
  # `cleaned` (RMD reply read by position) is best-effort: it only feeds the evidence.
  - id: analyze
    action: script
    condition: "anon == true"
    code: |
      let dirs = ["(login directory)", "/incoming", "/upload", "/uploads", "/pub",
                  "/pub/incoming", "/pub/upload", "/public", "/tmp", "/files"];
      let t = if type_of(ftp.transcript) == "string" { ftp.transcript } else { "" };
      let resps = ftp.responses;
      let logged = ereg("(^|\n)230[ -]", t);
      let found = [];
      let line = "";
      let cleaned = true;
      if logged {
        for i in 0..10 {
          let name = tok + "-" + i;
          let hits = egrep("^257[ -].*" + name + "([^0-9a-zA-Z_-]|$)", t);
          let n = if hits == "" { 0 } else { split(hits, "\n").len() };
          if n == 1 {
            found.push(dirs[i]);
            if line == "" { line = hits; }
            // RMD reply: responses = [USER, PASS, then MKD, MKD, RMD per dir]
            let ri = 2 + i * 3 + 2;
            let rmd = if ri < resps.len() { resps[ri] } else { "" };
            if !ereg("^2", rmd) { cleaned = false; }
          }
        }
      }
      #{ writable: found.len() > 0, dirs: found, line: line, cleaned: cleaned }
    store_as: w

  # ── 4. Finding (gated on the confirmed write).
  - id: detect
    action: match
    condition: "anon == true && w.writable == true"
    source: w.line
    pattern: "^257"
    on_match:
      finding:
        title: "FTP directory writeable by the anonymous account (CVE-1999-0527)"
        description: "An anonymous FTP session created a directory with a random name (257 naming it, replayed MKD refused because it existed), proving anonymous write access. Removal of the probe directory was attempted with RMD right after (see evidence for whether it succeeded)."
        remediation: "Make the anonymous FTP tree read-only (vsftpd: anon_upload_enable=NO, anon_mkdir_write_enable=NO; ProFTPD: <Limit WRITE> DenyAll in <Anonymous>), or disable anonymous FTP. If an upload drop-box is required, make it write-only, on a separate filesystem, and never shared with a web root."
        confidence_delta: 0.65
        qod: 97
        evidence: "Anonymous MKD accepted in {{w.dirs}}: {{w.line}} (probe directory removed: {{w.cleaned}})"
      stop: true

CouchDB exposed without authentication (admin party)

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/couchdb-unauth.yaml

The CouchDB server returned the database list to an unauthenticated request, confirming "admin party" mode — anyone can read/write all databases.

How noctis detects it

  1. HTTP(S) request GET /_all_dbs
  2. Checks cdb.body for _replicator → finding QoD 75: CouchDB exposed without authentication (admin party)

References:

Feed source — tests/vulnerabilities/general/couchdb-unauth.yaml
# Flag an Apache CouchDB in "admin party" mode (no authentication).
# When no admin is configured, every request is served with admin rights.
# GET /_all_dbs then returns the database list (including the system DBs
# _users/_replicator); a secured node returns 401 unauthorized.
uid: 4c9a2e67-1b38-4d05-a9f2-7e3c6b84d012
name: "CouchDB exposed without authentication (admin party)"
description: |
  The CouchDB server returned the database list to an unauthenticated request,
  confirming "admin party" mode — anyone can read/write all databases.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [couchdb, unauthenticated, exposure, data-leak, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://docs.couchdb.org/en/stable/intro/security.html#the-admin-party"
steps:
  - id: couch-alldbs
    action: http_request
    method: GET
    path: "/_all_dbs"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: cdb
  - id: check-alldbs
    action: match
    source: cdb.body
    pattern: "_replicator"
    condition: "cdb.status == 200"
    on_match:
      finding:
        title: "CouchDB exposed without authentication (admin party)"
        description: "GET /_all_dbs returned the database list without credentials — CouchDB is in admin party mode."
        remediation: "Create a server admin (end the admin party), require authentication, bind to localhost, and firewall port 5984."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /_all_dbs (HTTP {{cdb.status}}): {{cdb.body}}"

Docker Engine API exposed without authentication

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/docker-api-exposed.yaml

The Docker Engine API answered an unauthenticated /version request over plain TCP. This grants full control of the host (privileged containers, host mounts).

How noctis detects it

  1. HTTP(S) request GET /version
  2. Checks dkr.body for "ApiVersion" → finding QoD 75: Docker Engine API exposed without authentication

References:

Feed source — tests/vulnerabilities/general/docker-api-exposed.yaml
# Flag a Docker Engine API exposed over plain TCP without authentication.
# An unauthenticated Docker API (default on 2375) is equivalent to root on the
# host: anyone can create a privileged container mounting the host filesystem.
# GET /version returns the engine version JSON ("ApiVersion"); a TLS-protected
# or absent daemon does not answer this over plain HTTP.
uid: 8d1b6c47-2e59-4a03-b7f0-3c6a9e24d5f1
name: "Docker Engine API exposed without authentication"
description: |
  The Docker Engine API answered an unauthenticated /version request over plain
  TCP. This grants full control of the host (privileged containers, host mounts).
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [docker, api, unauthenticated, exposure, rce, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://docs.docker.com/engine/security/protect-access/"
steps:
  - id: docker-version
    action: http_request
    method: GET
    path: "/version"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: dkr
  - id: check-version
    action: match
    source: dkr.body
    pattern: "\"ApiVersion\""
    condition: "dkr.status == 200"
    on_match:
      finding:
        title: "Docker Engine API exposed without authentication"
        description: "GET /version returned the Docker engine version without credentials — the API grants full host control."
        remediation: "Never expose the Docker API on plain TCP; use a local socket or mTLS (2376), and firewall port 2375."
        confidence_delta: 0.40
        qod: 75
        evidence: "GET /version (HTTP {{dkr.status}}): {{dkr.body}}"

Elasticsearch exposed without authentication

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/elasticsearch-unauth.yaml

The Elasticsearch REST API responds to an unauthenticated GET / with the cluster banner, exposing cluster metadata and, in almost all cases, every indexed document. A high-value data-leak exposure.

How noctis detects it

  1. HTTP(S) request GET /
  2. Checks es.body for You Know, for Search → finding QoD 75: Elasticsearch exposed without authentication

References:

Feed source — tests/vulnerabilities/general/elasticsearch-unauth.yaml
# Detect Elasticsearch nodes reachable without authentication.
#
# A GET / on an unauthenticated node returns a JSON banner with the cluster
# name, a version number, and the tagline "You Know, for Search". A node with
# security enabled answers 401 with a security_exception instead, so the banner
# never appears — making this a reliable, safe exposure check.
uid: 7f3d1b9a-4c62-4e8d-9a07-2b5e6c1f84d0
name: "Elasticsearch exposed without authentication"
description: |
  The Elasticsearch REST API responds to an unauthenticated GET / with the
  cluster banner, exposing cluster metadata and, in almost all cases, every
  indexed document. A high-value data-leak exposure.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [elasticsearch, unauthenticated, exposure, misconfig, data-leak]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-cluster.html"

steps:
  - id: es-root
    action: http_request
    method: GET
    path: "/"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: es

  - id: check-unauth
    action: match
    source: es.body
    # The tagline is unique to the Elasticsearch root banner and is only
    # returned when the request succeeds without credentials.
    pattern: "You Know, for Search"
    condition: "es.status == 200"
    on_match:
      finding:
        title: "Elasticsearch exposed without authentication"
        description: "GET / returned the Elasticsearch cluster banner without any credentials."
        remediation: "Enable the Elasticsearch security features (authentication + TLS), bind to localhost, and firewall port 9200."
        confidence_delta: 0.35
        qod: 75
        evidence: "Unauthenticated banner (HTTP {{es.status}}): {{es.body}}"

Hadoop YARN ResourceManager exposed without authentication

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/hadoop-yarn-exposed.yaml

The YARN ResourceManager REST API answered an unauthenticated request. An exposed RM allows unauthenticated application submission — remote code execution on the cluster nodes.

How noctis detects it

  1. HTTP(S) request GET /ws/v1/cluster/info
  2. Checks yarn.body for "clusterInfo" → finding QoD 75: Hadoop YARN ResourceManager exposed without authentication

References:

Feed source — tests/vulnerabilities/general/hadoop-yarn-exposed.yaml
# Flag a Hadoop YARN ResourceManager REST API exposed without authentication.
# An unauthenticated YARN RM allows anyone to submit applications, which run
# arbitrary commands on the cluster nodes (a widely-exploited RCE). GET
# /ws/v1/cluster/info returns the cluster info JSON when unauthenticated.
uid: 8e2c6a94-1d73-4b05-9f02-6c3b1e84a057
name: "Hadoop YARN ResourceManager exposed without authentication"
description: |
  The YARN ResourceManager REST API answered an unauthenticated request. An
  exposed RM allows unauthenticated application submission — remote code
  execution on the cluster nodes.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [hadoop, yarn, unauthenticated, exposure, rce, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SecureMode.html"
steps:
  - id: yarn-info
    action: http_request
    method: GET
    path: "/ws/v1/cluster/info"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: yarn
  - id: check-info
    action: match
    source: yarn.body
    pattern: "\"clusterInfo\""
    condition: "yarn.status == 200"
    on_match:
      finding:
        title: "Hadoop YARN ResourceManager exposed without authentication"
        description: "GET /ws/v1/cluster/info returned cluster info without credentials; the RM permits unauthenticated application submission (RCE)."
        remediation: "Enable Kerberos security and YARN ACLs, restrict the RM REST port to trusted hosts, and firewall it."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /ws/v1/cluster/info (HTTP {{yarn.status}}): {{yarn.body}}"

Jupyter server with authentication disabled

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/jupyter-no-auth.yaml

The Jupyter server returned its contents API to an unauthenticated request, indicating token/password auth is disabled — this allows arbitrary code execution on the host via a notebook/terminal.

How noctis detects it

  1. HTTP(S) request GET /api/contents
  2. Checks jup.body for "type"\s*:\s*"directory" → finding QoD 75: Jupyter server with authentication disabled

References:

Feed source — tests/vulnerabilities/general/jupyter-no-auth.yaml
# Flag a Jupyter Notebook/Server with authentication disabled.
# With no token/password, GET /api/contents returns the notebook directory
# listing to anyone — and a Jupyter session grants arbitrary code execution on
# the host. A secured server returns 403 (Forbidden) without a token.
uid: 6c1a9e47-3d82-4b05-a0f2-7e3c5b84d916
name: "Jupyter server with authentication disabled"
description: |
  The Jupyter server returned its contents API to an unauthenticated request,
  indicating token/password auth is disabled — this allows arbitrary code
  execution on the host via a notebook/terminal.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [jupyter, unauthenticated, exposure, rce, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://jupyter-server.readthedocs.io/en/latest/operators/security.html"
steps:
  - id: jupyter-contents
    action: http_request
    method: GET
    path: "/api/contents"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: jup
  - id: check-contents
    action: match
    source: jup.body
    pattern: "\"type\"\\s*:\\s*\"directory\""
    condition: "jup.status == 200"
    on_match:
      finding:
        title: "Jupyter server with authentication disabled"
        description: "GET /api/contents returned a directory listing without a token — Jupyter auth is disabled (code execution risk)."
        remediation: "Enable token or password auth (ServerApp.token / .password), bind to localhost, and front with an authenticating proxy."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /api/contents (HTTP {{jup.status}}): {{jup.body}}"

Kubernetes API allows anonymous access

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/kubernetes-anonymous.yaml

The Kubernetes API server returned cluster resources to an unauthenticated request (anonymous-auth with a permissive RBAC binding), exposing the cluster.

How noctis detects it

  1. HTTP(S) request GET /api/v1/namespaces
  2. Checks k8s.body for "kind"\s*:\s*"NamespaceList" → finding QoD 75: Kubernetes API allows anonymous access

References:

Feed source — tests/vulnerabilities/general/kubernetes-anonymous.yaml
# Flag a Kubernetes API server that allows anonymous access to cluster resources.
# With anonymous-auth enabled and a permissive RBAC binding, an unauthenticated
# client can list namespaces/secrets. GET /api/v1/namespaces returns a
# NamespaceList (200); a locked-down server returns 401/403 Forbidden.
uid: 7a4c9e63-8b25-4d10-9f03-2e6b1c74a085
name: "Kubernetes API allows anonymous access"
description: |
  The Kubernetes API server returned cluster resources to an unauthenticated
  request (anonymous-auth with a permissive RBAC binding), exposing the cluster.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [kubernetes, anonymous, unauthenticated, exposure, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://kubernetes.io/docs/reference/access-authn-authz/authentication/#anonymous-requests"
steps:
  - id: k8s-ns
    action: http_request
    method: GET
    path: "/api/v1/namespaces"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: k8s
  - id: check-ns
    action: match
    source: k8s.body
    pattern: "\"kind\"\\s*:\\s*\"NamespaceList\""
    condition: "k8s.status == 200"
    on_match:
      finding:
        title: "Kubernetes API allows anonymous access"
        description: "GET /api/v1/namespaces returned a NamespaceList without credentials — anonymous access to cluster resources."
        remediation: "Disable anonymous-auth (--anonymous-auth=false) or remove permissive RBAC bindings for system:anonymous/system:unauthenticated; firewall the API port."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /api/v1/namespaces (HTTP {{k8s.status}}): {{k8s.body}}"

MongoDB exposed without authentication

Severitycritical
Categoryexposure — Exposure
Servicesmongodb
Detectiontcp_dialogue, match · highest QoD 75
Feedtests/vulnerabilities/general/mongodb-unauth.yaml

The MongoDB server answered an unauthenticated listDatabases command with the database listing, confirming access control is disabled — all databases are readable by anyone who can reach the port.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks mongo.transcript for totalSize → finding QoD 75: MongoDB exposed without authentication

References:

Feed source — tests/vulnerabilities/general/mongodb-unauth.yaml
# Detect a MongoDB instance reachable without authentication.
#
# Sends a MongoDB wire-protocol OP_MSG `listDatabases` command (binary frame via
# tcp_dialogue's send_hex). An unauthenticated/open node returns the database
# listing (reply contains `totalSize`, ok:1). A node with access control enabled
# answers "command listDatabases requires authentication" (Unauthorized) and
# never includes `totalSize` — so matching `totalSize` cleanly distinguishes an
# open node from a secured one (the error message itself echoes "listDatabases",
# which is why we key on `totalSize` rather than "databases").
uid: 9c1e5a37-6b24-4d81-8f0a-7e2c4b9d6153
name: "MongoDB exposed without authentication"
description: |
  The MongoDB server answered an unauthenticated listDatabases command with the
  database listing, confirming access control is disabled — all databases are
  readable by anyone who can reach the port.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [mongodb, unauthenticated, exposure, data-leak, misconfig]
services: [mongodb]
author: noctis
version: "1.0.0"
references:
  - "https://www.mongodb.com/docs/manual/core/authentication/"

steps:
  - id: mongo-listdatabases
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # OP_MSG (opcode 2013) carrying {listDatabases: 1, $db: "admin"}, length-prefixed.
    send_hex: "3c0000000100000000000000dd070000000000000027000000106c697374446174616261736573000100000002246462000600000061646d696e0000"
    store_as: mongo

  - id: check-unauth-listing
    action: match
    source: mongo.transcript
    # `totalSize` appears only in a successful listDatabases reply (open node);
    # a secured node returns an Unauthorized error without it.
    pattern: "totalSize"
    case_insensitive: true
    condition: "mongo.connected == true"
    on_match:
      finding:
        title: "MongoDB exposed without authentication"
        description: "An unauthenticated listDatabases command returned the database listing, confirming access control is disabled."
        remediation: "Enable access control (authorization: enabled) with a user/role model, bind to localhost, and firewall port 27017."
        confidence_delta: 0.35
        qod: 75
        evidence: "Unauthenticated listDatabases reply: {{mongo.transcript}}"

NFS share exported to everyone (world-mountable)

CVECVE-1999-0548, CVE-1999-0554
Severitycritical · CVSS 10.0
Categoryexposure — Exposure
Servicesmountd, rpcbind, nfs
Detectionset_var, tcp_dialogue, script, match · highest QoD 97
Feedtests/vulnerabilities/general/nfs-world-readable-export.yaml

The NFS server exports at least one file system to every host ('*'). Any unauthenticated client can mount it and read (and, if exported read-write, modify) its files. The feed proves it by mounting the share and listing its first entries as the unprivileged 'nobody' user, then unmounting. It also flags an NFS server that exports nothing at all (superfluous service).

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Parses / computes the next value with a Rhai script
  3. TCP dialogue: one binary protocol frame
  4. Parses / computes the next value with a Rhai script
  5. TCP dialogue: one binary protocol frame
  6. Parses / computes the next value with a Rhai script
  7. TCP dialogue: one binary protocol frame
  8. Parses / computes the next value with a Rhai script
  9. TCP dialogue: one binary protocol frame
  10. Parses / computes the next value with a Rhai script
  11. TCP dialogue: one binary protocol frame
  12. Parses / computes the next value with a Rhai script
  13. TCP dialogue: one binary protocol frame
  14. Checks mt.weak for ^true$ → finding QoD 97: NFS share exported to everyone — mounted by the scanner
  15. … and 2 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/general/nfs-world-readable-export.yaml
# NFS server exporting a share to the world, proved by actually mounting it.
#
# Port of OpenVAS/Greenbone `showmount.nasl` (OID 1.3.6.1.4.1.25623.1.0.102014,
# GPL-2.0-only): ask mountd for its export list (MOUNTPROC_EXPORT) and warn when a
# share is exported to everyone ('*'), or when the NFS server exports nothing at
# all (superfluous service).
#
# Beyond the NASL, which stops at the export list (a '*' only says what the server
# claims), this feed proves the access is real, read-only and without side effects:
#   1. MOUNTPROC3_MNT on the world-exported path with AUTH_UNIX uid/gid 65534
#      (nobody) -> the server hands the scanner a root file handle.
#   2. NFSPROC3_READDIR on that handle -> the first file names of the share.
#   3. MOUNTPROC3_UMNT -> drops the scanner's entry from the server's rmtab.
# A share whose ACL excludes the scanner's address (or that requires a privileged
# source port) refuses step 1, and a Kerberos-only share (MNT auth_flavors without
# AUTH_SYS/AUTH_NONE) is not counted as open: both fall back to the NASL-level
# finding. Only world-listed shares are mounted: a share whose list names other
# hosts may legitimately include the scanner's own network.
#
# Transport: ONC RPC over TCP with RFC 5531 record marking (4-byte header
# 0x80000000 | length). The NASL defaults to UDP; noctis's udp_probe cannot target
# a port learned at runtime, and every mainstream mountd also listens on TCP.
#
# Port resolution: the matched port is first asked directly for EXPORT (nmap
# `mountd`, or unfs3-style servers that serve mountd on 2049). If that is not a
# successful mountd reply, the port is treated as rpcbind: PMAPPROC_GETPORT
# (100005 v3 TCP) gives the mountd port, which is then queried. READDIR goes to
# 2049, then to the mountd port (servers that multiplex both programs).
#
# RPC reply layout (byte offsets after the 4-byte record mark; hex offset = byte x 2):
#   4 xid | 8 msg_type (1 REPLY) | 12 reply_stat (0 ACCEPTED) | 16 verf flavor
#   20 verf length L | 24+L accept_stat (0 SUCCESS) | 28+L procedure result
uid: e8c9399d-cea8-4de5-b8ec-6a45d295a0a7
name: "NFS share exported to everyone (world-mountable)"
description: |
  The NFS server exports at least one file system to every host ('*'). Any
  unauthenticated client can mount it and read (and, if exported read-write,
  modify) its files. The feed proves it by mounting the share and listing its
  first entries as the unprivileged 'nobody' user, then unmounting. It also flags
  an NFS server that exports nothing at all (superfluous service).
cves: [CVE-1999-0548, CVE-1999-0554]
cvss: 10.0
category: exposure
severity: critical
confidence_base: 0.30
tags: [nfs, mountd, rpc, showmount, exposure, misconfig]
services: [mountd, rpcbind, nfs]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-1999-0548"
  - "https://nvd.nist.gov/vuln/detail/CVE-1999-0554"
  - "https://www.rfc-editor.org/rfc/rfc1813#appendix-I"
  - "https://www.rfc-editor.org/rfc/rfc5531"

steps:
  # ── 1. Export list ──────────────────────────────────────────────────────────
  - id: init-export-direct
    action: set_var
    var_name: exd
    var_value: {connected: false}

  # MOUNTPROC_EXPORT (100005 v3 proc 5), AUTH_NULL, xid "NOC\x01".
  - id: export-direct
    action: tcp_dialogue
    port: "{{port}}"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "800000284e4f43010000000000000002000186a5000000030000000500000000000000000000000000000000"
    store_as: exd

  - id: init-getport
    action: set_var
    var_name: gp
    var_value: {connected: false}

  - id: init-export-mountd
    action: set_var
    var_name: exm
    var_value: {connected: false}

  # Is the direct reply a successful EXPORT reply to our xid?
  - id: check-direct
    action: script
    store_as: d
    code: |
      let h = if type_of(exd.response_hex) == "string" { tolower(exd.response_hex) } else { "" };
      let ok = false;
      if strlen(h) >= 64 && substr(h, 8, 15) == "4e4f4301"
          && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
        let vl = u32be(substr(h, 40, 47));
        let off = 48 + ((vl + 3) / 4) * 8;
        ok = vl <= 400 && u32be(substr(h, off, off + 7)) == 0;
      }
      #{ ok: ok }

  # Not mountd: ask the port, as rpcbind, where mountd v3/TCP lives.
  # PMAPPROC_GETPORT (100000 v2 proc 3) args {100005, 3, IPPROTO_TCP, 0}, xid "NOC\x02".
  - id: getport
    action: tcp_dialogue
    condition: "d.ok == false"
    port: "{{port}}"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "800000384e4f43020000000000000002000186a0000000020000000300000000000000000000000000000000000186a5000000030000000600000000"
    store_as: gp

  - id: mountd-port
    action: script
    store_as: mp
    code: |
      let p = 0;
      if d.ok == false && gp.connected == true && type_of(gp.response_hex) == "string" {
        let h = tolower(gp.response_hex);
        if strlen(h) >= 64 && substr(h, 8, 15) == "4e4f4302"
            && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
          let vl = u32be(substr(h, 40, 47));
          let off = 48 + ((vl + 3) / 4) * 8;
          if vl <= 400 && u32be(substr(h, off, off + 7)) == 0 {
            p = u32be(substr(h, off + 8, off + 15));
          }
        }
      }
      if d.ok { #{ port: port, via: "direct", query: false } }
      else if p > 0 && p < 65536 && p != port { #{ port: p, via: "rpcbind", query: true } }
      else { #{ port: 0, via: "none", query: false } }

  # Same EXPORT call on the mountd port rpcbind returned, xid "NOC\x03".
  - id: export-mountd
    action: tcp_dialogue
    condition: "mp.query == true"
    port: "{{mp.port}}"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "800000284e4f43030000000000000002000186a5000000030000000500000000000000000000000000000000"
    store_as: exm

  # Parse the exportnode list (RFC 1813 §5.2.5): repeated
  #   bool more | string ex_dir | (bool more | string gr_name)* | bool false
  # Returns `ex`:
  #   ok        bool   — a valid, complete EXPORT reply was parsed
  #   count     int    — number of exports
  #   listing   str    — "dir (group, group); ..." for evidence
  #   world     bool   — at least one export open to everyone
  #   world_dir str    — the first world-exported directory
  #   mnt_hex   str    — MNT3 call frame for world_dir (AUTH_UNIX nobody), xid "NOC\x04"
  #   umnt_hex  str    — UMNT3 call frame for world_dir, xid "NOC\x07"
  - id: parse-exports
    action: script
    store_as: ex
    code: |
      // hex -> text at constant cost (a byte loop exhausts the Rhai op budget on big lists)
      fn dec(h) { base64_decode(base64_encode_hex(h)) }
      let h = "";
      let xid = "";
      if d.ok && type_of(exd.response_hex) == "string" { h = tolower(exd.response_hex); xid = "4e4f4301"; }
      else if mp.query && exm.connected == true && type_of(exm.response_hex) == "string" { h = tolower(exm.response_hex); xid = "4e4f4303"; }
      let ok = false;
      let off = 0;
      if strlen(h) >= 64 && substr(h, 8, 15) == xid
          && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
        let vl = u32be(substr(h, 40, 47));
        off = 48 + ((vl + 3) / 4) * 8;
        ok = vl <= 400 && u32be(substr(h, off, off + 7)) == 0;
        off += 8;
      }
      let n = strlen(h);
      let count = 0;
      let parts = [];
      let world_dir = "";
      let world_xdr = "";
      let complete = false;
      if ok {
        let more = u32be(substr(h, off, off + 7));
        off += 8;
        while more == 1 && count < 64 && off + 8 <= n {
          let dl = u32be(substr(h, off, off + 7));
          let dpad = ((dl + 3) / 4) * 8;
          if dl == 0 || dl > 1024 || off + 8 + dpad > n { break; }
          let dir_xdr = substr(h, off, off + 7 + dpad);
          let dir = dec(substr(h, off + 8, off + 7 + dl * 2));
          off += 8 + dpad;
          let groups = [];
          let g = u32be(substr(h, off, off + 7));
          off += 8;
          while g == 1 && groups.len() < 32 && off + 8 <= n {
            let gl = u32be(substr(h, off, off + 7));
            let gpad = ((gl + 3) / 4) * 8;
            if gl > 1024 || off + 8 + gpad > n { break; }
            groups.push(dec(substr(h, off + 8, off + 7 + gl * 2)));
            off += 8 + gpad;
            g = u32be(substr(h, off, off + 7));
            off += 8;
          }
          count += 1;
          // Everyone: no client restriction at all, or an explicit any-host wildcard.
          let open = groups.len() == 0;
          for gr in groups {
            let x = tolower(gr);
            if x == "*" || x == "<world>" || x == "(everyone)" || x == "everyone" || x == "0.0.0.0/0"
                || x == "0.0.0.0/0.0.0.0" || x == "::/0" { open = true; }
          }
          let gs = if groups.len() == 0 { "everyone" } else { groups.reduce(|sum, v| if sum == () { v } else { sum + ", " + v }) };
          // Keep evidence short on big NAS lists: every world export, 20 others.
          if open || parts.len() < 20 { parts.push(dir + " (" + gs + ")"); }
          if open && world_dir == "" { world_dir = dir; world_xdr = dir_xdr; }
          more = u32be(substr(h, off, off + 7));
          off += 8;
        }
        // Only trust the list (and an empty one) when its terminating FALSE was
        // read inside the reply — a truncated or malformed list is not "no exports".
        complete = more == 0 && off <= n;
      }
      // AUTH_UNIX credential: stamp "NOCT", machinename "noctis", uid/gid 65534, no gids.
      let cred = "000000010000001c" + "4e4f4354" + "000000066e6f637469730000" + "0000fffe0000fffe00000000";
      let hdr = "0000000000000002000186a500000003";
      let mnt = "4e4f4304" + hdr + "00000001" + cred + "0000000000000000" + world_xdr;
      let umnt = "4e4f4307" + hdr + "00000003" + cred + "0000000000000000" + world_xdr;
      #{
        ok: ok && complete,
        count: count,
        listing: if parts.len() == 0 { "(none)" } else { parts.reduce(|sum, v| if sum == () { v } else { sum + "; " + v }) + (if count > parts.len() { " (+" + (count - parts.len()) + " more)" } else { "" }) },
        world: world_dir != "",
        world_dir: world_dir,
        port: mp.port,
        mnt_hex: p32be(0x80000000 + strlen(mnt) / 2) + mnt,
        umnt_hex: p32be(0x80000000 + strlen(umnt) / 2) + umnt
      }

  # ── 2. Proof: mount the world-exported share ────────────────────────────────
  - id: init-mnt
    action: set_var
    var_name: mnt
    var_value: {connected: false}

  - id: mount
    action: tcp_dialogue
    condition: "ex.ok == true && ex.world == true"
    port: "{{ex.port}}"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "{{ex.mnt_hex}}"
    store_as: mnt

  # mountres3: status (0 = MNT3_OK) | fhandle3 opaque<64> | auth flavors.
  # Builds the NFSPROC3_READDIR call (100003 v3 proc 16) on the root handle,
  # cookie 0, cookieverf 0, count 4096 — xid "NOC\x05" (port 2049) / "NOC\x06".
  - id: parse-mount
    action: script
    store_as: mt
    code: |
      let h = if mnt.connected == true && type_of(mnt.response_hex) == "string" { tolower(mnt.response_hex) } else { "" };
      let ok = false;
      let fh = "";
      let fh_len = 0;
      let weak = false;
      let flavors = [];
      if strlen(h) >= 64 && substr(h, 8, 15) == "4e4f4304"
          && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
        let vl = u32be(substr(h, 40, 47));
        let off = 48 + ((vl + 3) / 4) * 8;
        if vl <= 400 && u32be(substr(h, off, off + 7)) == 0 && u32be(substr(h, off + 8, off + 15)) == 0 {
          let fl = u32be(substr(h, off + 16, off + 23));
          if fl > 0 && fl <= 64 && off + 24 + fl * 2 <= strlen(h) {
            fh = substr(h, off + 16, off + 23 + ((fl + 3) / 4) * 8);
            fh_len = fl;
            ok = true;
            // auth_flavors<>: the security flavors the export accepts. Only
            // AUTH_SYS (1) / AUTH_NONE (0) let an arbitrary client in; a
            // Kerberos-only (sec=krb5*, 390003+) export hands out a handle too.
            let ao = off + 24 + ((fl + 3) / 4) * 8;
            let na = u32be(substr(h, ao, ao + 7));
            let i = 0;
            while i < na && i < 16 && ao + 16 + i * 8 <= strlen(h) {
              let f = u32be(substr(h, ao + 8 + i * 8, ao + 15 + i * 8));
              flavors.push(f);
              if f == 0 || f == 1 { weak = true; }
              i += 1;
            }
            // RFC 1813: an empty list means AUTH_UNIX is assumed.
            if na == 0 { weak = true; }
          }
        }
      }
      let cred = "000000010000001c" + "4e4f4354" + "000000066e6f637469730000" + "0000fffe0000fffe00000000";
      let body = "0000000000000002000186a300000003" + "00000010" + cred + "0000000000000000"
        + fh + "0000000000000000" + "0000000000000000" + "00001000";
      #{
        ok: ok,
        weak: weak,
        flavors: if flavors.len() == 0 { "(none, AUTH_UNIX assumed)" } else { flavors.reduce(|sum, v| if sum == () { "" + v } else { sum + ", " + v }) },
        fh_len: fh_len,
        rd_2049: p32be(0x80000000 + strlen(body) / 2 + 4) + "4e4f4305" + body,
        rd_mountd: p32be(0x80000000 + strlen(body) / 2 + 4) + "4e4f4306" + body
      }

  - id: init-readdir
    action: set_var
    var_name: rd1
    var_value: {connected: false}

  - id: init-readdir-mountd
    action: set_var
    var_name: rd2
    var_value: {connected: false}

  - id: readdir-2049
    action: tcp_dialogue
    condition: "mt.ok == true"
    port: "2049"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "{{mt.rd_2049}}"
    store_as: rd1

  # Did 2049 answer READDIR with NFS3_OK? (accepted SUCCESS, verifier length 0
  # or AUTH_SYS short verifier, then nfsstat3 0.)
  - id: check-readdir-2049
    action: script
    store_as: r1
    code: |
      let h = if rd1.connected == true && type_of(rd1.response_hex) == "string" { tolower(rd1.response_hex) } else { "" };
      let ok = false;
      if strlen(h) >= 72 && substr(h, 8, 15) == "4e4f4305"
          && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
        let vl = u32be(substr(h, 40, 47));
        let off = 48 + ((vl + 3) / 4) * 8;
        ok = vl <= 400 && u32be(substr(h, off, off + 7)) == 0 && u32be(substr(h, off + 8, off + 15)) == 0;
      }
      #{ ok: ok }

  - id: readdir-mountd-port
    action: tcp_dialogue
    condition: "mt.ok == true && r1.ok == false && ex.port != 2049"
    port: "{{ex.port}}"
    tls: false
    read_banner: false
    timeout_secs: 10
    send_hex: "{{mt.rd_mountd}}"
    store_as: rd2

  # READDIR3resok: status | post_op_attr dir_attributes | cookieverf3 |
  #   (bool more | fileid u64 | filename3 | cookie u64)* | bool eof
  - id: parse-readdir
    action: script
    store_as: ls
    code: |
      // hex -> text at constant cost (a byte loop exhausts the Rhai op budget on big lists)
      fn dec(h) { base64_decode(base64_encode_hex(h)) }
      let h = "";
      let xid = "";
      if rd2.connected == true && type_of(rd2.response_hex) == "string" {
        h = tolower(rd2.response_hex); xid = "4e4f4306";
      } else if rd1.connected == true && type_of(rd1.response_hex) == "string" {
        h = tolower(rd1.response_hex); xid = "4e4f4305";
      }
      let ok = false;
      let names = [];
      let status = -1;
      if strlen(h) >= 64 && substr(h, 8, 15) == xid
          && u32be(substr(h, 16, 23)) == 1 && u32be(substr(h, 24, 31)) == 0 {
        let vl = u32be(substr(h, 40, 47));
        let off = 48 + ((vl + 3) / 4) * 8;
        if vl <= 400 && u32be(substr(h, off, off + 7)) == 0 {
          off += 8;
          status = u32be(substr(h, off, off + 7));
          off += 8;
          if status == 0 {
            ok = true;
            // post_op_attr: bool + fattr3 (84 bytes) when present
            if u32be(substr(h, off, off + 7)) == 1 { off += 8 + 168; } else { off += 8; }
            off += 16; // cookieverf3
            let n = strlen(h);
            let more = u32be(substr(h, off, off + 7));
            off += 8;
            let seen = 0;
            while more == 1 && seen < 64 && off + 24 <= n {
              off += 16; // fileid
              let nl = u32be(substr(h, off, off + 7));
              let npad = ((nl + 3) / 4) * 8;
              if nl == 0 || nl > 255 || off + 8 + npad > n { break; }
              let name = dec(substr(h, off + 8, off + 7 + nl * 2));
              if name != "." && name != ".." && names.len() < 10 { names.push(name); }
              off += 8 + npad + 16; // name + cookie
              more = u32be(substr(h, off, off + 7));
              off += 8;
              seen += 1;
            }
          }
        }
      }
      #{
        ok: ok,
        status: status,
        files: if names.len() == 0 { "(empty or not listed)" } else { names.reduce(|sum, v| if sum == () { v } else { sum + ", " + v }) }
      }

  # ── 3. Clean up: drop the scanner from the server's mount table ─────────────
  - id: unmount
    action: tcp_dialogue
    condition: "mt.ok == true"
    port: "{{ex.port}}"
    tls: false
    read_banner: false
    timeout_secs: 5
    send_hex: "{{ex.umnt_hex}}"

  # ── 4. Findings ─────────────────────────────────────────────────────────────
  - id: world-mount-confirmed
    action: match
    source: mt.weak
    pattern: "^true$"
    condition: "mt.ok == true && mt.weak == true"
    on_match:
      finding:
        cves: [CVE-1999-0554]
        title: "NFS share exported to everyone — mounted by the scanner"
        description: "mountd exports a file system to every host and granted the unauthenticated scanner a root file handle for it (MOUNTPROC3_MNT as uid/gid 65534). Any client can mount the share and read — or, if exported read-write, modify — its files."
        remediation: "Restrict every entry in /etc/exports (or the NAS share ACL) to the hosts that need it instead of '*', export read-only with root_squash/all_squash where possible, and firewall rpcbind (111), mountd and nfs (2049) from untrusted networks."
        confidence_delta: 0.65
        qod: 97
        evidence: "Exports: {{ex.listing}} | MNT {{ex.world_dir}} as nobody -> MNT3_OK, {{mt.fh_len}}-byte file handle, auth flavors {{mt.flavors}} | READDIR ok={{ls.ok}} (nfsstat {{ls.status}}): {{ls.files}} | unmounted"
      stop: true

  - id: world-export-listed
    action: match
    source: ex.world
    pattern: "^true$"
    condition: "ex.ok == true && ex.world == true"
    on_match:
      finding:
        cves: [CVE-1999-0554]
        title: "NFS share exported to everyone"
        description: "mountd's export list shows a file system exported to every host ('*'). The scanner could not confirm access itself (mount refused, privileged source port required, or the export only accepts Kerberos), so this rests on the export list."
        remediation: "Restrict every entry in /etc/exports (or the NAS share ACL) to the hosts that need it instead of '*', and firewall rpcbind (111), mountd and nfs (2049) from untrusted networks."
        confidence_delta: 0.50
        qod: 75
        evidence: "Exports: {{ex.listing}}"
      stop: true

  - id: superfluous-nfs
    action: match
    source: ex.count
    pattern: "^0$"
    condition: "ex.ok == true && ex.count == 0"
    on_match:
      finding:
        cves: [CVE-1999-0548]
        cvss: 5.0
        severity: low
        title: "NFS server exports no file systems to the scanner"
        description: "mountd answered with a complete, empty export list: the NFS service runs but serves nothing to this client. Either it is superfluous and needlessly exposes rpcbind/mountd/nfsd, or (some servers such as nfs-ganesha hide exports a client may not mount) everything is restricted to other hosts and the service should be firewalled from this network."
        remediation: "Stop and disable the NFS server (nfs-server, rpcbind) if it is not needed, or firewall its ports."
        confidence_delta: 0.50
        qod: 75
        evidence: "MOUNTPROC_EXPORT on port {{ex.port}} returned an empty export list"

PostgreSQL passwordless access (trust authentication)

Severitycritical
Categoryexposure — Exposure
Servicespostgresql
Detectiontcp_dialogue, match · highest QoD 75
Feedtests/vulnerabilities/general/postgres-trust-auth.yaml

The PostgreSQL server completed authentication with no password (AuthenticationOk), indicating a 'trust' pg_hba.conf rule reachable from the network — full database access without credentials.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks pg.response_hex for 520000000800000000 → finding QoD 75: PostgreSQL passwordless access (trust authentication)

References:

Feed source — tests/vulnerabilities/general/postgres-trust-auth.yaml
# Flag a PostgreSQL server that grants access with no password (trust auth).
# Sends a protocol-3 StartupMessage (user/database = postgres) as a binary
# tcp_dialogue frame. If the server answers AuthenticationOk (message 'R',
# length 8, auth type 0) it accepted the connection without any credentials —
# a pg_hba.conf "trust" rule exposed to the network. A server requiring a
# password answers AuthenticationMD5Password/CleartextPassword (auth type != 0).
uid: 1f6d9c40-7a28-4e53-b9c1-3d08a265e7f4
name: "PostgreSQL passwordless access (trust authentication)"
description: |
  The PostgreSQL server completed authentication with no password (AuthenticationOk),
  indicating a 'trust' pg_hba.conf rule reachable from the network — full database
  access without credentials.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [postgresql, trust, unauthenticated, exposure, misconfig]
services: [postgresql]
author: noctis
version: "1.0.0"
references:
  - "https://www.postgresql.org/docs/current/auth-trust.html"
steps:
  - id: pg-startup
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # Protocol 3.0 StartupMessage: user=postgres database=postgres.
    send_hex: "00000029000300007573657200706f73746772657300646174616261736500706f7374677265730000"
    store_as: pg
  - id: check-auth-ok
    action: match
    source: pg.response_hex
    # AuthenticationOk: 'R'(0x52) + length 8 + auth type 0.
    pattern: "520000000800000000"
    condition: "pg.connected == true"
    on_match:
      finding:
        title: "PostgreSQL passwordless access (trust authentication)"
        description: "The server returned AuthenticationOk to an unauthenticated StartupMessage — a 'trust' rule grants passwordless access."
        remediation: "Replace 'trust' with scram-sha-256 in pg_hba.conf, bind to localhost/limited hosts, and firewall port 5432."
        confidence_delta: 0.35
        qod: 75
        evidence: "startup response (hex): {{pg.response_hex}}"

Redis unauthenticated access

Severitycritical
Categoryexposure — Exposure
Servicesredis
Detectiontcp_dialogue, match · highest QoD 75
Feedtests/vulnerabilities/general/redis-unauthenticated.yaml

The Redis server accepts commands without authentication, exposing data and often enabling remote code execution (e.g. via CONFIG SET + module/cron abuse).

How noctis detects it

  1. TCP dialogue: PING, INFO server
  2. Checks redis.transcript for redis_version: → finding QoD 75: Redis unauthenticated access

References:

Feed source — tests/vulnerabilities/general/redis-unauthenticated.yaml
# Detect Redis instances reachable without authentication.
#
# Send INFO over the inline protocol. An unauthenticated Redis replies with the
# server info (containing redis_version); one with requirepass set replies
# "-NOAUTH Authentication required." instead.
uid: eccb6a4c-957c-4b76-acfc-591ef8104a20
name: "Redis unauthenticated access"
description: |
  The Redis server accepts commands without authentication, exposing data and
  often enabling remote code execution (e.g. via CONFIG SET + module/cron abuse).
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [redis, unauthenticated, exposure, misconfig]
services: [redis]
author: noctis
version: "1.0.0"
references:
  - "https://redis.io/docs/management/security/"

steps:
  - id: redis-info
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    commands:
      - "PING"
      - "INFO server"
    store_as: redis

  - id: check-unauth
    action: match
    source: redis.transcript
    # redis_version only appears if INFO ran without auth; a protected server
    # answers "-NOAUTH Authentication required." instead.
    pattern: "redis_version:"
    condition: "redis.connected == true"
    on_match:
      finding:
        title: "Redis unauthenticated access"
        description: "The Redis server returned INFO output without authentication."
        remediation: "Set 'requirepass' (or enable ACLs), bind to localhost, and firewall port 6379."
        confidence_delta: 0.35
        qod: 75
        evidence: "INFO reply: {{redis.transcript}}"

SMBGhost — SMBv3.1.1 compression enabled

CVECVE-2020-0796
Severitycritical · CVSS 10.0
Categoryhardening — Hardening
Servicessmb, microsoft-ds
Detectiontcp_dialogue, script, match · highest QoD 75
Feedtests/vulnerabilities/general/CVE-2020-0796.yaml

The server negotiated SMB dialect 3.1.1 and advertised an SMB2_COMPRESSION_CAPABILITIES negotiate context, so the vulnerable SMBv3 compression code path (CVE-2020-0796, "SMBGhost") is reachable. That path contains an integer overflow leading to unauthenticated remote code execution. Detection is a safe protocol fingerprint only — no overflow or compressed payload is ever sent.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Parses / computes the next value with a Rhai script
  3. Checks neg.vulnerable for ^true$ → finding QoD 75: SMBGhost — SMBv3.1.1 compression enabled (CVE-2020-0796)

References:

Feed source — tests/vulnerabilities/general/CVE-2020-0796.yaml
# SMBGhost (CVE-2020-0796) — safe SMBv3.1.1 compression fingerprint.
#
# CVE-2020-0796 is an integer overflow in the SMBv3.1.1 compression
# decompressor (SMB2_COMPRESSION_TRANSFORM_HEADER handling) that yields
# pre-auth remote code execution. Triggering the bug means sending a malformed
# compressed message that corrupts kernel memory — far too intrusive and unsafe
# for a scanner. We never do that.
#
# Instead we fingerprint the exact precondition that makes a host vulnerable,
# the same way general/smb-signing-not-required fingerprints signing: send one
# ordinary SMB2 NEGOTIATE request (binary tcp_dialogue frame) and parse the
# reply in a `script` step. A host is SMBGhost-exposed when it BOTH
#   (a) negotiates dialect 3.1.1 (0x0311), AND
#   (b) advertises an SMB2_COMPRESSION_CAPABILITIES negotiate context
#       (ContextType 0x0003) in its NEGOTIATE response.
# A patched / mitigated host (or one with "DisableCompression") still
# negotiates 3.1.1 but returns no compression context, so detection fails.
# Entirely read-only: a legitimate NEGOTIATE exchange, no compressed payload.
#
# Request (182 bytes): NBSS header [00 + 3-byte BE length]
#   + SMB2 header (64 B, ProtocolId fe534d42, Command 0 = NEGOTIATE)
#   + NEGOTIATE (StructureSize 36, DialectCount 5, ClientGuid "noctis-smb-probe",
#     NegotiateContextCount 2)
#   + dialects 0x0202 0x0210 0x0300 0x0302 0x0311 (little-endian) + pad
#   + SMB2_PREAUTH_INTEGRITY_CAPABILITIES context (SHA-512, 32-byte salt)
#   + SMB2_COMPRESSION_CAPABILITIES context (LZNT1 / LZ77 / LZ77+Huffman) — a
#     real client has to offer compression for the server to answer with it.
#
# Reply offsets (byte -> hex offset = byte x 2). All multi-byte fields are
# little-endian. Negotiate-context offsets are relative to the SMB2 header
# start (NBSS byte 4), so the NBSS 4-byte prefix is added when indexing and
# removed again for the 8-byte context alignment:
#   4    ProtocolId              fe534d42          hex   8..15
#   12   Status                  u32le, 0 = OK     hex  24..31
#   16   Command                 u16le, 0          hex  32..35
#   20   Flags                   u32le, bit 0x01 SERVER_TO_REDIR   hex 40..47
#   68   StructureSize           u16le, 65         hex 136..139
#   70   SecurityMode            u16le             hex 140..143
#   72   DialectRevision         u16le             hex 144..147
#   74   NegotiateContextCount   u16le             hex 148..151
#   128  NegotiateContextOffset  u32le             hex 256..263
uid: 4f58cbc3-94f0-4be2-817c-410c15dba237
name: "SMBGhost — SMBv3.1.1 compression enabled (CVE-2020-0796)"
description: |
  The server negotiated SMB dialect 3.1.1 and advertised an
  SMB2_COMPRESSION_CAPABILITIES negotiate context, so the vulnerable SMBv3
  compression code path (CVE-2020-0796, "SMBGhost") is reachable. That path
  contains an integer overflow leading to unauthenticated remote code
  execution. Detection is a safe protocol fingerprint only — no overflow or
  compressed payload is ever sent.
cves: [CVE-2020-0796]
cvss: 10.0
severity: critical
category: hardening
confidence_base: 0.30
tags: [smb, smb3, smbghost, compression, rce, kev, cve-2020-0796]
services: [smb, microsoft-ds]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-0796"
  - "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2020-0796"
  - "https://learn.microsoft.com/openspecs/windows_protocols/ms-smb2/63abf97c-0d09-47e2-88d6-6bfa552949a5"

steps:
  - id: smb2-negotiate
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    send_hex: "000000b6fe534d424000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400050001000000000000006e6f637469732d736d622d70726f6265700000000200000002021002000302031103000001002600000000000100200001006e6f637469732d707265617574682d696e746567726974792d73616c742d3332000003000e00000000000300000000000000010002000300"
    store_as: smb

  # Parse the NEGOTIATE response. Returns a map stored as `neg`:
  #   smb2                   bool  — a valid SMB2 NEGOTIATE response came back
  #   dialect                str   — negotiated dialect, e.g. "3.1.1"
  #   dialect_hex            str   — DialectRevision as 4 hex digits, e.g. "0311"
  #   compression_supported  bool  — an SMB2_COMPRESSION_CAPABILITIES context present
  #   compression_algo_count int   — advertised compression-algorithm count
  #   vulnerable             bool  — dialect 3.1.1 AND compression advertised
  - id: parse-negotiate
    action: script
    condition: "smb.connected == true"
    store_as: neg
    code: |
      let hex = if type_of(smb.response_hex) == "string" { tolower(smb.response_hex) } else { "" };
      let rev = u16le(substr(hex, 144, 147));
      let name = if rev == 0x0202 { "2.0.2" }
        else if rev == 0x0210 { "2.1" }
        else if rev == 0x0300 { "3.0" }
        else if rev == 0x0302 { "3.0.2" }
        else if rev == 0x0311 { "3.1.1" }
        else { "unknown" };
      // A real NEGOTIATE *response*, not an echo of our request: SMB2 signature,
      // status 0, command 0, SERVER_TO_REDIR flag set, response StructureSize 65,
      // and a dialect we actually offered.
      let ok = strlen(hex) >= 148
        && substr(hex, 8, 15) == "fe534d42"
        && u32le(substr(hex, 24, 31)) == 0
        && u16le(substr(hex, 32, 35)) == 0
        && (u32le(substr(hex, 40, 47)) & 1) == 1
        && u16le(substr(hex, 136, 139)) == 65
        && name != "unknown";
      // Walk the negotiate-context list (only present on a 3.1.1 reply) looking
      // for SMB2_COMPRESSION_CAPABILITIES (ContextType 0x0003). Context offset is
      // relative to the SMB2 header (NBSS byte 4); each context is 8-byte aligned
      // within the SMB2 message, so alignment drops the 4-byte NBSS prefix.
      let compression = false;
      let algos = 0;
      if ok && rev == 0x0311 {
        let ncount = u16le(substr(hex, 148, 151));
        let ncoff = u32le(substr(hex, 256, 263));
        let pos = (4 + ncoff) * 2;
        let i = 0;
        while i < ncount && i < 16 {
          if pos + 16 > strlen(hex) { break; }
          let ctype = u16le(substr(hex, pos, pos + 3));
          let dlen = u16le(substr(hex, pos + 4, pos + 7));
          let dstart = pos + 16;
          if ctype == 3 {
            compression = true;
            if strlen(hex) >= dstart + 4 {
              algos = u16le(substr(hex, dstart, dstart + 3));
            }
          }
          let nxt = dstart + dlen * 2;
          let rem = ((nxt / 2) - 4) % 8;
          if rem != 0 { nxt = nxt + (8 - rem) * 2; }
          pos = nxt;
          i += 1;
        }
      }
      #{
        smb2: ok,
        dialect: name,
        dialect_hex: p16be(rev),
        compression_supported: compression,
        compression_algo_count: algos,
        vulnerable: ok && rev == 0x0311 && compression
      }

  - id: check-smbghost
    action: match
    source: neg.vulnerable
    pattern: "^true$"
    condition: "neg.smb2 == true"
    on_match:
      finding:
        title: "SMBGhost — SMBv3.1.1 compression enabled (CVE-2020-0796)"
        description: "The server negotiated SMB 3.1.1 and advertised an SMB2_COMPRESSION_CAPABILITIES context, so the vulnerable SMBv3 compression decompressor (CVE-2020-0796) is reachable pre-authentication. Detected by a safe NEGOTIATE fingerprint; no overflow was sent."
        remediation: "Apply the Microsoft March 2020 update (KB4551762) or later. As an interim mitigation set the registry value DisableCompression=1 under HKLM\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters and block inbound TCP/445 at the perimeter."
        confidence_delta: 0.50
        qod: 75
        evidence: "SMB2 NEGOTIATE: dialect {{neg.dialect}} (0x{{neg.dialect_hex}}), compression context advertised (algorithms: {{neg.compression_algo_count}})"

etcd exposed without authentication

Severitycritical
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/etcd-unauth.yaml

The etcd server returned key data to an unauthenticated request, exposing cluster configuration/secrets stored in the key space.

How noctis detects it

  1. HTTP(S) request GET /v2/keys/
  2. Checks etcd.body for "action"\s*:\s*"get" → finding QoD 75: etcd exposed without authentication

References:

Feed source — tests/vulnerabilities/general/etcd-unauth.yaml
# Flag an etcd server that serves key reads without authentication.
# GET /v2/keys/ returns the key listing when auth is disabled — etcd commonly
# stores cluster secrets and Kubernetes state, so this is a high-value leak.
# A secured etcd returns 401.
uid: 6b2e8d41-3c97-4a05-b1f8-2d7a9c640e53
name: "etcd exposed without authentication"
description: |
  The etcd server returned key data to an unauthenticated request, exposing
  cluster configuration/secrets stored in the key space.
cves: []
category: exposure
severity: critical
confidence_base: 0.50
tags: [etcd, unauthenticated, exposure, data-leak, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://etcd.io/docs/latest/op-guide/authentication/"
steps:
  - id: etcd-keys
    action: http_request
    method: GET
    path: "/v2/keys/"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: etcd
  - id: check-keys
    action: match
    source: etcd.body
    pattern: "\"action\"\\s*:\\s*\"get\""
    condition: "etcd.status == 200"
    on_match:
      finding:
        title: "etcd exposed without authentication"
        description: "GET /v2/keys/ returned key data without credentials — etcd authentication is disabled."
        remediation: "Enable etcd authentication and client-cert TLS (--client-cert-auth), bind to the peer network, and firewall ports 2379/2380."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /v2/keys/ (HTTP {{etcd.status}}): {{etcd.body}}"

Cassandra CQL accessible without authentication

Severityhigh
Categoryexposure — Exposure
Servicescassandra
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/cassandra-no-auth.yaml

The Cassandra CQL endpoint answered STARTUP with READY, accepting the session without credentials — the keyspaces/data are reachable unauthenticated.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks cql.response_hex for ^8400000002 → finding QoD 70: Cassandra CQL accessible without authentication

References:

Feed source — tests/vulnerabilities/general/cassandra-no-auth.yaml
# Flag a Cassandra CQL endpoint that accepts connections without authentication.
# Sends a CQL native-protocol STARTUP frame as a binary tcp_dialogue frame. A
# node without auth replies READY (opcode 0x02); a node with
# authenticator=PasswordAuthenticator replies AUTHENTICATE (opcode 0x03).
uid: 3d7a9c54-6e18-4b02-a0f7-1c5b2e84d963
name: "Cassandra CQL accessible without authentication"
description: |
  The Cassandra CQL endpoint answered STARTUP with READY, accepting the session
  without credentials — the keyspaces/data are reachable unauthenticated.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [cassandra, cql, unauthenticated, exposure, misconfig]
services: [cassandra]
author: noctis
version: "1.0.0"
references:
  - "https://cassandra.apache.org/doc/latest/cassandra/operating/security.html"
steps:
  - id: cql-startup
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # CQL v4 STARTUP {CQL_VERSION: 3.0.0}.
    send_hex: "0400000001000000160001000b43514c5f56455253494f4e0005332e302e30"
    store_as: cql
  - id: check-ready
    action: match
    source: cql.response_hex
    # READY response: version 0x84, flags 00, stream 0000, opcode 02.
    pattern: "^8400000002"
    condition: "cql.connected == true"
    on_match:
      finding:
        title: "Cassandra CQL accessible without authentication"
        description: "The CQL endpoint replied READY to STARTUP, accepting a session without credentials."
        remediation: "Set authenticator: PasswordAuthenticator (and authorizer), require client TLS, and firewall port 9042."
        confidence_delta: 0.35
        qod: 70
        evidence: "CQL response (hex): {{cql.response_hex}}"

Consul HTTP API exposed without ACLs

Severityhigh
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/consul-no-acl.yaml

The Consul HTTP API returned the node catalog to an unauthenticated request, indicating ACLs are disabled or default-allow — the catalog and KV secrets are readable by anyone who can reach the agent.

How noctis detects it

  1. HTTP(S) request GET /v1/catalog/nodes
  2. Checks consul.body for "Node" → finding QoD 75: Consul HTTP API exposed without ACLs

References:

Feed source — tests/vulnerabilities/general/consul-no-acl.yaml
# Flag a HashiCorp Consul HTTP API reachable without ACLs.
# With ACLs disabled (or default-allow), the catalog and KV store are readable
# by anyone — the KV store frequently holds application secrets. GET
# /v1/catalog/nodes returns the node list; an ACL-protected agent returns 403.
uid: 7d3c9a56-2e84-4b05-a1f0-6c2b8e74d913
name: "Consul HTTP API exposed without ACLs"
description: |
  The Consul HTTP API returned the node catalog to an unauthenticated request,
  indicating ACLs are disabled or default-allow — the catalog and KV secrets
  are readable by anyone who can reach the agent.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [consul, acl, unauthenticated, exposure, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://developer.hashicorp.com/consul/docs/security/acl"
steps:
  - id: consul-nodes
    action: http_request
    method: GET
    path: "/v1/catalog/nodes"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: consul
  - id: check-nodes
    action: match
    source: consul.body
    pattern: "\"Node\""
    condition: "consul.status == 200"
    on_match:
      finding:
        title: "Consul HTTP API exposed without ACLs"
        description: "GET /v1/catalog/nodes returned the node catalog without a token — Consul ACLs are disabled or default-allow."
        remediation: "Enable ACLs with default_policy=deny, require tokens, enable TLS, bind the HTTP API to localhost, and firewall port 8500."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /v1/catalog/nodes (HTTP {{consul.status}}): {{consul.body}}"

Dangerous CGI scripts installed in /cgi-bin

CVECVE-1999-0934, CVE-1999-0935, CVE-1999-0936, CVE-1999-0937, CVE-1999-1072, CVE-1999-1374, CVE-1999-1377, CVE-2000-0288, CVE-2000-0423, CVE-2000-0526, CVE-2000-0923, CVE-2000-0952, CVE-2000-0977, CVE-2000-1023, CVE-2000-1131, CVE-2000-1132, CVE-2001-0022, CVE-2001-0023, CVE-2001-0076, CVE-2001-0099, CVE-2001-0100, CVE-2001-0123, CVE-2001-0133, CVE-2001-0135, CVE-2001-0180, CVE-2001-0420, CVE-2001-0562, CVE-2001-1100, CVE-2001-1196, CVE-2001-1205, CVE-2001-1212, CVE-2001-1283, CVE-2001-1343, CVE-2002-0203, CVE-2002-0230, CVE-2002-0263, CVE-2002-0346, CVE-2002-0611, CVE-2002-0710, CVE-2002-0749, CVE-2002-0750, CVE-2002-0751, CVE-2002-0752, CVE-2002-0917, CVE-2002-0955, CVE-2002-1334, CVE-2002-1526, CVE-2003-0153, CVE-2004-0251, CVE-2004-0665, CVE-2004-0696, CVE-2004-0734
Severityhigh · CVSS 10.0
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, http_request · highest QoD 70
Feedtests/vulnerabilities/general/dangerous-cgi-scripts.yaml

One or more CGI scripts with publicly known vulnerabilities (command execution, arbitrary file read, cross-site scripting, buffer overflows, weak data storage) are installed in /cgi-bin. Each finding names the script and the CVE(s) that affect it. Remove the scripts or upgrade the products to a fixed release (see each CVE); disable CGI execution where it is not needed.

How noctis detects it

  1. HTTP(S) request GET /cgi-bin/noctis-{{oob_token}}.cgi
  2. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-1999-1072)
  3. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2002-0749, CVE-2002-0750, CVE-2002-0751, CVE-2002-0752)
  4. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 2 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-0135)
  5. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2002-0955)
  6. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-0562)
  7. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 2 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2002-0346)
  8. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2000-0923)
  9. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-0123)
  10. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-1999-0937)
  11. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-0099)
  12. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-0100)
  13. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2001-1212)
  14. HTTP(S) request GET /cgi-bin/{{cgi}}, for each of 1 values → finding QoD 70: Dangerous CGI script present: /cgi-bin/… (CVE-2000-1132)
  15. … and 35 more steps — see the feed source below

References:

Feed source — tests/vulnerabilities/general/dangerous-cgi-scripts.yaml
# Detection of various dangerous (known-vulnerable) CGI scripts in /cgi-bin.
#
# Port of OpenVAS `pre2008/dangerous_cgis.nasl` (OID 1.3.6.1.4.1.25623.1.0.11748,
# GPL-2.0-only, Copyright (C) 2003 John Lampe). Like the NASL (default preference),
# it requests /cgi-bin/<script> for every script of its list and reports the ones
# that are installed. All 56 script names and the CVE mapping come from the NASL.
#
# Detection is presence-only (QoD 70, the NASL is `remote_banner_unreliable`):
# the list covers ~50 unrelated 1999-2004 products with as many different bugs
# (command injection, traversal, XSS, overflows, weak storage), most with no
# public request detail left; proving each one would mean 50 product-specific
# exploits, several of them destructive (buffer overflows) or needing a login.
# A script that answers 200 is reported with the CVE(s) and NVD score of that
# script only (step-level `cves:`/`cvss:`), not the whole feed list.
#
# Better than the NASL:
#  - Each finding names only the CVE(s) of the script that was found (the NASL
#    report attaches all 52 CVEs to the host).
#  - Fail-closed soft-404 control: a random /cgi-bin/noctis-<token>.cgi is
#    requested first; when it also answers 200 (catch-all / custom error page
#    with 200), nothing is reported. If the control request fails, nothing is
#    reported either.
#  - A 200 whose body starts with `#!` is the script SOURCE served as a static
#    file (no ExecCGI): the CGI does not run, so it is not exploitable — the NASL
#    reports it, we don't.
#  - Redirects are not followed (a 302 to a login page is not the script).
uid: 4aaac87b-0b9f-4729-8c1e-cc931e54dc9a
name: "Dangerous CGI scripts installed in /cgi-bin"
description: |
  One or more CGI scripts with publicly known vulnerabilities (command execution,
  arbitrary file read, cross-site scripting, buffer overflows, weak data storage)
  are installed in /cgi-bin. Each finding names the script and the CVE(s) that
  affect it. Remove the scripts or upgrade the products to a fixed release (see
  each CVE); disable CGI execution where it is not needed.
cves: [CVE-1999-0934, CVE-1999-0935, CVE-1999-0936, CVE-1999-0937, CVE-1999-1072, CVE-1999-1374, CVE-1999-1377, CVE-2000-0288, CVE-2000-0423, CVE-2000-0526, CVE-2000-0923, CVE-2000-0952, CVE-2000-0977, CVE-2000-1023, CVE-2000-1131, CVE-2000-1132, CVE-2001-0022, CVE-2001-0023, CVE-2001-0076, CVE-2001-0099, CVE-2001-0100, CVE-2001-0123, CVE-2001-0133, CVE-2001-0135, CVE-2001-0180, CVE-2001-0420, CVE-2001-0562, CVE-2001-1100, CVE-2001-1196, CVE-2001-1205, CVE-2001-1212, CVE-2001-1283, CVE-2001-1343, CVE-2002-0203, CVE-2002-0230, CVE-2002-0263, CVE-2002-0346, CVE-2002-0611, CVE-2002-0710, CVE-2002-0749, CVE-2002-0750, CVE-2002-0751, CVE-2002-0752, CVE-2002-0917, CVE-2002-0955, CVE-2002-1334, CVE-2002-1526, CVE-2003-0153, CVE-2004-0251, CVE-2004-0665, CVE-2004-0696, CVE-2004-0734]
cvss: 10.0
severity: high
category: exposure
confidence_base: 0.30
tags: [http, cgi, legacy, openvas-port]
services: [http, https]
references:
  - https://nvd.nist.gov/vuln/detail/CVE-1999-0934
  - https://nvd.nist.gov/vuln/detail/CVE-2001-0022
  - https://nvd.nist.gov/vuln/detail/CVE-2002-0749
author: noctis
version: "1.0.0"

steps:
  # Soft-404 control, fail-closed: only a non-200 answer for a random script
  # name enables the probes below.
  - id: init-control
    action: set_var
    var_name: control_ok
    var_value: false

  - id: control
    action: http_request
    method: GET
    path: "/cgi-bin/noctis-{{oob_token}}.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: control
    on_success:
      condition: "control.status != 200"
      set_vars:
        control_ok: true

  # One step per CVE group, so each finding carries only its own CVE(s) / CVSS.
  # Step-level `condition: control_ok` skips the requests when the control failed.
  # Generated from the NASL's cgi[]/cve[] table (CVSS = NVD v2 base score).
  - id: cgi-01
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [AT-admin.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-1072)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Excite for Web Servers admin CGI (password hash disclosure)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-1072]
        cvss: 7.2
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-02
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [CSMailto.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0749, CVE-2002-0750, CVE-2002-0751, CVE-2002-0752)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: CGIscript.net csMailto (command execution, file read, spam relay)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0749, CVE-2002-0750, CVE-2002-0751, CVE-2002-0752]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-03
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [UltraBoard.cgi, UltraBoard.pl]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0135)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: UltraBoard 2000 (world-writable data directories)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0135]
        cvss: 2.1
        severity: low
        confidence_delta: 0.40
        qod: 70

  - id: cgi-04
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [YaBB.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0955)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: YaBB 1 Gold (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0955]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-05
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [a1disp4.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0562)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: A1Stats (command execution / file read)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0562]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-06
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [alert.cgi, service.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0346)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Cobalt RaQ 4 (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0346]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-07
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [authenticate.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0923)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Aplio PRO (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0923]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-08
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [bbs_forum.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0123)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: eXtropia bbs_forum (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0123]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-09
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [bnbform.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-0937)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: BNBForm (arbitrary file read)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-0937]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-10
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [bsguest.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0099)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: bsguest guestbook (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0099]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-11
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [bslist.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0100)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: bslist mailing list (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0100]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-12
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [catgy.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1212)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Aktivate (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1212]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-13
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [cgforum.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-1132)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: DCForum (arbitrary file read)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-1132]
        cvss: 6.4
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-14
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [classifieds.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-0934, CVE-1999-0935)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: classifieds.cgi (file read / command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-0934, CVE-1999-0935]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-15
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [csPassword.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0917)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: CGIscript.net csPassword (.htpasswd under the web root)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0917]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-16
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [cvsview2.cgi, cvslog.cgi, multidiff.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2003-0153)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Mozilla Bonsai (path disclosure)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2003-0153]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-17
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [dnewsweb.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0423)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: NetWin DNEWSWEB (buffer overflow)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0423]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-18
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [download.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-1377)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Matt Wright download.cgi (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-1377]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-19
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [edit_action.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1196)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Webmin Directory (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1196]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-20
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [emumail.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-1526)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: EMU Webmail (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-1526]
        cvss: 4.3
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-21
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [everythingform.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0023)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: everythingform.cgi (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0023]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-22
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [ezadmin.cgi, ezboard.cgi, ezman.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0263)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: EasyBoard 2000 (buffer overflow)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0263]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-23
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [FileSeek.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0611)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: FileSeek (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0611]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-24
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [fom.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0230)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Faq-O-Matic (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0230]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-25
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [gbook.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-1131)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: GBook guestbook (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-1131]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-26
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [getdoc.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0288)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Infonautics getdoc.cgi (payment bypass)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0288]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-27
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [global.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0952)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: GNU Global (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0952]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-28
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [guestserver.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0180)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: guestserver.cgi (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0180]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-29
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [imageFolio.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-1334)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: BizDesign ImageFolio (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-1334]
        cvss: 6.8
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-30
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [lastlines.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1205)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Last Lines (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1205]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-31
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [mailfile.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0977)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: MailFile (arbitrary file read)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0977]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-32
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [mailview.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-0526)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: MailStudio 2000 (arbitrary file read)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-0526]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-33
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [sendmessage.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1100)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: W3Mail (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1100]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-34
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [nsManager.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2000-1023)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Alabanza Control Panel (no authentication)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2000-1023]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-35
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [perlshop.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-1374)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: PerlShop (customer data under the web root)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-1374]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-36
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [readmail.cgi, printmail.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1283)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Ipswitch IMail webmail."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1283]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-37
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [register.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0076)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Ikonboard register.cgi (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0076]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-38
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [sendform.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0710)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: sendform.cgi (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0710]
        cvss: 6.4
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-39
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [setpasswd.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0133)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: InterScan VirusWall web admin (cleartext admin password change)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0133]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-40
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [simplestmail.cgi, simplestguest.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0022)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Leif Wright simplest* scripts (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0022]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-41
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [talkback.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-0420)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: talkback.cgi (directory traversal)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-0420]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-42
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [ttawebtop.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2002-0203)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Tarantella Enterprise (information disclosure)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2002-0203]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-43
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [ws_mail.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2001-1343)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: WebStore 400 (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2001-1343]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-44
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [survey.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-1999-0936)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: BNBSurvey (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-1999-0936]
        cvss: 10.0
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-45
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [rxgoogle.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2004-0251)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: rxgoogle.cgi (cross-site scripting)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2004-0251]
        cvss: 6.8
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-46
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [ShellExample.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2004-0696)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: 4D WebSTAR (directory listing)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2004-0696]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

  - id: cgi-47
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [Web_Store.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2004-0734)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: Web_Store.cgi (command execution)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2004-0734]
        cvss: 7.5
        severity: high
        confidence_delta: 0.40
        qod: 70

  - id: cgi-48
    action: http_request
    condition: "control_ok"
    method: GET
    path: "/cgi-bin/{{cgi}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: cgi_resp
    loop:
      over: [csFAQ.cgi]
      var: cgi
    on_success:
      condition: 'control_ok && cgi_resp.status == 200 && !ereg("^\\s*#!", cgi_resp.body)'
      finding:
        title: "Dangerous CGI script present: /cgi-bin/{{cgi}} (CVE-2004-0665)"
        description: "/cgi-bin/{{cgi}} answers HTTP 200 while a random /cgi-bin/*.cgi path does not. Known-vulnerable script: csFAQ (path disclosure)."
        evidence: "GET /cgi-bin/{{cgi}} -> {{cgi_resp.status}}; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"
        cves: [CVE-2004-0665]
        cvss: 5.0
        severity: medium
        confidence_delta: 0.40
        qod: 70

Exposed sensitive files and debug endpoints

Severityhigh
Categoryexposure — Exposure
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/general/exposed-paths.yaml

Requests well-known sensitive files and debug endpoints without authentication: /.git/config, /.env, /.htaccess, /phpinfo.php, /server-status, /manager/html, /actuator/env, /debug/pprof/, /api/swagger.json and /api/openapi.json. A path is reported only when the reply is a 200 whose body holds what that file or endpoint produces: a Git [core] section with repositoryformatversion, KEY=value secret settings, Apache directives, the PHP configuration table with its Zend Engine credits, the Apache server-status page, the Tomcat manager's application list, Spring Boot's activeProfiles and propertySources JSON, the Go pprof index with its profile links, or an OpenAPI/Swagger document. A random absent path is requested first, and a path is skipped when that control also answers 200 with matching content, so catch-all and soft-404 servers, echo pages and error pages that quote the request report nothing.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET /{{ctl}}
  3. HTTP(S) request GET {{item.path}}
  4. Parses / computes the next value with a Rhai script
  5. Checks item.what for .+ → finding QoD 75: Exposed sensitive path: …
  6. Checks item.what for .+ → finding QoD 75: Exposed sensitive path: …
  7. Checks item.what for .+ → finding QoD 75: Exposed sensitive path: …
Feed source — tests/vulnerabilities/general/exposed-paths.yaml
# Probe well-known sensitive files and debug endpoints over HTTP(S).
#
# Each path is reported only when its body carries content that the exposed
# file or endpoint itself produces (a `[core]` section with
# repositoryformatversion for .git/config, KEY=value secret lines for .env, the
# phpinfo() table, the Apache status page, Spring Boot's propertySources JSON…)
# — never on a bare 200, and never on text that appears in the request.
# A random absent path is fetched first: when it answers 200 with a body that
# matches the same content pattern (catch-all / soft-404 / tarpit servers), that
# path is not reported. Bug #2373: the previous version reported every path on
# any 200, so echo servers, SPAs and soft-404 sites got 15 findings.
#
# /admin, /admin/, /wp-admin/, /console, /debug and /actuator/health were
# dropped: a login page or a {"status":"UP"} health reply is not an exposure,
# and no content proves those paths are open to anyone.
uid: b7d6f17f-e102-491a-acae-1f107201b038
name: "Exposed sensitive files and debug endpoints"
description: >-
  Requests well-known sensitive files and debug endpoints without authentication:
  /.git/config, /.env, /.htaccess, /phpinfo.php, /server-status, /manager/html,
  /actuator/env, /debug/pprof/, /api/swagger.json and /api/openapi.json. A path is
  reported only when the reply is a 200 whose body holds what that file or endpoint
  produces: a Git [core] section with repositoryformatversion, KEY=value secret
  settings, Apache directives, the PHP configuration table with its Zend Engine
  credits, the Apache server-status page, the Tomcat manager's application list,
  Spring Boot's activeProfiles and propertySources JSON, the Go pprof index with its profile links, or an
  OpenAPI/Swagger document. A random absent path is requested first, and a path is
  skipped when that control also answers 200 with matching content, so catch-all
  and soft-404 servers, echo pages and error pages that quote the request report
  nothing.
category: exposure
severity: high
confidence_base: 0.50
tags: [http, exposure, recon]
services: [http, https]
author: florian
version: "2.0.0"

steps:
  # ── Control: a random path that exists on no server ──────────────────────
  - id: control-name
    action: script
    store_as: ctl
    code: |
      "noctis-" + rand_hex(8) + ".txt"

  - id: init-control
    action: set_var
    var_name: control
    var_value: {status: 0, body: ""}

  - id: control-probe
    action: http_request
    method: GET
    path: "/{{ctl}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: control

  # ── Per path: fetch, check the content, compare with the control ─────────
  # `want` is a regex on the body that only the real file / endpoint produces;
  # `sev` picks the finding step below.
  - id: init-probe
    action: set_var
    var_name: path_response
    var_value: {status: 0, body: ""}
    loop:
      var: item
      over:
        - path: /.git/config
          want: '(?s)\[core\].*repositoryformatversion\s*='
          what: "Git repository configuration ([core] section)"
          sev: high
        - path: /.env
          want: '(?m)^\s*(export\s+)?(APP_KEY|APP_ENV|APP_SECRET|DB_PASSWORD|DB_USERNAME|DB_HOST|DB_DATABASE|DATABASE_URL|SECRET_KEY|AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY|MAIL_PASSWORD|REDIS_PASSWORD|JWT_SECRET)\s*='
          what: "environment file with secret settings"
          sev: high
        - path: /actuator/env
          want: '(?s)"activeProfiles"\s*:\s*\[.*"propertySources"\s*:\s*\['
          what: "Spring Boot actuator environment (propertySources)"
          sev: high
        - path: /manager/html
          want: '(?s)Tomcat Web Application Manager.*/manager/html/(undeploy|stop|reload)'
          what: "Tomcat manager application list without authentication"
          sev: high
        - path: /phpinfo.php
          want: '(?s)PHP Version [0-9]+\.[0-9]+.*Zend Scripting Language Engine'
          what: "phpinfo() output"
          sev: medium
        - path: /server-status
          want: '(?s)Apache Server Status for .*Server (Version|uptime)'
          what: "Apache server-status page"
          sev: medium
        - path: /.htaccess
          want: '(?mi)^\s*(RewriteEngine\s+(on|off)|RewriteRule\s+\S|RewriteCond\s+\S|AuthUserFile\s+\S|AuthType\s+\S|Deny\s+from\s+\S|Allow\s+from\s+\S|Require\s+(all|ip|valid-user)|Options\s+[-+]?(Indexes|FollowSymLinks|ExecCGI|All|None|Includes|MultiViews))'
          what: "Apache .htaccess directives"
          sev: medium
        - path: /debug/pprof/
          want: '(?s)Types of profiles available:.*goroutine\?debug=1'
          what: "Go pprof profiling index"
          sev: medium
        - path: /api/swagger.json
          want: '"swagger"\s*:\s*"[0-9]'
          what: "Swagger API description"
          sev: low
        - path: /api/openapi.json
          want: '"openapi"\s*:\s*"[0-9]'
          what: "OpenAPI description"
          sev: low

  - id: probe-path
    action: http_request
    method: GET
    path: "{{item.path}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: path_response

  # hit: this path's body holds the file's content AND the random control
  # does not (a catch-all server answering every path with it).
  - id: check-path
    action: script
    store_as: hit
    code: |
      let body = if type_of(path_response.body) == "string" { path_response.body } else { "" };
      let cbody = if type_of(control.body) == "string" { control.body } else { "" };
      let seen = path_response.status == 200 && ereg(item.want, body);
      let catch_all = control.status == 200 && ereg(item.want, cbody);
      seen && !catch_all

  - id: report-high
    action: match
    source: item.what
    pattern: ".+"
    condition: "hit == true && item.sev == \"high\""
    on_match:
      finding:
        title: "Exposed sensitive path: {{item.path}}"
        description: "{{item.path}} is served without authentication; its reply holds the {{item.what}}."
        remediation: "Block access to this path in the web server or remove the file / disable the endpoint."
        severity: high
        confidence_delta: 0.40
        qod: 75
        evidence: "GET {{item.path}} → 200 with {{item.what}}; random control /{{ctl}} → {{control.status}} without it"

  - id: report-medium
    action: match
    source: item.what
    pattern: ".+"
    condition: "hit == true && item.sev == \"medium\""
    on_match:
      finding:
        title: "Exposed sensitive path: {{item.path}}"
        description: "{{item.path}} is served without authentication; its reply holds the {{item.what}}."
        remediation: "Block access to this path in the web server or remove the file / disable the endpoint."
        severity: medium
        confidence_delta: 0.40
        qod: 75
        evidence: "GET {{item.path}} → 200 with {{item.what}}; random control /{{ctl}} → {{control.status}} without it"

  - id: report-low
    action: match
    source: item.what
    pattern: ".+"
    condition: "hit == true && item.sev == \"low\""
    on_match:
      finding:
        title: "Exposed sensitive path: {{item.path}}"
        description: "{{item.path}} is served without authentication; its reply holds the {{item.what}}."
        remediation: "Restrict the API description to authenticated users if it documents internal endpoints."
        severity: low
        confidence_delta: 0.40
        qod: 75
        evidence: "GET {{item.path}} → 200 with {{item.what}}; random control /{{ctl}} → {{control.status}} without it"

Jenkins anonymous read access

Severityhigh
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/jenkins-anonymous.yaml

The Jenkins API returned the instance model to an unauthenticated request, exposing jobs, nodes and build data (and often enabling further abuse).

How noctis detects it

  1. HTTP(S) request GET /api/json
  2. Checks jk.body for hudson.model.Hudson → finding QoD 75: Jenkins anonymous read access

References:

Feed source — tests/vulnerabilities/general/jenkins-anonymous.yaml
# Flag a Jenkins instance that allows anonymous read access to its API.
# GET /api/json returns the Jenkins model (_class hudson.model.Hudson, job list)
# when anonymous users have Overall/Read; a secured instance returns 403.
uid: 9e3c7a16-4d82-4b05-a1f0-6c2b8e54d7a9
name: "Jenkins anonymous read access"
description: |
  The Jenkins API returned the instance model to an unauthenticated request,
  exposing jobs, nodes and build data (and often enabling further abuse).
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [jenkins, anonymous, exposure, ci, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://www.jenkins.io/doc/book/security/securing-jenkins/"
steps:
  - id: jenkins-api
    action: http_request
    method: GET
    path: "/api/json"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: jk
  - id: check-api
    action: match
    source: jk.body
    pattern: "hudson.model.Hudson"
    condition: "jk.status == 200"
    on_match:
      finding:
        title: "Jenkins anonymous read access"
        description: "GET /api/json returned the Jenkins model without credentials — anonymous read is enabled."
        remediation: "Enable security, remove Overall/Read from Anonymous, use matrix/role auth, and firewall the Jenkins port."
        confidence_delta: 0.35
        qod: 75
        evidence: "GET /api/json (HTTP {{jk.status}}): {{jk.body}}"

MQTT broker accepts anonymous connections

Severityhigh
Categoryexposure — Exposure
Servicesmqtt
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/mqtt-anonymous.yaml

The MQTT broker accepted a CONNECT with no credentials (CONNACK return code 0), allowing anyone to subscribe/publish to topics without authentication.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks mqtt.response_hex for ^2002..00 → finding QoD 70: MQTT broker accepts anonymous connections

References:

Feed source — tests/vulnerabilities/general/mqtt-anonymous.yaml
# Flag an MQTT broker that accepts anonymous connections.
# Sends an MQTT 3.1.1 CONNECT (no username/password) as a binary tcp_dialogue
# frame. A CONNACK with return code 0 (0x20 0x02 0x00 0x00) = connection
# accepted anonymously; return code 5 (0x20 0x02 0x00 0x05) = not authorized.
uid: 2a7e4c93-8d16-4b50-9f02-6c1a3e85d7b0
name: "MQTT broker accepts anonymous connections"
description: |
  The MQTT broker accepted a CONNECT with no credentials (CONNACK return code 0),
  allowing anyone to subscribe/publish to topics without authentication.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [mqtt, anonymous, unauthenticated, exposure, iot, misconfig]
services: [mqtt]
author: noctis
version: "1.0.0"
references:
  - "https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718035"
steps:
  - id: mqtt-connect
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # MQTT 3.1.1 CONNECT, clean session, client id "noctis", no auth.
    send_hex: "101200044d5154540402003c00066e6f63746973"
    store_as: mqtt
  - id: check-connack
    action: match
    source: mqtt.response_hex
    # CONNACK accepted = 20 02 xx 00 (return code 0). Rejected = return code != 0.
    pattern: "^2002..00"
    condition: "mqtt.connected == true"
    on_match:
      finding:
        title: "MQTT broker accepts anonymous connections"
        description: "The broker returned CONNACK with return code 0 to an unauthenticated CONNECT."
        remediation: "Require authentication (allow_anonymous false), use TLS client certs/passwords, and firewall port 1883."
        confidence_delta: 0.35
        qod: 70
        evidence: "CONNACK (hex): {{mqtt.response_hex}}"

Memcached exposed without authentication (TCP)

Severityhigh
Categoryexposure — Exposure
Servicesmemcached
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/memcached-tcp-exposed.yaml

The Memcached server returned stats over TCP without authentication, exposing server internals and implying all cached data is reachable.

How noctis detects it

  1. TCP dialogue: stats
  2. Checks mc.transcript for STAT version → finding QoD 70: Memcached exposed without authentication (TCP)

References:

Feed source — tests/vulnerabilities/general/memcached-tcp-exposed.yaml
# Flag a Memcached server reachable over TCP that answers `stats` without auth.
# An unauthenticated memcached leaks server stats (and all cached data is
# readable/writable). A SASL-protected instance rejects commands pre-auth.
uid: 3e8c5a92-6b14-4d7f-a0e9-1c2b7d64f085
name: "Memcached exposed without authentication (TCP)"
description: |
  The Memcached server returned stats over TCP without authentication, exposing
  server internals and implying all cached data is reachable.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [memcached, unauthenticated, exposure, misconfig]
services: [memcached]
author: noctis
version: "1.0.0"
references:
  - "https://github.com/memcached/memcached/wiki/ProtocolCommands"
steps:
  - id: mc-stats
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    line_ending: "\r\n"
    timeout_secs: 10
    commands:
      - "stats"
    store_as: mc
  - id: check-stats
    action: match
    source: mc.transcript
    pattern: "STAT version"
    condition: "mc.connected == true"
    on_match:
      finding:
        title: "Memcached exposed without authentication (TCP)"
        description: "The memcached server returned STAT output to an unauthenticated client."
        remediation: "Enable SASL authentication, bind to localhost, use -l 127.0.0.1, and firewall port 11211."
        confidence_delta: 0.35
        qod: 70
        evidence: "stats reply: {{mc.transcript}}"

NTP monlist enabled (amplification)

CVECVE-2013-5211
Severityhigh · CVSS 7.5
Categoryexposure — Exposure
Servicesntp
Detectionudp_probe, match · highest QoD 75
Feedtests/vulnerabilities/general/ntp-monlist.yaml

The NTP server answers the deprecated mode-7 `monlist` (MON_GETLIST_1) request, returning recent client data — abusable for high-ratio reflection/amplification.

How noctis detects it

  1. UDP datagram probe
  2. Checks ntp.response_hex for ^(97|d7)00032a → finding QoD 75: NTP monlist enabled (amplification)

References:

Feed source — tests/vulnerabilities/general/ntp-monlist.yaml
# Detect NTP servers with the legacy mode-7 monlist command enabled (CVE-2013-5211).
#
# A tiny mode-7 MON_GETLIST_1 request returns a large list of recent clients —
# a major reflection/amplification DDoS vector. A patched/ntpd ignores mode 7.
uid: a432ee80-8e5f-46be-9e0f-52cd757a28b2
name: "NTP monlist enabled (amplification)"
cves: [CVE-2013-5211]
cvss: 7.5
category: exposure
severity: high
confidence_base: 0.50
tags: [ntp, monlist, amplification, ddos]
services: [ntp]
author: noctis
version: "1.0.0"
description: |
  The NTP server answers the deprecated mode-7 `monlist` (MON_GETLIST_1) request,
  returning recent client data — abusable for high-ratio reflection/amplification.
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-5211"
  - "https://www.cisa.gov/news-events/alerts/2014/01/13/ntp-amplification-attacks-using-cve-2013-5211"

steps:
  - id: ntp-monlist
    action: udp_probe
    port: "{{port}}"
    # mode 7 (private), impl=XNTPD(3), reqcode=MON_GETLIST_1(42=0x2a)
    send_hex: "1700032a00000000"
    timeout_secs: 5
    store_as: ntp

  - id: check-monlist
    action: match
    source: ntp.response_hex
    # mode-7 response (byte0 0x97 or, with the "more" bit, 0xd7), impl 03, reqcode 2a
    pattern: "^(97|d7)00032a"
    condition: "ntp.responded == true"
    on_match:
      finding:
        title: "NTP monlist enabled (amplification)"
        description: "The server replied to a mode-7 monlist request, confirming CVE-2013-5211 amplification exposure."
        remediation: "Upgrade ntpd (>= 4.2.7p26) or set 'disable monitor' / 'noquery'."
        confidence_delta: 0.35
        qod: 75
        evidence: "mode-7 monlist reply (hex): {{ntp.response_hex}}"

Prometheus exposed without authentication

Severityhigh
Categoryexposure — Exposure
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/general/prometheus-exposed.yaml

The Prometheus server returned its runtime scrape configuration to an unauthenticated request, leaking target lists and any embedded credentials.

How noctis detects it

  1. HTTP(S) request GET /api/v1/status/config
  2. Checks prom.body for "status"\s*:\s*"success" → finding QoD 75: Prometheus exposed without authentication

References:

Feed source — tests/vulnerabilities/general/prometheus-exposed.yaml
# Flag a Prometheus server reachable without authentication.
# Prometheus ships no auth of its own; if reachable directly, GET
# /api/v1/status/config returns the full scrape configuration (which often
# embeds credentials/bearer tokens for scrape targets). Behind a proper auth
# proxy the request returns 401.
uid: 2e8c5a73-9d14-4b06-a0f1-7c3b6e24d508
name: "Prometheus exposed without authentication"
description: |
  The Prometheus server returned its runtime scrape configuration to an
  unauthenticated request, leaking target lists and any embedded credentials.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [prometheus, unauthenticated, exposure, info-disclosure, misconfig]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://prometheus.io/docs/operating/security/"
steps:
  - id: prom-config
    action: http_request
    method: GET
    path: "/api/v1/status/config"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: prom
  - id: check-config
    action: match
    source: prom.body
    pattern: "\"status\"\\s*:\\s*\"success\""
    condition: "prom.status == 200"
    on_match:
      finding:
        title: "Prometheus exposed without authentication"
        description: "GET /api/v1/status/config returned the scrape configuration without credentials."
        remediation: "Put Prometheus behind an authenticating reverse proxy (or enable its web.config.file basic auth/TLS), bind locally, and firewall the port."
        confidence_delta: 0.30
        qod: 75
        evidence: "GET /api/v1/status/config (HTTP {{prom.status}}): {{prom.body}}"

SMBv1 enabled (legacy protocol exposed)

Severityhigh
Categoryhardening — Hardening
Servicessmb, microsoft-ds
Detectiontcp_dialogue, script, match · highest QoD 70
Feedtests/vulnerabilities/general/smbv1-enabled.yaml

Sends an SMBv1 NEGOTIATE request offering the "NT LM 0.12" dialect and parses the reply. The finding fires when the server answers with an SMB1 NEGOTIATE response (reply flag set, success status) that accepts the dialect, confirming the legacy SMB1 protocol is enabled — the protocol family behind EternalBlue (MS17-010). SMB2-only replies, an SMB1 "no dialect accepted" reply and a service that merely echoes the request are not reported.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Parses / computes the next value with a Rhai script
  3. Checks neg.smb1 for ^true$ → finding QoD 70: SMBv1 enabled (legacy protocol exposed)

References:

Feed source — tests/vulnerabilities/general/smbv1-enabled.yaml
# Flag a server that still answers the legacy SMBv1 protocol.
#
# SMBv1 is the EternalBlue/WannaCry-era protocol (MS17-010 and family) and
# should be disabled everywhere. Sends an SMB1 NEGOTIATE request (NBSS-framed,
# dialect "NT LM 0.12") as a binary tcp_dialogue frame and parses the reply in
# a `script` step. A host with SMBv1 disabled replies with SMB2 (fe534d42), with
# an SMB1 "no dialect" reply (DialectIndex 0xFFFF, Samba with
# `server min protocol = SMB2`), or closes the connection.
#
# The reply must be a genuine SMB1 NEGOTIATE *response*: an echo service on
# an "smb" port mirrors our request, which also carries ff534d42 (#2380).
#
# Reply offsets (byte -> hex offset = byte x 2), NBSS header included:
#   0   NBSS type, 0x00 session message       hex  0..1
#   4   Protocol ff534d42                     hex  8..15
#   8   Command, 0x72 NEGOTIATE               hex 16..17
#   9   Status u32le, 0 = success             hex 18..25
#   13  Flags, 0x80 SMB_FLAGS_REPLY           hex 26..27  (our request: 0x18)
#   36  WordCount                             hex 72..73
#   37  DialectIndex u16le (0 = "NT LM 0.12", the only dialect offered;
#       0xFFFF = none accepted)               hex 74..77
uid: 6e0c2a84-7f19-4b3d-8a52-1c9d4e6075b2
name: "SMBv1 enabled (legacy protocol exposed)"
description: |
  Sends an SMBv1 NEGOTIATE request offering the "NT LM 0.12" dialect and
  parses the reply. The finding fires when the server answers with an SMB1
  NEGOTIATE response (reply flag set, success status) that accepts the
  dialect, confirming the legacy SMB1 protocol is enabled — the protocol family
  behind EternalBlue (MS17-010). SMB2-only replies, an SMB1 "no dialect
  accepted" reply and a service that merely echoes the request are not
  reported.
cves: []
category: hardening
severity: high
confidence_base: 0.45
tags: [smb, smbv1, legacy, exposure, misconfig, eternalblue]
services: [smb, microsoft-ds]
author: noctis
version: "1.1.0"
references:
  - "https://learn.microsoft.com/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3"

steps:
  - id: smb1-negotiate
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # SMB1 NEGOTIATE request, NBSS-framed, single dialect "NT LM 0.12".
    send_hex: "0000002fff534d4272000000001853c800000000000000000000000000002f4b00000000000c00024e54204c4d20302e313200"
    store_as: smb

  # Parse the reply. Returns a map stored as `neg`:
  #   smb1          bool  — a successful SMB1 NEGOTIATE response accepting our dialect
  #   flags         int   — SMB header Flags byte
  #   dialect_index int   — DialectIndex (65535 = no dialect accepted)
  - id: parse-negotiate
    action: script
    condition: "smb.connected == true"
    store_as: neg
    code: |
      let hex = if type_of(smb.response_hex) == "string" { tolower(smb.response_hex) } else { "" };
      let long = strlen(hex) >= 78;
      let flags = if long { u8(substr(hex, 26, 27)) } else { 0 };
      let idx = if long { u16le(substr(hex, 74, 77)) } else { 65535 };
      let ok = long
        && substr(hex, 0, 1) == "00"
        && substr(hex, 8, 15) == "ff534d42"
        && substr(hex, 16, 17) == "72"
        && u32le(substr(hex, 18, 25)) == 0
        && (flags & 0x80) == 0x80
        && u8(substr(hex, 72, 73)) >= 1
        && idx == 0;
      #{ smb1: ok, flags: flags, dialect_index: idx }

  - id: check-smbv1-reply
    action: match
    source: neg.smb1
    pattern: "^true$"
    condition: "neg.smb1 == true"
    on_match:
      finding:
        title: "SMBv1 enabled (legacy protocol exposed)"
        description: "The server answered an SMBv1 NEGOTIATE with an SMB1 NEGOTIATE response accepting the NT LM 0.12 dialect, confirming SMBv1 is enabled."
        remediation: "Disable SMBv1 (keep only SMB2/SMB3); it is the protocol family exploited by EternalBlue (MS17-010). Firewall port 445."
        confidence_delta: 0.35
        qod: 70
        evidence: "SMB1 NEGOTIATE response: SMB header Flags {{neg.flags}} (reply bit 0x80 set), DialectIndex {{neg.dialect_index}}; hex {{smb.response_hex}}"

SMTP open relay

Severityhigh
Categoryexposure — Exposure
Servicessmtp
Detectiontcp_dialogue, match · highest QoD 75
Feedtests/vulnerabilities/general/smtp-open-relay.yaml

The SMTP server accepts mail from an external sender to an external recipient (MAIL FROM / RCPT TO both non-local), i.e. it is an open relay. The check stops before DATA, so nothing is actually relayed.

How noctis detects it

  1. TCP dialogue: EHLO noctis.test, MAIL FROM:<prober@external-noctis.test>, RCPT TO:<relay-check@external-noctis.te…
  2. Checks smtp.transcript for (^|\n)250[ -][^\n]*$ → finding QoD 75: SMTP open relay

References:

Feed source — tests/vulnerabilities/general/smtp-open-relay.yaml
# Detect SMTP servers that relay mail for arbitrary external domains (open relay).
#
# Safe check: EHLO / MAIL FROM / RCPT TO with an external sender and recipient,
# then stop — DATA is never sent, so no mail is relayed. An open relay accepts the
# external RCPT TO with a 250; a hardened server rejects it with a 5xx.
uid: 974dd800-8911-4db0-929f-f8f6b5de97f5
name: "SMTP open relay"
description: |
  The SMTP server accepts mail from an external sender to an external recipient
  (MAIL FROM / RCPT TO both non-local), i.e. it is an open relay. The check stops
  before DATA, so nothing is actually relayed.
cves: []
category: exposure
severity: high
confidence_base: 0.50
tags: [smtp, open-relay, exposure, misconfig]
services: [smtp]
author: noctis
version: "1.0.0"
references:
  - "https://cwe.mitre.org/data/definitions/269.html"

steps:
  - id: smtp-relay
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    commands:
      - "EHLO noctis.test"
      - "MAIL FROM:<prober@external-noctis.test>"
      - "RCPT TO:<relay-check@external-noctis.test>"
    store_as: smtp

  - id: check-relay
    action: match
    source: smtp.transcript
    # the LAST reply (to RCPT TO, external->external) starting 250 = relay accepted;
    # anchored to end-of-transcript so the 250s from EHLO/MAIL FROM don't match.
    pattern: "(^|\\n)250[ -][^\\n]*$"
    on_match:
      finding:
        title: "SMTP open relay"
        description: "Server accepted RCPT TO for an external recipient from an external sender (250), indicating an open relay."
        remediation: "Restrict relaying to authenticated users / trusted networks only."
        confidence_delta: 0.35
        qod: 75
        evidence: "SMTP dialogue: {{smtp.transcript}}"

SSH default/weak credentials

Severityhigh
Categorydefault-credentials — Default credentials
Servicesssh
Detectionssh_exec, match · highest QoD 97
Feedtests/vulnerabilities/general/ssh-default-credentials.yaml

The SSH server accepts a well-known default credential (e.g. root:toor), giving command execution. Confirmed by running `id` over the authenticated session.

How noctis detects it

  1. SSH login and command id
  2. Checks ssh.exec_output for uid=\d+.*gid=\d+ → finding QoD 97: SSH default/weak credentials

References:

Feed source — tests/vulnerabilities/general/ssh-default-credentials.yaml
# Detect SSH servers accepting default / weak credentials.
#
# Tries a short explicit list of well-known default credentials; on success runs
# `id` and confirms command execution from its output. The credential list is
# explicit (no generated brute-force).
uid: 12f21e37-8f31-4e27-9ab7-93186a3dd006
name: "SSH default/weak credentials"
description: |
  The SSH server accepts a well-known default credential (e.g. root:toor), giving
  command execution. Confirmed by running `id` over the authenticated session.
cves: []
category: default-credentials
severity: high
confidence_base: 0.40
tags: [ssh, default-credentials, weak-auth, rce]
services: [ssh]
author: noctis
version: "1.0.0"
references:
  - "https://cwe.mitre.org/data/definitions/1392.html"

steps:
  - id: ssh-login
    action: ssh_exec
    port: "{{port}}"
    timeout_secs: 10
    credentials:
      - "root:toor"
      - "root:root"
      - "admin:admin"
    command: "id"
    store_as: ssh

  - id: check-default-cred
    action: match
    source: ssh.exec_output
    pattern: "uid=\\d+.*gid=\\d+"
    condition: "ssh.authenticated == true"
    on_match:
      finding:
        title: "SSH default/weak credentials"
        description: "The server accepted a default credential and executed `id`, confirming command execution."
        remediation: "Remove default accounts / set strong credentials and disable password auth where possible."
        confidence_delta: 0.55
        qod: 97
        evidence: "authenticated as {{ssh.auth_user}} — id: {{ssh.exec_output}}"

VNC server allows connections without authentication

Severityhigh
Categoryexposure — Exposure
Servicesvnc
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/vnc-no-auth.yaml

The VNC server advertises the RFB "None" security type, allowing anyone who can reach the port to open an interactive desktop session without a password.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks vnc.response_hex for ^.{26}(?:..)*01 → finding QoD 70: VNC server allows connections without authentication

References:

Feed source — tests/vulnerabilities/general/vnc-no-auth.yaml
# Flag a VNC/RFB server that offers the "None" security type (no password).
#
# RFB handshake: the server sends a fixed 12-byte ProtocolVersion banner, the
# client echoes a version, then the server sends its security types. In RFB 3.7+
# that is [count:u8][type:u8 x count]; security type 1 is "None" — no password.
# response_hex is: 24 hex chars (12-byte banner) + 2 (count) + the type bytes, so
# a type byte 01 anywhere in the type list (offset >= 26, byte-aligned) means
# None is offered. The regex skips the count byte to avoid matching it.
# (Also matches RFB 3.3's 4-byte security type 00000001.)
uid: 4f2b7c19-3d8e-4a65-9c01-5e7a2d6b84f3
name: "VNC server allows connections without authentication"
description: |
  The VNC server advertises the RFB "None" security type, allowing anyone who
  can reach the port to open an interactive desktop session without a password.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [vnc, rfb, unauthenticated, exposure, misconfig]
services: [vnc]
author: noctis
version: "1.0.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc6143#section-7.1.2"

steps:
  - id: rfb-handshake
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    # Client ProtocolVersion "RFB 003.008\n" sent verbatim as a binary frame.
    send_hex: "524642203030332e3030380a"
    store_as: vnc

  - id: check-none-security
    action: match
    source: vnc.response_hex
    # After the 12-byte banner (24 hex) and the 1-byte count, a byte-aligned 01
    # in the security-type list = the "None" type is offered.
    pattern: "^.{26}(?:..)*01"
    condition: "vnc.connected == true"
    on_match:
      finding:
        title: "VNC server allows connections without authentication"
        description: "The RFB handshake advertises the None security type (1); the desktop is reachable without a password."
        remediation: "Require VNC authentication (or tunnel VNC over SSH/VPN) and firewall port 5900."
        confidence_delta: 0.35
        qod: 70
        evidence: "RFB handshake (hex): {{vnc.response_hex}}"

Weak TLS configuration

Severityhigh
Categoryhardening — Hardening
Serviceshttps
Detectiontls_check, match
Feedtests/vulnerabilities/general/tls-weak-config.yaml

Inspects TLS handshake for deprecated protocol versions and certificate issues

How noctis detects it

  1. TLS handshake: protocol version, cipher and certificate inspection
  2. Checks tls.cert_valid for false → finding: Invalid or untrusted TLS certificate
  3. Checks tls.protocol_version for TLS10|TLS11|Tlsv1_0|Tlsv1_1 → finding: Deprecated TLS protocol version in use

References:

Feed source — tests/vulnerabilities/general/tls-weak-config.yaml
# Detect weak TLS configurations: old protocols, self-signed/expired certs.
uid: 136b0b9f-9b4c-4a42-95ba-ea0a6f64cffe
name: "Weak TLS configuration"
description: "Inspects TLS handshake for deprecated protocol versions and certificate issues"
category: hardening
severity: high
confidence_base: 0.95
tags: [tls, ssl, crypto, hardening]
services: [https]
author: florian
version: "1.0.0"
references:
  - "https://www.ssllabs.com/projects/best-practices/"

steps:
  - id: tls-inspect
    action: tls_check
    port: "{{port}}"
    timeout_secs: 10
    store_as: tls

  - id: check-cert-validity
    action: match
    source: tls.cert_valid
    pattern: "false"
    on_match:
      finding:
        title: "Invalid or untrusted TLS certificate"
        description: "Certificate failed validation — may be self-signed or expired."
        remediation: "Install a certificate from a trusted CA."
        confidence_delta: 0.0

  # Detect TLS 1.0 / 1.1 — check if protocol version string contains them
  - id: check-old-protocol
    action: match
    source: tls.protocol_version
    pattern: "TLS10|TLS11|Tlsv1_0|Tlsv1_1"
    case_insensitive: true
    on_match:
      finding:
        title: "Deprecated TLS protocol version in use"
        description: "TLS 1.0 or 1.1 is enabled — these are cryptographically weak."
        remediation: "Disable TLS 1.0/1.1; accept only TLS 1.2 and TLS 1.3."
        confidence_delta: 0.0
        evidence: "Negotiated: {{tls.protocol_version}}"

X11 display open without authentication

Severityhigh
Categoryexposure — Exposure
Servicesx11
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/x11-open.yaml

The X11 server accepted a connection-setup request with no authorization, exposing the display to screen capture, keystroke logging and input injection.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks x11.response_hex for ^01 → finding QoD 70: X11 display open without authentication

References:

Feed source — tests/vulnerabilities/general/x11-open.yaml
# Flag an X11 display that accepts connections without authentication.
# Sends an X11 connection-setup request (no auth protocol) as a binary
# tcp_dialogue frame. The server's reply begins with 0x01 (Success) when the
# display is open to anyone, or 0x00 (Failed, "No protocol specified") when it
# requires MIT-MAGIC-COOKIE / xauth. An open display exposes the full desktop
# (keystrokes, screenshots, input injection).
uid: 5c2a7e94-1d63-4b08-9f01-6e3c8a24b075
name: "X11 display open without authentication"
description: |
  The X11 server accepted a connection-setup request with no authorization,
  exposing the display to screen capture, keystroke logging and input injection.
cves: []
category: exposure
severity: high
confidence_base: 0.45
tags: [x11, unauthenticated, exposure, misconfig]
services: [x11]
author: noctis
version: "1.0.0"
references:
  - "https://www.x.org/releases/current/doc/xproto/x11protocol.html#Connection_Setup"
steps:
  - id: x11-setup
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # X11 connection setup, little-endian, protocol 11.0, no auth.
    send_hex: "6c000b000000000000000000"
    store_as: x11
  - id: check-success
    action: match
    source: x11.response_hex
    # Setup reply byte 0: 0x01 = Success (open), 0x00 = Failed (auth required).
    pattern: "^01"
    condition: "x11.connected == true"
    on_match:
      finding:
        title: "X11 display open without authentication"
        description: "The X11 setup request succeeded (reply 0x01) with no authorization — the display is open."
        remediation: "Require xauth (MIT-MAGIC-COOKIE-1), disable -nolisten tcp or bind locally, and firewall ports 6000-6009."
        confidence_delta: 0.35
        qod: 70
        evidence: "X11 setup reply (hex): {{x11.response_hex}}"

memcached exposed over UDP

Severityhigh
Categoryexposure — Exposure
Servicesmemcached
Detectionudp_probe, match · highest QoD 75
Feedtests/vulnerabilities/general/memcached-udp-exposed.yaml

The memcached server answers unauthenticated `stats` over UDP, exposing server statistics and enabling reflection/amplification DDoS.

How noctis detects it

  1. UDP datagram probe
  2. Checks mc.response_hex for 53544154 → finding QoD 75: memcached exposed over UDP

References:

Feed source — tests/vulnerabilities/general/memcached-udp-exposed.yaml
# Detect memcached exposed over UDP (reflection/amplification risk).
#
# memcached with UDP enabled answers an unauthenticated `stats` with a large
# response — abused for DDoS amplification. Send the 8-byte memcached UDP frame
# header + "stats\r\n"; a reply containing STAT lines confirms UDP exposure.
uid: 4c84cb60-cba2-457e-b227-2077c4508582
name: "memcached exposed over UDP"
description: |
  The memcached server answers unauthenticated `stats` over UDP, exposing server
  statistics and enabling reflection/amplification DDoS.
cves: []
category: exposure
severity: high
confidence_base: 0.50
tags: [memcached, udp, amplification, exposure, misconfig]
services: [memcached]
author: noctis
version: "1.0.0"
references:
  - "https://www.cisa.gov/news-events/alerts/2018/02/27/memcached-ddos-attacks"

steps:
  - id: memcached-stats
    action: udp_probe
    port: "{{port}}"
    # memcached UDP frame header (req-id 0, seq 0, 1 datagram, reserved) + "stats\r\n"
    send_hex: "000000000001000073746174730d0a"
    timeout_secs: 5
    store_as: mc

  - id: check-stat
    action: match
    source: mc.response_hex
    # hex of "STAT" — the reply is binary (8-byte UDP header) so match on hex
    pattern: "53544154"
    condition: "mc.responded == true"
    on_match:
      finding:
        title: "memcached exposed over UDP"
        description: "The server answered an unauthenticated UDP 'stats' with STAT output — reflection/amplification risk."
        remediation: "Disable UDP (-U 0), bind to localhost, and firewall port 11211."
        confidence_delta: 0.35
        qod: 75
        evidence: "UDP stats reply (hex): {{mc.response_hex}}"

Anonymous FTP access enabled

Severitymedium
Categoryexposure — Exposure
Servicesftp
Detectiontcp_dialogue, match · highest QoD 75
Feedtests/vulnerabilities/general/ftp-anonymous.yaml

The FTP server accepts anonymous authentication (USER anonymous with any password), exposing its contents without credentials.

How noctis detects it

  1. TCP dialogue: USER anonymous, PASS noctis@example.com
  2. Checks ftp.transcript for (^|\n)230[ -] → finding QoD 75: Anonymous FTP access enabled

References:

Feed source — tests/vulnerabilities/general/ftp-anonymous.yaml
# Detect FTP servers that accept anonymous login.
#
# Connects, reads the 220 greeting, then USER anonymous / PASS <any>. A 230 reply
# to the password means anonymous access is enabled (classic exposure).
uid: 59a8b856-44d8-4c0c-9b8e-0c8b82e901b7
name: "Anonymous FTP access enabled"
description: |
  The FTP server accepts anonymous authentication (USER anonymous with any
  password), exposing its contents without credentials.
cves: []
category: exposure
severity: medium
confidence_base: 0.50
tags: [ftp, anonymous, exposure, misconfig]
services: [ftp]
author: noctis
version: "1.0.0"
references:
  - "https://cwe.mitre.org/data/definitions/287.html"

steps:
  - id: ftp-login
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    commands:
      - "USER anonymous"
      - "PASS noctis@example.com"
    store_as: ftp

  - id: check-anonymous
    action: match
    source: ftp.transcript
    # a 230 reply code (start of a line) = login accepted
    pattern: "(^|\\n)230[ -]"
    on_match:
      finding:
        title: "Anonymous FTP access enabled"
        description: "The server accepted 'USER anonymous' and returned a 230 success to the password."
        remediation: "Disable the anonymous account in the FTP server configuration."
        confidence_delta: 0.35
        qod: 75
        evidence: "FTP dialogue: {{ftp.transcript}}"

IMAP cleartext authentication allowed

Severitymedium
Categoryhardening — Hardening
Servicesimap
Detectiontcp_dialogue, script, match · highest QoD 70
Feedtests/vulnerabilities/general/imap-cleartext-auth.yaml

The IMAP server's pre-TLS CAPABILITY list does not advertise LOGINDISABLED, so it accepts plaintext LOGIN before STARTTLS — credentials can be sent in the clear and intercepted. The test reads the greeting, sends one `CAPABILITY` command and reports only when the server answers like IMAP (an `* OK` / `* PREAUTH` greeting and an untagged `* CAPABILITY ... IMAP4` line) and its CAPABILITY lines lack LOGINDISABLED.

How noctis detects it

  1. TCP dialogue: a1 CAPABILITY
  2. Parses / computes the next value with a Rhai script
  3. Checks caps.cleartext for ^true$ → finding QoD 70: IMAP cleartext authentication allowed

References:

Feed source — tests/vulnerabilities/general/imap-cleartext-auth.yaml
# Flag an IMAP server that allows cleartext login (no TLS required).
#
# An IMAP server advertises LOGINDISABLED in its pre-TLS CAPABILITY list when it
# refuses plaintext logins until STARTTLS. If the CAPABILITY reply comes back
# WITHOUT LOGINDISABLED, plaintext authentication is accepted over the clear
# channel, exposing credentials. We read the banner, ask for CAPABILITY, and
# report when a well-formed IMAP exchange (greeting, untagged CAPABILITY line)
# came back without LOGINDISABLED on the capability line.
uid: 2b98bf08-ac86-41bb-b1f2-ec8bbb159b11
name: "IMAP cleartext authentication allowed"
description: |
  The IMAP server's pre-TLS CAPABILITY list does not advertise LOGINDISABLED,
  so it accepts plaintext LOGIN before STARTTLS — credentials can be sent in
  the clear and intercepted. The test reads the greeting, sends one
  `CAPABILITY` command and reports only when the server answers like IMAP
  (an `* OK` / `* PREAUTH` greeting and an untagged `* CAPABILITY ... IMAP4`
  line) and its CAPABILITY lines lack LOGINDISABLED.
cves: []
category: hardening
severity: medium
confidence_base: 0.40
tags: [imap, cleartext, starttls, exposure, misconfig]
services: [imap]
author: noctis
version: "1.1.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3"

steps:
  - id: imap-capability
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    line_ending: "\r\n"
    timeout_secs: 10
    commands:
      - "a1 CAPABILITY"
    store_as: imap

  # Parse the exchange: only a real IMAP server counts — an untagged greeting
  # (`* OK` / `* PREAUTH`) and an untagged `* CAPABILITY ... IMAP4...` line (the
  # tagged `a1 OK` is not required: a server may send it after the read window).
  # An echo service mirrors `a1 CAPABILITY` and sends no greeting, so it never
  # passes. LOGINDISABLED is then looked up on the untagged CAPABILITY lines,
  # not anywhere in the transcript.
  - id: parse-capability
    action: script
    condition: "imap.connected == true"
    store_as: caps
    code: |
      let banner = if type_of(imap.banner) == "string" { imap.banner } else { "" };
      let reply = if imap.responses.len() > 0 { imap.responses[0] } else { "" };
      let greeting = ereg("^\\* (OK|PREAUTH)\\b", banner, true);
      let line = egrep("^\\* CAPABILITY .*\\bIMAP4", reply, true);
      let all_caps = egrep("^\\* CAPABILITY ", reply, true);
      let imap_ok = greeting && line != "";
      #{
        imap: imap_ok,
        line: line,
        cleartext: imap_ok && !ereg("\\bLOGINDISABLED\\b", all_caps, true)
      }

  - id: check-logindisabled-absent
    action: match
    source: caps.cleartext
    pattern: "^true$"
    condition: "caps.imap == true"
    on_match:
      finding:
        title: "IMAP cleartext authentication allowed"
        description: "The IMAP CAPABILITY list does not advertise LOGINDISABLED; plaintext LOGIN is accepted before STARTTLS."
        remediation: "Advertise LOGINDISABLED until STARTTLS succeeds (and require TLS), or disable plaintext IMAP on port 143."
        confidence_delta: 0.35
        qod: 70
        evidence: "CAPABILITY reply (no LOGINDISABLED): {{caps.line}}"

LDAP allows anonymous bind

Severitymedium
Categoryexposure — Exposure
Servicesldap
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/ldap-anonymous-bind.yaml

The LDAP server accepted an anonymous simple bind, allowing unauthenticated clients to query directory contents (users, groups, structure).

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Checks ldap.response_hex for 61..0a0100 → finding QoD 70: LDAP allows anonymous bind

References:

Feed source — tests/vulnerabilities/general/ldap-anonymous-bind.yaml
# Flag an LDAP server that accepts an anonymous bind.
#
# Sends a BER-encoded LDAPv3 anonymous simple bindRequest (empty DN, empty
# password) as a binary tcp_dialogue frame and reads the bindResponse. A
# resultCode of success (0) inside the [APPLICATION 1] bindResponse means the
# directory is queryable without credentials; inappropriateAuthentication (48)
# or unwillingToPerform (53) means anonymous bind is refused.
uid: 8a3f6d52-1c47-4e9b-b0a8-5d2e9c71f604
name: "LDAP allows anonymous bind"
description: |
  The LDAP server accepted an anonymous simple bind, allowing unauthenticated
  clients to query directory contents (users, groups, structure).
cves: []
category: exposure
severity: medium
confidence_base: 0.45
tags: [ldap, anonymous, unauthenticated, exposure, misconfig]
services: [ldap]
author: noctis
version: "1.0.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc4511#section-4.2"

steps:
  - id: ldap-anon-bind
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    # LDAPv3 anonymous simple bindRequest (messageID 1, empty DN, empty password).
    send_hex: "300c020101600702010304008000"
    store_as: ldap

  - id: check-bind-success
    action: match
    source: ldap.response_hex
    # [APPLICATION 1] bindResponse (0x61) whose resultCode ENUMERATED is success:
    # 0a 01 00. inappropriateAuthentication would be 0a 01 30.
    pattern: "61..0a0100"
    condition: "ldap.connected == true"
    on_match:
      finding:
        title: "LDAP allows anonymous bind"
        description: "An anonymous LDAPv3 simple bind returned resultCode success — the directory is queryable without credentials."
        remediation: "Disable anonymous bind (require authentication) and restrict directory read access; firewall port 389/636."
        confidence_delta: 0.30
        qod: 70
        evidence: "bindResponse (hex): {{ldap.response_hex}}"

Missing HTTP security headers

Severitymedium
Categoryhardening — Hardening
Serviceshttp, https
Detectionmatch
Feedtests/vulnerabilities/general/http-security-headers.yaml

Sends a GET / request and, when the server answers with a 2xx or 3xx status, reports each missing security response header (Strict-Transport-Security, X-Frame-Options, Content-Security-Policy, X-Content-Type-Options) as its own finding. No finding is reported when the request fails or returns an error status.

How noctis detects it

  1. Checks probe.headers does not match strict-transport-security → finding: Missing Strict-Transport-Security (HSTS)
  2. Checks probe.headers does not match x-frame-options → finding: Missing X-Frame-Options
  3. Checks probe.headers does not match content-security-policy → finding: Missing Content-Security-Policy
  4. Checks probe.headers does not match x-content-type-options → finding: Missing X-Content-Type-Options

References:

Feed source — tests/vulnerabilities/general/http-security-headers.yaml
# Check for missing HTTP security headers.
#
# Each missing header is reported as a separate finding with its own
# confidence so downstream correlation can group them.
#
# Every negated match is guarded by the probe status: when the probe fails,
# `probe` is never stored and the unresolved `{{probe.headers}}` text would
# "lack" every header — a false positive on a target that never answered (#1220).
uid: 1c22561e-0d2a-4f7d-be74-096137de4982
name: "Missing HTTP security headers"
description: "Sends a GET / request and, when the server answers with a 2xx or 3xx status, reports each missing security response header (Strict-Transport-Security, X-Frame-Options, Content-Security-Policy, X-Content-Type-Options) as its own finding. No finding is reported when the request fails or returns an error status."
category: hardening
severity: medium
confidence_base: 0.90
tags: [http, headers, hardening, owasp]
services: [http, https]
author: florian
version: "1.0.0"
references:
  - "https://owasp.org/www-project-secure-headers/"

includes:
  - ../../common/http_base.yaml

vars:
  http_path: "/"

steps:
  # ── HSTS ──────────────────────────────────────────────────────────────
  - id: check-hsts
    action: match
    source: probe.headers
    pattern: "strict-transport-security"
    case_insensitive: true
    negate: true
    condition: "probe.status >= 200 && probe.status < 400"
    on_match:
      finding:
        title: "Missing Strict-Transport-Security (HSTS)"
        description: "Without HSTS, browsers may connect over plain HTTP."
        remediation: "Add: Strict-Transport-Security: max-age=31536000; includeSubDomains"
        confidence_delta: 0.0

  # ── X-Frame-Options ───────────────────────────────────────────────────
  - id: check-xframe
    action: match
    source: probe.headers
    pattern: "x-frame-options"
    case_insensitive: true
    negate: true
    condition: "probe.status >= 200 && probe.status < 400"
    on_match:
      finding:
        title: "Missing X-Frame-Options"
        description: "Application may be vulnerable to clickjacking."
        remediation: "Add: X-Frame-Options: DENY"
        confidence_delta: 0.0

  # ── Content-Security-Policy ───────────────────────────────────────────
  - id: check-csp
    action: match
    source: probe.headers
    pattern: "content-security-policy"
    case_insensitive: true
    negate: true
    condition: "probe.status >= 200 && probe.status < 400"
    on_match:
      finding:
        title: "Missing Content-Security-Policy"
        description: "No CSP header — XSS attacks have broader impact."
        remediation: "Define a Content-Security-Policy appropriate for the application."
        confidence_delta: -0.05

  # ── X-Content-Type-Options ────────────────────────────────────────────
  - id: check-xcto
    action: match
    source: probe.headers
    pattern: "x-content-type-options"
    case_insensitive: true
    negate: true
    condition: "probe.status >= 200 && probe.status < 400"
    on_match:
      finding:
        title: "Missing X-Content-Type-Options"
        remediation: "Add: X-Content-Type-Options: nosniff"
        confidence_delta: -0.05
        severity: low

Open DNS resolver

Severitymedium
Categoryexposure — Exposure
Servicesdomain
Detectionudp_probe, match · highest QoD 75
Feedtests/vulnerabilities/general/dns-open-resolver.yaml

The DNS server performs recursion for external clients, answering a recursive query with "recursion available" — abusable for reflection/amplification DDoS.

How noctis detects it

  1. UDP datagram probe
  2. Checks dns.response_hex for ^13378180 → finding QoD 75: Open DNS resolver

References:

Feed source — tests/vulnerabilities/general/dns-open-resolver.yaml
# Detect open recursive DNS resolvers (reflection/amplification risk).
#
# Send a recursive A query (RD=1) for an external name. An open resolver answers
# with "recursion available" and NOERROR (flags 0x8180); a closed server REFUSES
# (rcode 5) or clears the RA bit.
uid: 19ef8b3a-aeec-4b90-8f17-03562f81e69c
name: "Open DNS resolver"
description: |
  The DNS server performs recursion for external clients, answering a recursive
  query with "recursion available" — abusable for reflection/amplification DDoS.
cves: []
category: exposure
severity: medium
confidence_base: 0.50
tags: [dns, open-resolver, amplification, exposure, misconfig]
services: [domain]
author: noctis
version: "1.0.0"
references:
  - "https://www.cisa.gov/news-events/alerts/2013/03/29/dns-amplification-attacks"

steps:
  - id: dns-query
    action: udp_probe
    port: "{{port}}"
    # DNS A query for example.com, txid 0x1337, RD=1
    send_hex: "133701000001000000000000076578616d706c6503636f6d0000010001"
    timeout_secs: 5
    store_as: dns

  - id: check-recursion
    action: match
    source: dns.response_hex
    # txid 1337 + flags 8180 (QR, RD, RA set, rcode NOERROR) = recursion available
    pattern: "^13378180"
    condition: "dns.responded == true"
    on_match:
      finding:
        title: "Open DNS resolver"
        description: "The server answered a recursive query with recursion-available + NOERROR, confirming an open resolver."
        remediation: "Restrict recursion to trusted clients (allow-recursion) or disable it."
        confidence_delta: 0.35
        qod: 75
        evidence: "DNS response (hex): {{dns.response_hex}}"

POP3 cleartext authentication allowed

Severitymedium
Categoryhardening — Hardening
Servicespop3
Detectiontcp_dialogue, script, match · highest QoD 70
Feedtests/vulnerabilities/general/pop3-cleartext-auth.yaml

The POP3 server's CAPA list does not advertise STLS, so it accepts plaintext USER/PASS without TLS — credentials can be sent in the clear and intercepted. The test reads the greeting, sends `CAPA` and reports only when the server answers like POP3 (a `+OK` greeting and a `+OK` capability listing with a `USER` line) and no `STLS` line is listed.

How noctis detects it

  1. TCP dialogue: CAPA
  2. Parses / computes the next value with a Rhai script
  3. Checks capa.cleartext for ^true$ → finding QoD 70: POP3 cleartext authentication allowed

References:

Feed source — tests/vulnerabilities/general/pop3-cleartext-auth.yaml
# Flag a POP3 server that allows cleartext login (no TLS required).
#
# A POP3 server that enforces TLS advertises STLS in its CAPA list and refuses
# USER/PASS until STLS succeeds. If the CAPA reply comes back WITHOUT STLS,
# plaintext authentication is accepted over the clear channel, exposing
# credentials. We read the banner, send CAPA, and report when a well-formed
# POP3 exchange (+OK greeting, +OK CAPA listing USER) lists no STLS.
uid: adbc946d-4ad7-4158-b2a7-ce44c7f8f74e
name: "POP3 cleartext authentication allowed"
description: |
  The POP3 server's CAPA list does not advertise STLS, so it accepts plaintext
  USER/PASS without TLS — credentials can be sent in the clear and intercepted.
  The test reads the greeting, sends `CAPA` and reports only when the server
  answers like POP3 (a `+OK` greeting and a `+OK` capability listing with a
  `USER` line) and no `STLS` line is listed.
cves: []
category: hardening
severity: medium
confidence_base: 0.40
tags: [pop3, cleartext, stls, starttls, exposure, misconfig]
services: [pop3]
author: noctis
version: "1.1.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc2595#section-4"

steps:
  - id: pop3-capa
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    line_ending: "\r\n"
    timeout_secs: 10
    commands:
      - "CAPA"
    store_as: pop3

  # Parse the exchange: only a real POP3 server counts — a `+OK` greeting and a
  # `+OK` CAPA reply listing USER on a line of its own (USER is advertised by
  # any CAPA-capable server that takes USER/PASS). An echo service mirrors
  # `CAPA` and sends no greeting, so it never passes. STLS is then looked up
  # as a capability line, not anywhere in the transcript.
  - id: parse-capa
    action: script
    condition: "pop3.connected == true"
    store_as: capa
    code: |
      let banner = if type_of(pop3.banner) == "string" { pop3.banner } else { "" };
      let reply = if pop3.responses.len() > 0 { pop3.responses[0] } else { "" };
      let ok = ereg("^\\+OK", banner, false)
        && ereg("^\\+OK", reply, false)
        && egrep("^USER\\s*$", reply, true) != "";
      #{
        pop3: ok,
        capa: reply,
        cleartext: ok && egrep("^STLS\\s*$", reply, true) == ""
      }

  - id: check-stls-absent
    action: match
    source: capa.cleartext
    pattern: "^true$"
    condition: "capa.pop3 == true"
    on_match:
      finding:
        title: "POP3 cleartext authentication allowed"
        description: "The POP3 CAPA list does not advertise STLS; plaintext USER/PASS is accepted without TLS."
        remediation: "Advertise and require STLS before accepting USER/PASS, or disable plaintext POP3 on port 110."
        confidence_delta: 0.35
        qod: 70
        evidence: "CAPA reply (no STLS): {{capa.capa}}"

SMB signing not required

Severitymedium
Categoryhardening — Hardening
Servicessmb, microsoft-ds
Detectiontcp_dialogue, script, match · highest QoD 75
Feedtests/vulnerabilities/general/smb-signing-not-required.yaml

The server negotiated SMB2/SMB3 without SMB2_NEGOTIATE_SIGNING_REQUIRED in its SecurityMode, so clients may run unsigned sessions. An attacker able to intercept or relay traffic (NTLM relay to SMB) can tamper with or hijack them.

How noctis detects it

  1. TCP dialogue: one binary protocol frame
  2. Parses / computes the next value with a Rhai script
  3. Checks neg.signing_required for ^false$ → finding QoD 75: SMB signing not required

References:

Feed source — tests/vulnerabilities/general/smb-signing-not-required.yaml
# Flag an SMB2/3 server that does not require message signing.
#
# Unsigned SMB lets an attacker in the path tamper with or relay the session
# (NTLM relay to SMB, e.g. ntlmrelayx) — the classic hardening finding on
# member servers and workstations. Detection is a single SMB2 NEGOTIATE sent as
# a binary tcp_dialogue frame; the reply is parsed in a `script` step, so the
# protocol bytes live here in the feed, not in the engine.
#
# Request (162 bytes): NBSS header [00 + 3-byte BE length 0x9e]
#   + SMB2 header (64 B, ProtocolId fe534d42, Command 0 = NEGOTIATE)
#   + NEGOTIATE (StructureSize 36, DialectCount 5, SecurityMode 0x01 signing
#     enabled, ClientGuid "noctis-smb-probe", NegotiateContextOffset 0x70,
#     NegotiateContextCount 1)
#   + dialects 0x0202 0x0210 0x0300 0x0302 0x0311 (little-endian) + 2 B pad
#   + SMB2_PREAUTH_INTEGRITY_CAPABILITIES context (SHA-512, 32-byte salt) —
#     required for a real server to accept the 3.1.1 dialect.
#
# Reply offsets (byte → hex offset = byte × 2):
#   4   ProtocolId   fe534d42          hex  8..15
#   12  Status       u32le, 0 = OK     hex 24..31
#   16  Command      u16le, 0          hex 32..35
#   20  Flags        u32le, bit 0x01 SERVER_TO_REDIR   hex 40..47
#   68  StructureSize u16le, 65 (NEGOTIATE response)   hex 136..139
#   70  SecurityMode u16le             hex 140..143  (0x01 enabled, 0x02 REQUIRED)
#   72  DialectRevision u16le          hex 144..147
uid: 57f3bc70-28a2-4d5b-a684-7a74a4a087bf
name: "SMB signing not required"
description: |
  The server negotiated SMB2/SMB3 without SMB2_NEGOTIATE_SIGNING_REQUIRED in
  its SecurityMode, so clients may run unsigned sessions. An attacker able to
  intercept or relay traffic (NTLM relay to SMB) can tamper with or hijack them.
cves: []
category: hardening
severity: medium
confidence_base: 0.40
tags: [smb, smb2, smb3, signing, ntlm-relay, misconfig, hardening]
services: [smb, microsoft-ds]
author: noctis
version: "1.0.0"
references:
  - "https://learn.microsoft.com/openspecs/windows_protocols/ms-smb2/63abf97c-0d09-47e2-88d6-6bfa552949a5"
  - "https://learn.microsoft.com/troubleshoot/windows-server/networking/overview-server-message-block-signing"

steps:
  - id: smb2-negotiate
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    send_hex: "0000009efe534d424000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400050001000000000000006e6f637469732d736d622d70726f6265700000000100000002021002000302031103000001002600000000000100200001006e6f637469732d707265617574682d696e746567726974792d73616c742d3332"
    store_as: smb

  # Parse the NEGOTIATE response. Returns a map stored as `neg`:
  #   smb2             bool  — a successful SMB2 NEGOTIATE response came back
  #   dialect          str   — negotiated dialect, e.g. "3.1.1"
  #   dialect_hex      str   — DialectRevision as 4 hex digits, e.g. "0311"
  #   security_mode    int   — raw SecurityMode
  #   signing_required bool  — SecurityMode & 0x02
  #   legacy_only      bool  — best dialect is SMB 2.0.2 / 2.1 (no SMB3 at all)
  - id: parse-negotiate
    action: script
    condition: "smb.connected == true"
    store_as: neg
    code: |
      let hex = if type_of(smb.response_hex) == "string" { tolower(smb.response_hex) } else { "" };
      let mode = u16le(substr(hex, 140, 143));
      let rev = u16le(substr(hex, 144, 147));
      let name = if rev == 0x0202 { "2.0.2" }
        else if rev == 0x0210 { "2.1" }
        else if rev == 0x0300 { "3.0" }
        else if rev == 0x0302 { "3.0.2" }
        else if rev == 0x0311 { "3.1.1" }
        else { "unknown" };
      // A real NEGOTIATE *response*, not an echo of our request (which also has
      // the SMB2 signature, status 0 and command 0): SERVER_TO_REDIR flag set,
      // response StructureSize 65, and a dialect we actually offered.
      let ok = strlen(hex) >= 148
        && substr(hex, 8, 15) == "fe534d42"
        && u32le(substr(hex, 24, 31)) == 0
        && u16le(substr(hex, 32, 35)) == 0
        && (u32le(substr(hex, 40, 47)) & 1) == 1
        && u16le(substr(hex, 136, 139)) == 65
        && name != "unknown";
      #{
        smb2: ok,
        dialect: name,
        dialect_hex: p16be(rev),
        security_mode: mode,
        signing_required: (mode & 2) == 2,
        legacy_only: ok && (rev == 0x0202 || rev == 0x0210)
      }

  - id: check-signing
    action: match
    source: neg.signing_required
    pattern: "^false$"
    condition: "neg.smb2 == true"
    on_match:
      finding:
        title: "SMB signing not required"
        description: "The SMB2/3 NEGOTIATE response does not set SMB2_NEGOTIATE_SIGNING_REQUIRED, so unsigned sessions are accepted and NTLM relay / tampering is possible."
        remediation: "Require SMB signing on the server (GPO 'Microsoft network server: Digitally sign communications (always)' = Enabled, or Samba 'server signing = mandatory'), and disable SMB 2.0.2/2.1-only stacks in favour of SMB 3.x."
        confidence_delta: 0.50
        qod: 75
        evidence: "SMB2 NEGOTIATE: dialect {{neg.dialect}} (0x{{neg.dialect_hex}}), SecurityMode {{neg.security_mode}} (signing not required), legacy-only dialect: {{neg.legacy_only}}"

SNMP default community string

Severitymedium
Categoryexposure — Exposure
Servicessnmp
Detectionsnmp_get, match · highest QoD 75
Feedtests/vulnerabilities/general/snmp-default-community.yaml

The SNMP agent answers a GET with a default community string (public or private), exposing device/system information to unauthenticated clients.

How noctis detects it

  1. SNMP v2c GET trying several community strings
  2. Checks snmp.community for ^(public|private)$ → finding QoD 75: SNMP default community string accepted

References:

Feed source — tests/vulnerabilities/general/snmp-default-community.yaml
# Detect SNMP agents reachable with a default community string (public/private).
#
# GET sysDescr.0 trying the default communities. Any response means a default
# community is accepted, exposing system info without authentication.
uid: b22f27e9-a943-45d8-95b1-7b8be0f0258c
name: "SNMP default community string"
description: |
  The SNMP agent answers a GET with a default community string (public or
  private), exposing device/system information to unauthenticated clients.
cves: []
category: exposure
severity: medium
confidence_base: 0.50
tags: [snmp, default-credentials, exposure, misconfig]
services: [snmp]
author: noctis
version: "1.0.0"
references:
  - "https://cwe.mitre.org/data/definitions/1392.html"

steps:
  - id: snmp-get
    action: snmp_get
    port: "{{port}}"
    communities: ["public", "private"]
    oids: ["1.3.6.1.2.1.1.1.0"]
    timeout_secs: 5
    store_as: snmp

  - id: check-default-community
    action: match
    source: snmp.community
    pattern: "^(public|private)$"
    condition: "snmp.responded == true"
    on_match:
      finding:
        title: "SNMP default community string accepted"
        description: "The SNMP agent responded to a GET using a default community string."
        remediation: "Change the community string to a non-default value or disable SNMP v1/v2c."
        confidence_delta: 0.35
        qod: 75
        evidence: "community={{snmp.community}} sysDescr={{snmp.varbinds}}"

SSH password authentication enabled

Severitymedium
Categoryhardening — Hardening
Servicesssh
Detectionssh_check, match
Feedtests/vulnerabilities/general/ssh-weak-auth.yaml

SSH server allows password-based authentication, increasing brute-force risk

How noctis detects it

  1. SSH banner and authentication-method probe
  2. Checks ssh.auth_methods for password → finding: SSH password authentication enabled
  3. Checks ssh.auth_methods for keyboard-interactive → finding: SSH keyboard-interactive authentication enabled
Feed source — tests/vulnerabilities/general/ssh-weak-auth.yaml
# Detect SSH servers that advertise password authentication.
uid: b06ad8cb-e183-4a8b-96b5-ae03c613a0db
name: "SSH password authentication enabled"
description: "SSH server allows password-based authentication, increasing brute-force risk"
category: hardening
severity: medium
confidence_base: 0.85
tags: [ssh, auth, hardening]
services: [ssh]
author: florian
version: "1.0.0"

steps:
  - id: ssh-inspect
    action: ssh_check
    port: "{{port}}"
    timeout_secs: 10
    store_as: ssh

  - id: check-password-auth
    action: match
    source: ssh.auth_methods
    pattern: "password"
    case_insensitive: true
    on_match:
      finding:
        title: "SSH password authentication enabled"
        description: "Server advertises 'password' as an accepted auth method."
        remediation: "Set 'PasswordAuthentication no' in sshd_config and restart SSH."
        confidence_delta: 0.10
        evidence: "Auth methods: {{ssh.auth_methods}}"

  - id: check-keyboard-interactive
    action: match
    source: ssh.auth_methods
    pattern: "keyboard-interactive"
    case_insensitive: true
    on_match:
      finding:
        title: "SSH keyboard-interactive authentication enabled"
        description: "May allow password login via PAM."
        remediation: "Set 'KbdInteractiveAuthentication no' in sshd_config."
        confidence_delta: -0.10
        severity: low

Telnet service exposed (cleartext)

Severitymedium
Categoryhardening — Hardening
Servicestelnet
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/telnet-exposed.yaml

A Telnet service is reachable on the target. Telnet transmits credentials and all session data in cleartext and should be replaced by SSH.

How noctis detects it

  1. TCP dialogue
  2. Checks telnet.transcript for (?i)login:|username:|password: → finding QoD 70: Telnet service exposed (cleartext)

References:

Feed source — tests/vulnerabilities/general/telnet-exposed.yaml
# Flag a reachable Telnet service.
#
# Telnet carries credentials and session data in cleartext. A live server
# greets a new connection with IAC option negotiation (0xFF ...) followed by a
# login prompt. We read that banner and match the printable "login:" prompt —
# the IAC bytes themselves are not valid UTF-8, so the prompt is the reliable
# signal. A port with no Telnet service sends no such greeting.
uid: 2d9f6c41-8a73-4e52-b1c6-0f3a7d84e915
name: "Telnet service exposed (cleartext)"
description: |
  A Telnet service is reachable on the target. Telnet transmits credentials and
  all session data in cleartext and should be replaced by SSH.
cves: []
category: hardening
severity: medium
confidence_base: 0.40
tags: [telnet, cleartext, exposure, misconfig]
services: [telnet]
author: noctis
version: "1.0.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc854"

steps:
  - id: telnet-banner
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    timeout_secs: 10
    store_as: telnet

  - id: check-login-prompt
    action: match
    source: telnet.transcript
    # Telnet servers present a login prompt after IAC negotiation. A bare port
    # with no telnet service produces an empty transcript and never matches.
    pattern: "(?i)login:|username:|password:"
    condition: "telnet.connected == true"
    on_match:
      finding:
        title: "Telnet service exposed (cleartext)"
        description: "The service presented a Telnet login prompt, confirming a cleartext administrative interface."
        remediation: "Disable Telnet and use SSH instead; firewall port 23 if the service is required internally."
        confidence_delta: 0.35
        qod: 70
        evidence: "Telnet banner: {{telnet.transcript}}"

ZooKeeper 4-letter-word admin commands exposed

Severitymedium
Categoryexposure — Exposure
Serviceszookeeper
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/zookeeper-4lw-exposed.yaml

The ZooKeeper server answered the unauthenticated `envi` 4lw command, leaking server environment details (version, hostname, filesystem paths).

How noctis detects it

  1. TCP dialogue: envi
  2. Checks zk.transcript for zookeeper.version → finding QoD 70: ZooKeeper 4-letter-word admin commands exposed

References:

Feed source — tests/vulnerabilities/general/zookeeper-4lw-exposed.yaml
# Flag a ZooKeeper node that answers unauthenticated 4-letter-word (4lw) admin
# commands. `envi` dumps the server environment (version, hostname, paths) to
# any client when the 4lw whitelist is open — information disclosure. A locked
# down node (restricted 4lw.commands.whitelist) refuses the command.
uid: 7c3a9e15-4d62-4b08-9a71-2e6f5c08d4a7
name: "ZooKeeper 4-letter-word admin commands exposed"
description: |
  The ZooKeeper server answered the unauthenticated `envi` 4lw command, leaking
  server environment details (version, hostname, filesystem paths).
cves: []
category: exposure
severity: medium
confidence_base: 0.45
tags: [zookeeper, 4lw, exposure, info-disclosure, misconfig]
services: [zookeeper]
author: noctis
version: "1.0.0"
references:
  - "https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#The+Four+Letter+Words"
steps:
  - id: zk-envi
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    line_ending: ""
    timeout_secs: 10
    commands:
      - "envi"
    store_as: zk
  - id: check-envi
    action: match
    source: zk.transcript
    pattern: "zookeeper.version"
    condition: "zk.connected == true"
    on_match:
      finding:
        title: "ZooKeeper 4-letter-word admin commands exposed"
        description: "The `envi` 4lw command returned the server environment without authentication."
        remediation: "Restrict 4lw.commands.whitelist to the minimum (e.g. srvr), enable auth/ACLs, and firewall port 2181."
        confidence_delta: 0.30
        qod: 70
        evidence: "envi output: {{zk.transcript}}"

rsync daemon allows anonymous module listing

Severitymedium
Categoryexposure — Exposure
Servicesrsync
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/rsync-anonymous-list.yaml

The rsync daemon enumerated its modules to an unauthenticated client, exposing share names and comments (and typically anonymously-accessible data).

How noctis detects it

  1. TCP dialogue: @RSYNCD: 31.0,
  2. Checks rsync.transcript for @RSYNCD: EXIT → finding QoD 70: rsync daemon allows anonymous module listing

References:

Feed source — tests/vulnerabilities/general/rsync-anonymous-list.yaml
# Flag an rsync daemon that allows anonymous module listing.
#
# The rsync daemon greets with "@RSYNCD: <ver>". After the client echoes a
# version and sends an empty line, a permissive daemon enumerates its modules
# and ends with "@RSYNCD: EXIT". A locked-down daemon returns "@ERROR: ..." or
# requires authentication. Anonymous module listing leaks share names/comments
# and usually means the modules themselves are reachable without auth.
uid: 5b9d3e71-2a86-4c04-9f1e-7d08c25a6b39
name: "rsync daemon allows anonymous module listing"
description: |
  The rsync daemon enumerated its modules to an unauthenticated client,
  exposing share names and comments (and typically anonymously-accessible data).
cves: []
category: exposure
severity: medium
confidence_base: 0.45
tags: [rsync, anonymous, exposure, misconfig]
services: [rsync]
author: noctis
version: "1.0.0"
references:
  - "https://download.samba.org/pub/rsync/rsyncd.conf.5"

steps:
  - id: rsync-list
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: true
    line_ending: "\n"
    # The daemon answers the version line with nothing until the module request
    # (the empty line) arrives, and each read waits up to timeout_secs for a first
    # byte: keep it short so the module request is not held back for long.
    timeout_secs: 2
    commands:
      - "@RSYNCD: 31.0"
      - ""
    store_as: rsync

  - id: check-listing
    action: match
    source: rsync.transcript
    # A completed module-list dialogue ends with "@RSYNCD: EXIT"; a daemon that
    # refuses anonymous listing returns "@ERROR: ..." instead.
    pattern: "@RSYNCD: EXIT"
    condition: "rsync.connected == true"
    on_match:
      finding:
        title: "rsync daemon allows anonymous module listing"
        description: "The rsync daemon completed an anonymous module-list request, exposing its module names/comments."
        remediation: "Require authentication (auth users / secrets file), set 'list = false', restrict 'hosts allow', and firewall port 873."
        confidence_delta: 0.30
        qod: 70
        evidence: "rsync module listing: {{rsync.transcript}}"

finger service exposes user information

Severitylow
Categoryexposure — Exposure
Servicesfinger
Detectiontcp_dialogue, match · highest QoD 70
Feedtests/vulnerabilities/general/finger-exposed.yaml

The finger service returned local account details (logins, home directories) to an unauthenticated client — useful reconnaissance for an attacker.

How noctis detects it

  1. TCP dialogue:
  2. Checks finger.transcript for (?i)Directory:|Login:|Last login → finding QoD 70: finger service exposes user information

References:

Feed source — tests/vulnerabilities/general/finger-exposed.yaml
# Flag a finger service (79) that discloses local user information to anyone.
# The finger daemon is a classic information-disclosure exposure: it reveals
# usernames, home directories, shells and login times with no authentication.
uid: 9d4b7e28-5c31-4a06-b2f9-6e1c8a37d540
name: "finger service exposes user information"
description: |
  The finger service returned local account details (logins, home directories)
  to an unauthenticated client — useful reconnaissance for an attacker.
cves: []
category: exposure
severity: low
confidence_base: 0.45
tags: [finger, info-disclosure, exposure, legacy, misconfig]
services: [finger]
author: noctis
version: "1.0.0"
references:
  - "https://www.rfc-editor.org/rfc/rfc1288"
steps:
  - id: finger-query
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    line_ending: "\r\n"
    timeout_secs: 10
    commands:
      - ""
    store_as: finger
  - id: check-userinfo
    action: match
    source: finger.transcript
    pattern: "(?i)Directory:|Login:|Last login"
    condition: "finger.connected == true"
    on_match:
      finding:
        title: "finger service exposes user information"
        description: "The finger service returned local user details without authentication."
        remediation: "Disable the finger daemon (it is obsolete); firewall port 79."
        confidence_delta: 0.25
        qod: 70
        evidence: "finger output: {{finger.transcript}}"

View these feeds on GitHub