At the end of March, Cisco published a stack-based buffer overflow vulnerability in Smart Install Client code. This vulnerability enables an attacker to remotely execute arbitrary code without authentication. So it allows getting full control over a vulnerable network equipment.
Cisco Smart Install is a “plug-and-play” configuration and image-management feature that provides zero-touch deployment for new (typically access layer) switches. The feature allows a customer to ship a Cisco switch to any location, install it in the network, and power it on without additional configuration requirements. The Smart Install feature incorporates no authentication by design.
A Smart Install network consists of exactly one Smart Install director switch or router, also known as an integrated branch director (IBD), and one or more Smart Install client switches, also known as integrated branch clients (IBCs). A client switch does not need to be directly connected to the director; the client switch can be up to seven hops away.
The director provides a single management point for images and configuration of client switches. When a client switch is first installed in the network, the director automatically detects the new switch and identifies the correct Cisco IOS Software image and the configuration file for downloading. The director can also allocate an IP address and hostname to a client.
Only Smart Install client switches are affected by the vulnerability that is described in this advisory. Cisco devices that are configured as a Smart Install director are not affected by this vulnerability.
To determine whether a device is configured with the Smart Install client feature enabled, use the show vstack config privileged EXEC command on the Smart Install client.
The following examples show the output of the show vstack config command on Cisco Catalyst Switches that are configured as Smart Install clients:
Ciscozine-test-1# show vstack config Role: Client (SmartInstall enabled)
Ciscozine-test-2# show vstack config Capability: Client Oper Mode: Enabled Role: Client
The vulnerability was presented at the GeekPWN 2017 Hong-Kong by George Nosenko 1 year ago and Cisco was informed about it at the end of September 2017. During a short scan of the Internet, Nosenko detected 250,000 vulnerable devices and 8,5 million devices that have a vulnerable port open.
Below how the exploit works:
The Smart Install Client starts a server on the TCP(4786) port (opened by default) to interact with the Smart Install Director. When this server is processing a specially crafted malicious message ibd_init_discovery_msg a stack-based buffer overflow occurs. To be more precise, the buffer overflow takes place in the function smi_ibc_handle_ibd_init_discovery_msg because the size of the data copied to a fixed-size buffer is not checked. The size and data are taken directly from the network packet and are controlled by an attacker.
Note: Cisco has released software updates that address this vulnerability.