ARSC — 1 vulnerability check

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

← All products · Feeds on GitHub

A Really Simple Chat (ARSC) 3.3-rc2 SQL injection

CVECVE-2011-2181
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 70
Feedtests/vulnerabilities/arsc/CVE-2011-2181.yaml

A Really Simple Chat (ARSC) 3.3-rc2 builds SQL queries in its administration scripts (base/admin/edit_user.php, edit_layout.php and edit_room.php) from the arsc_user, arsc_layout_id and arsc_room request parameters without sanitising them, so an attacker able to reach those pages can run arbitrary SQL against the chat database.

The administration pages need an administrator session, so this check does not send an injection: it requests the chat login page (base/index.php) under /arsc, /chat and the web root and reports the installation when the page carries the "Powered by ARSC" badge together with the "[v3.3-rc2]" version line of the affected release. Nothing is written to the target.

How noctis detects it

  1. HTTP(S) request GET {{adir}}/base/index.php
  2. Checks page.body for (?s)Powered by ARSC.*\[v3\.3-rc2\] → finding QoD 70: A Really Simple Chat 3.3-rc2 SQL injection (CVE-2011-2181)

References:

Feed source — tests/vulnerabilities/arsc/CVE-2011-2181.yaml
# A Really Simple Chat (ARSC) 3.3-rc2 — SQL injection in the admin pages (CVE-2011-2181)
#
# base/admin/edit_user.php (arsc_user), edit_layout.php (arsc_layout_id) and edit_room.php
# (arsc_room) put request values straight into SQL (the application emulates register_globals).
# All three scripts sit behind the admin login cookie check (cookie.inc.php), and that check
# escapes the cookie values, so there is no unauthenticated request that reaches the injectable
# queries: nothing better than an installed-version check exists for an anonymous scanner.
#
# Detection (QoD 70), per candidate dir (/arsc, /chat, web root):
#   base/index.php (login page) carries the "Powered by ARSC" badge AND the "[v3.3-rc2]" version
#   line. NVD lists 3.3-rc2 as the only affected release. Read-only: one GET per directory.
#
# Source: OpenVAS/Greenbone NVT 2011/gb_arsc_mult_sql_injection_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.902608, GPL-2.0-only), same check; the version line is matched as
# its own bracketed token, not as a loose "v3.3-rc2" substring. Source of the 3.3 login template
# (install.sql) read to confirm the "[v<version>]" and "Powered by ARSC" forms.
uid: 334da95d-24ff-4699-83c1-a5ca4f97130f
name: "A Really Simple Chat (ARSC) 3.3-rc2 SQL injection (CVE-2011-2181)"
description: |
  A Really Simple Chat (ARSC) 3.3-rc2 builds SQL queries in its administration scripts
  (base/admin/edit_user.php, edit_layout.php and edit_room.php) from the arsc_user,
  arsc_layout_id and arsc_room request parameters without sanitising them, so an attacker
  able to reach those pages can run arbitrary SQL against the chat database.

  The administration pages need an administrator session, so this check does not send an
  injection: it requests the chat login page (base/index.php) under /arsc, /chat and the web
  root and reports the installation when the page carries the "Powered by ARSC" badge together
  with the "[v3.3-rc2]" version line of the affected release. Nothing is written to the target.
cves: [CVE-2011-2181]
cvss: 7.5  # NVD publishes only a CVSS v2 base score (7.5) for this CVE
severity: high
category: sqli
confidence_base: 0.30
tags: [arsc, php, sqli, version]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-2181"

steps:
  # A loop: step runs together with every following non-loop step once per directory, so the
  # init step resets the stored result at the start of each iteration.
  - id: init
    action: set_var
    var_name: page
    var_value: {status: 0, body: null}
    loop:
      over: ["/arsc", "/chat", ""]
      var: adir

  - id: probe
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/base/index.php"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: page

  - id: report
    action: match
    source: page.body
    pattern: "(?s)Powered by ARSC.*\\[v3\\.3-rc2\\]"
    condition: 'page.status == 200 && type_of(page.body) == "string"'
    on_match:
      finding:
        title: "A Really Simple Chat 3.3-rc2 SQL injection (CVE-2011-2181)"
        description: "The ARSC login page reports version 3.3-rc2, the release whose admin scripts edit_user.php, edit_layout.php and edit_room.php inject the arsc_user, arsc_layout_id and arsc_room parameters into SQL queries, allowing arbitrary SQL commands."
        remediation: "Upgrade A Really Simple Chat to a release later than 3.3-rc2, and restrict access to the base/admin directory."
        confidence_delta: 0.35
        qod: 70
        evidence: "{{adir}}/base/index.php: 'Powered by ARSC' badge with version line [v3.3-rc2]"
      stop: true

View these feeds on GitHub