Mac OS X — 1 vulnerability check

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

← All products · Feeds on GitHub

Mac OS X Find-By-Content .FBCIndex Index File Disclosure

CVECVE-2001-1446
Severityhigh · CVSS 7.5
Categoryexposure — Exposure
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/macos-x/CVE-2001-1446.yaml

Checks whether a web server exposes the Find-By-Content index file .FBCIndex that Mac OS X 10.0 through 10.0.4 creates in every directory viewed with the Finder. The file holds the words of the files in that directory, so anyone can read the content of web-accessible files (HTML tags, scripts, passwords, keywords) without requesting those files. The feed requests /.FBCIndex under the site root and a few common directories, and reports the host when the reply is a 200 holding the index file signature while a random dot-file of the same directory is not served. No index content is copied into the finding.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/.FBCIndex
  3. HTTP(S) request GET {{dir}}/{{ctl_name}}
  4. Parses / computes the next value with a Rhai script
  5. Checks seen for ^fbcindex-served$ → finding QoD 75: Mac OS X Find-By-Content index file .FBCIndex is web-readable

References:

Feed source — tests/vulnerabilities/macos-x/CVE-2001-1446.yaml
# Mac OS X 10.0 - 10.0.4 Find-By-Content index file disclosure (CVE-2001-1446).
#
# Ported from OpenVAS/Greenbone NVT `pre2008/osX_apache_finder_content.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.10773, GPL-2.0-only). The NASL requests
# <dir>/.FBCIndex for "/" and every CGI dir and reports a 200 reply holding "Bud2".
#
# Differences from the NASL (fewer false positives):
#   - a control request for a random dot-file of the same directory must NOT
#     answer 200 with the marker: a server that answers every path with the same
#     page (catch-all / soft 404) is not reported;
#   - the verdict runs on a fixed string, so no index content (the words of the
#     indexed pages) is copied into the finding.
uid: 3f6b0c1e-8a52-4d7b-9c1a-5e2d7f4a9b63
name: "Mac OS X Find-By-Content .FBCIndex Index File Disclosure"
description: |
  Checks whether a web server exposes the Find-By-Content index file .FBCIndex
  that Mac OS X 10.0 through 10.0.4 creates in every directory viewed with the
  Finder. The file holds the words of the files in that directory, so anyone can
  read the content of web-accessible files (HTML tags, scripts, passwords,
  keywords) without requesting those files. The feed requests /.FBCIndex under
  the site root and a few common directories, and reports the host when the
  reply is a 200 holding the index file signature while a random dot-file of
  the same directory is not served. No index content is copied into the finding.
category: exposure
cves: [CVE-2001-1446]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [macos, apache, finder, fbcindex, information-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2001-1446"
  # OpenVAS/Greenbone NASL pre2008/osX_apache_finder_content.nasl (GPL-2.0-only)

steps:
  - id: gen-marker
    action: script
    code: |
      "." + rand_hex(8)
    store_as: ctl_name

  # Loop group: the following steps run once per directory.
  - id: init-probe
    action: set_var
    var_name: probe
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["", "/cgi-bin", "/images", "/docs"]

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

  - id: fbcindex
    action: http_request
    method: GET
    path: "{{dir}}/.FBCIndex"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: probe

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

  - id: verdict
    action: script
    code: |
      let b = if type_of(probe.body) == "string" { probe.body } else { "" };
      let c = if type_of(ctl.body) == "string" { ctl.body } else { "" };
      if probe.status == 200 && b.contains("Bud2")
          && !(ctl.status == 200 && c.contains("Bud2")) {
        "fbcindex-served"
      } else {
        ""
      }
    store_as: seen

  - id: report
    action: match
    source: seen
    pattern: "^fbcindex-served$"
    on_match:
      finding:
        title: "Mac OS X Find-By-Content index file .FBCIndex is web-readable"
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{dir}}/.FBCIndex returned 200 with the Find-By-Content index signature, while a random dot-file of the same directory was not served"
        remediation: "Upgrade Mac OS X past 10.0.4 and delete the .FBCIndex files, or deny web access to dot-files (e.g. <Files .*> Deny from all)."
      stop: true

View these feeds on GitHub