Determine if a Cisco switch or router is vulnerable

To patch or not to patch, that is the question.... Well, it is when it come to switches and routers. 

With Cisco (and other vendors) devices it is not so simple. There are various configurations and various feature sets. For example You may be running version of IOS that has known security vulnerabilities but your device may be not vulnerable. 

For example if there is a vulnerability in http server but your device doesn't have it enabled (no ip http server) you are not vulnerable. Obviously an http server may be enabled and some point and this would render the device vulnerable. That's where configuration management and change control come in. 

Furthermore there are different feature sets of the same IOS version. You may be running "IP Base" set  which doesn't support MPLS but Nessus will show MPLS vulnerability.

So in order to determine if our device is vulnerable we need to look at both Cisco advisory and configuration file. Understanding various feature sets is also helpful, this link can help here:

First we need to find out what version of IOS we run. We can do it using CiscoWorks LMS RME reporting feature. Here we can create an CSV report listing our devices and IOS versions. 

Alternately we can  connect to the device and execute: "show version" command which will give us both feature set (i.e xxx-IPBASEK9) and IOS version (I.E. 12.2(50)SE).

We will also need the config file which again we can get from CiscoWorks or directly from the switch by executing "show running-config" or "show startup-config". They generally should be the same, as a best practice you can compare them using CiscoWorks or manually using CSDIF for example. This will ensure that potentially vulnerable configuration are not be enabled upon reload.

Once we have that we can go to "Cisco IOS Software Checker"

We paste in the version ID and hit submit:

Then we select "All previously published Cisco Security Advisories" and hit continue.

Once we are presented with the list of published vulns the fun begins. 

Knowing that are feature set is IPBASE we can straight away discard MPLS, IKE and Software Tunnels vulnerabilities as these are not support in this set. 

Now we need to analyse all remaining advisories.

Open relevant advisory and have a read. In most cases either "Vulnerable Product" or "Details" sections specify configurations that are.

In our example first advisory requires that http(s) server is enabled.  My sample switch is not vulnerable as my config file contains:

no ip http server
no ip https server

This should give you an idea of how it works.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.