Site2Nite Boat Classifieds — 1 vulnerability check

noctis ships 1 vulnerability check for Site2Nite Boat Classifieds, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Site2Nite Boat Classifieds detail.asp / printdetail.asp ID SQL Injection

CVECVE-2010-2687, CVE-2010-2688
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/site2nite-boat-classifieds/site2nite-boat-classifieds-id-sqli.yaml

Site2Nite Boat Classifieds, a classic ASP boat listing site backed by a Microsoft Access database, inserts the ID parameter of detail.asp (CVE-2010-2688) and the Id parameter of printdetail.asp (CVE-2010-2687) unquoted and unchecked into SQL queries, so an unauthenticated attacker can read or change the site database, including the administrator logins.

For the default install directories and the web root, this check requests each page twice: once with an id of 0 followed by an always-true condition built from random numbers, and once with the same id followed by an always-false condition. No listing has id 0, so a page is reported as injectable when the true request shows a boat listing ("BOAT DETAILS" or "Seller Information") and the false request does not. A page that shows a listing whatever the id, or a control request that is blocked, is not counted. Only read queries are sent and nothing is written.

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. HTTP(S) request GET {{dir}}/detail.asp?ID=0%20or%20{{num.a}}={{num.a}}
  4. HTTP(S) request GET {{dir}}/detail.asp?ID=0%20or%20{{num.a}}={{num.b}}
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request GET {{dir}}/printdetail.asp?Id=0%20or%20{{num.a}}={{num.a}}
  7. HTTP(S) request GET {{dir}}/printdetail.asp?Id=0%20or%20{{num.a}}={{num.b}}
  8. Parses / computes the next value with a Rhai script
  9. Checks hit_detail for ^/ → finding QoD 75: Site2Nite Boat Classifieds detail.asp ID SQL Injection (CVE-2010-2688)
  10. Checks hit_print for ^/ → finding QoD 75: Site2Nite Boat Classifieds printdetail.asp Id SQL Injection (CVE-2010-2687)

References:

Feed source — tests/vulnerabilities/site2nite-boat-classifieds/site2nite-boat-classifieds-id-sqli.yaml
# Site2Nite Boat Classifieds — detail.asp / printdetail.asp id SQL injection
# — CVE-2010-2688 (detail.asp?ID) / CVE-2010-2687 (printdetail.asp?Id)
#
# Boat Classifieds is a commercial classic ASP + Microsoft Access listing site.
# Its boat pages splice the numeric id parameter unquoted into a JET query
# (EDB-13990 detail.asp?ID UNION, EDB-13995 printdetail.asp?Id boolean). The
# vendor site is gone and no source archive could be found, so the page layout
# comes from the advisories: a matching row renders "BOAT DETAILS - Site Id N"
# and a "Seller Information:" block.
#
# Detection, per candidate install directory and per page (QoD 75):
#   request the page with id=0 OR a=a (always-true, random a) and with
#   id=0 OR a=b (always-false). id 0 never exists, so a boat page on the true
#   request and none on the false request proves the id reaches the SQL text
#   as code. A page that renders a boat whatever the id, or a WAF block on the
#   control, is not reported. Read-only, independent of the listings present.
#
# Better than the source NASL: the NASL gates both branches on details.asp /
# printdetails.asp (an "s" too many — the product's pages are detail.asp and
# printdetail.asp per both advisories), so it does not fire on a real install;
# its detail.asp branch looks for SQL keywords plus the demo site path, and its
# printdetail.asp branch needs boat id 661 (a demo database row) and has no
# false control. This feed uses a true/false pair independent of existing rows,
# probes the web root too and names the CVE of the page that answered.
#
# Source: OpenVAS/Greenbone NVT 2010/gb_site2nite_boat_classifieds_sql_injection_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.801378, GPL-2.0-only).
uid: 13eb516e-4dfe-4f0e-a236-bdf6a07c40bb
name: "Site2Nite Boat Classifieds detail.asp / printdetail.asp ID SQL Injection"
description: |
  Site2Nite Boat Classifieds, a classic ASP boat listing site backed by a
  Microsoft Access database, inserts the ID parameter of detail.asp
  (CVE-2010-2688) and the Id parameter of printdetail.asp (CVE-2010-2687)
  unquoted and unchecked into SQL queries, so an unauthenticated attacker can
  read or change the site database, including the administrator logins.

  For the default install directories and the web root, this check requests
  each page twice: once with an id of 0 followed by an always-true condition
  built from random numbers, and once with the same id followed by an
  always-false condition. No listing has id 0, so a page is reported as
  injectable when the true request shows a boat listing ("BOAT DETAILS" or
  "Seller Information") and the false request does not. A page that shows a
  listing whatever the id, or a control request that is blocked, is not
  counted. Only read queries are sent and nothing is written.
cves: [CVE-2010-2687, CVE-2010-2688]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [site2nite, boat-classifieds, sqli, boolean-based, asp, access]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-2687"
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-2688"
  - "https://www.exploit-db.com/exploits/13990"
  - "https://www.exploit-db.com/exploits/13995"

steps:
  # ── Random true / false conditions and the per-CVE result slots ───────────
  - id: gen-nums
    action: script
    code: |
      let a = rand_int(1000, 8999);
      #{ a: a, b: a + rand_int(1, 999) }
    store_as: num

  - id: init-hit-detail
    action: set_var
    var_name: hit_detail
    var_value: ""

  - id: init-hit-print
    action: set_var
    var_name: hit_print
    var_value: ""

  # ── Per candidate install directory (loop group) ──────────────────────────
  - id: init-dt
    action: set_var
    var_name: dt
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["/boat-webdesign", "/products/boat-webdesign/www", ""]

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

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

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

  - id: dir-label
    action: script
    code: 'dir + "/"'
    store_as: dlabel

  # detail.asp?ID — CVE-2010-2688
  - id: detail-true
    action: http_request
    method: GET
    path: "{{dir}}/detail.asp?ID=0%20or%20{{num.a}}={{num.a}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_detail == ""'
    store_as: dt

  - id: detail-false
    action: http_request
    method: GET
    path: "{{dir}}/detail.asp?ID=0%20or%20{{num.a}}={{num.b}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_detail == "" && dt.status == 200'
    store_as: df

  - id: detail-check
    action: script
    condition: 'hit_detail == ""'
    code: |
      let bt = if type_of(dt.body) == "string" { dt.body } else { "" };
      let bf = if type_of(df.body) == "string" { df.body } else { "" };
      let boat = "(?i)(>\\s*Seller\\s+Information:\\s*<|BOAT\\s+DETAILS\\s*-\\s*Site\\s+Id)";
      let blocked = [0, 401, 403, 405, 406, 429];
      if dt.status == 200 && ereg(boat, bt) && !blocked.contains(df.status) && !ereg(boat, bf) { dlabel } else { "" }
    store_as: hit_detail

  # printdetail.asp?Id — CVE-2010-2687
  - id: print-true
    action: http_request
    method: GET
    path: "{{dir}}/printdetail.asp?Id=0%20or%20{{num.a}}={{num.a}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_print == ""'
    store_as: pt

  - id: print-false
    action: http_request
    method: GET
    path: "{{dir}}/printdetail.asp?Id=0%20or%20{{num.a}}={{num.b}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: 'hit_print == "" && pt.status == 200'
    store_as: pf

  - id: print-check
    action: script
    condition: 'hit_print == ""'
    code: |
      let bt = if type_of(pt.body) == "string" { pt.body } else { "" };
      let bf = if type_of(pf.body) == "string" { pf.body } else { "" };
      let boat = "(?i)(>\\s*Seller\\s+Information:\\s*<|BOAT\\s+DETAILS\\s*-\\s*Site\\s+Id)";
      let blocked = [0, 401, 403, 405, 406, 429];
      if pt.status == 200 && ereg(boat, bt) && !blocked.contains(pf.status) && !ereg(boat, bf) { dlabel } else { "" }
    store_as: hit_print

  # ── Findings (second loop group: runs once, after the directory loop) ────
  - id: after-loop
    action: set_var
    var_name: loop_done
    var_value: true
    loop:
      var: pass
      over: ["once"]

  - id: report-detail
    action: match
    source: hit_detail
    pattern: "^/"
    on_match:
      finding:
        cves: [CVE-2010-2688]
        cvss: 7.5
        severity: high
        title: "Site2Nite Boat Classifieds detail.asp ID SQL Injection (CVE-2010-2688)"
        description: "detail.asp ran the ID parameter as SQL: an always-true condition appended to a non-existent id returned a boat listing, while the same id with an always-false condition did not. An unauthenticated attacker can read or modify the site database, including the administrator logins."
        remediation: "No fixed release of Site2Nite Boat Classifieds is known. Remove the application or restrict access to it; if it must stay, convert ID to a number (CLng) before use or use parameterised queries in detail.asp."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{hit_detail}}detail.asp?ID=0 or {{num.a}}={{num.a}} returned a boat listing, ID=0 or {{num.a}}={{num.b}} did not"

  - id: report-print
    action: match
    source: hit_print
    pattern: "^/"
    on_match:
      finding:
        cves: [CVE-2010-2687]
        cvss: 7.5
        severity: high
        title: "Site2Nite Boat Classifieds printdetail.asp Id SQL Injection (CVE-2010-2687)"
        description: "printdetail.asp ran the Id parameter as SQL: an always-true condition appended to a non-existent id returned a boat listing, while the same id with an always-false condition did not. An unauthenticated attacker can read or modify the site database, including the administrator logins."
        remediation: "No fixed release of Site2Nite Boat Classifieds is known. Remove the application or restrict access to it; if it must stay, convert Id to a number (CLng) before use or use parameterised queries in printdetail.asp."
        confidence_delta: 0.50
        qod: 75
        evidence: "GET {{hit_print}}printdetail.asp?Id=0 or {{num.a}}={{num.a}} returned a boat listing, Id=0 or {{num.a}}={{num.b}} did not"

View these feeds on GitHub