Phptroubleticket — 1 vulnerability check
noctis ships 1 vulnerability check for Phptroubleticket, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Phptroubleticket vedi_faq.php id SQL Injection
| CVE | CVE-2010-1089 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/phptroubleticket/CVE-2010-1089.yaml |
Phptroubleticket (PHP Trouble Ticket, a PHP/MySQL help desk, 2.x and earlier) pastes the id parameter of vedi_faq.php, unquoted and unchecked, into the SQL query that loads an FAQ entry, without authentication, and prints the returned row, allowing SQL injection (an attacker can read the whole database, including the user accounts and their passwords).
This check requests vedi_faq.php under the web root and the usual install paths with an id value that appends a UNION SELECT of an expression multiplying two random numbers. The vulnerability is confirmed when the page shows the product computed by the database, which never appears in the request. No stored data is read and nothing is written.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/vedi_faq.php?id={{sc.q_union}} - Parses / computes the next value with a Rhai script
- Checks
hit_dirfor^/→ finding QoD 97: Phptroubleticket vedi_faq.php id SQL Injection (CVE-2010-1089)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-1089
- https://www.exploit-db.com/exploits/11609
- https://www.securityfocus.com/bid/38486
Feed source — tests/vulnerabilities/phptroubleticket/CVE-2010-1089.yaml
# Phptroubleticket — vedi_faq.php id SQL injection — CVE-2010-1089
#
# Phptroubleticket (PHP Trouble Ticket, phptroubleticket.org, Italian PHP/MySQL help desk,
# 2.x and earlier; the site and its downloads are gone, no copy of the source is
# reachable) shows one FAQ entry in vedi_faq.php ("view FAQ") from the id parameter,
# pasted unquoted into a 4-column SELECT, without authentication. The public advisory
# (EDB-11609, kaMtiEz, March 2010) dumps the accounts with
# vedi_faq.php?id=666/**/union/**/all/**/select/**/1,concat_ws(0x3a,email,password),3,4/**/from/**/utenti--
# (column 2 is printed). No fixed release was ever published.
#
# Detection, per candidate install dir (web root and the usual install paths):
# (QoD 97) vedi_faq.php?id=-1 UNION ALL SELECT C,C,C,C-- -
# with C = CONCAT(0x4e4f43544953,a*b,0x454e44) and random six-digit a, b. The vulnerable
# page prints NOCTIS<a*b>END, a value computed by the database that never appears in the
# request. The marker goes in every column, so whichever column the page prints shows it.
# Read-only: no table is selected from, nothing is written.
#
# Better than the source NASLs:
# - the reference checks select from the utenti table and match either "1:admin:" (user 1
# must be called "admin": a renamed admin or a deleted first account is a false
# negative) or a hex string the request itself carries (a page that only reflects the
# id parameter, e.g. in an error message, is a false positive). The database-computed
# marker needs no table and cannot be reflected;
# - no "Powered by phptroubleticket" footer gate on index.php (a removed footer or a
# customised home page hid every install); the union of both reference checks'
# install dirs is probed.
#
# Sources: OpenVAS/Greenbone NVTs 2010/gb_phptroubleticket_sql_injection.nasl
# (OID 1.3.6.1.4.1.25623.1.0.901101) and 2010/gb_phptroubleticket_38486.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100515), GPL-2.0-only; advisory EDB-11609, BID 38486.
uid: a4726320-bc34-4788-a877-c7d676e9de25
name: "Phptroubleticket vedi_faq.php id SQL Injection (CVE-2010-1089)"
description: |
Phptroubleticket (PHP Trouble Ticket, a PHP/MySQL help desk, 2.x and earlier) pastes
the id parameter of vedi_faq.php, unquoted and unchecked, into the SQL query that loads
an FAQ entry, without authentication, and prints the returned row, allowing SQL
injection (an attacker can read the whole database, including the user accounts and
their passwords).
This check requests vedi_faq.php under the web root and the usual install paths with an
id value that appends a UNION SELECT of an expression multiplying two random numbers.
The vulnerability is confirmed when the page shows the product computed by the
database, which never appears in the request. No stored data is read and nothing is
written.
cves: [CVE-2010-1089]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [phptroubleticket, sqli, union-based, php]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-1089"
- "https://www.exploit-db.com/exploits/11609"
- "https://www.securityfocus.com/bid/38486"
steps:
# ── Random operands, expected value and the encoded id payload ────────────
- id: gen-proof
action: script
code: |
let a = rand_int(100000, 999999);
let b = rand_int(100000, 999999);
let c = "CONCAT(0x4e4f43544953," + a + "*" + b + ",0x454e44)";
#{ want: "NOCTIS" + (a * b) + "END",
expr: a + "*" + b,
q_union: "-1%20UNION%20ALL%20SELECT%20" + c + "," + c + "," + c + "," + c + "--%20-" }
store_as: sc
- id: init-hit
action: set_var
var_name: hit_dir
var_value: ""
# ── Per candidate install path (loop group) ───────────────────────────────
- id: init-union-resp
action: set_var
var_name: union_resp
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/phptroubleticket", "/phpticket", "/phpttcket", "/phptt", "/ticket", "/assistenza"]
- id: union-probe
action: http_request
method: GET
path: "{{dir}}/vedi_faq.php?id={{sc.q_union}}"
port: "{{port}}"
tls_insecure: true
timeout_secs: 15
condition: 'hit_dir == ""'
store_as: union_resp
- id: check-union
action: script
condition: 'hit_dir == ""'
code: |
let body = if type_of(union_resp.body) == "string" { union_resp.body } else { "" };
if body.contains(sc.want) { if dir == "" { "/" } else { dir } } else { "" }
store_as: hit_dir
# ── Finding (inside the loop group: stop ends the scan at the first hit) ──
- id: report
action: match
source: hit_dir
pattern: "^/"
on_match:
finding:
title: "Phptroubleticket vedi_faq.php id SQL Injection (CVE-2010-1089)"
description: "An unauthenticated vedi_faq.php request whose id value appends a UNION SELECT multiplying two random numbers returned the product computed by the database: an attacker can read the whole database, including the user accounts and their passwords."
remediation: "No fixed Phptroubleticket release exists: remove the application, or at least restrict access to it (for example with HTTP authentication on its directory)."
confidence_delta: 0.67
qod: 97
evidence: "install dir {{hit_dir}}: vedi_faq.php?id=-1 UNION ALL SELECT CONCAT(0x4e4f43544953,{{sc.expr}},0x454e44),… printed the database-computed value {{sc.want}}"
stop: true