Skip to main content

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:


http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp


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" 


http://tools.cisco.com/security/center/selectIOSVersion.x


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.

Comments

Popular posts from this blog

x.509 Certificates - Critical vs non-critical extensions

Extensions are used to associate additional information with the user or the key.  Each certificate extension has three attributes - extnID, critical, extnValue extnID - Extension ID - an OID that specifies the format and definitions of the extension critical - Critical flag - Boolean value extnValue - Extension value  Criticality flag specifies whether the information in an extension is important. If an application doesn't recognize the extension marked as critical, the certificate cannot be accepted. If an extension is not marked as critical (critical value False) it can be ignored by an application. In Windows, critical extensions are marked with a yellow exclamation mark,  View certificate extensions using OpenSSL: # openssl x509 -inform pem -in cert.pem -text -noout (output abbreviated)         X509v3 extensions:             X509v3 Key Usage: critical          ...

DNS response and error types

In this post we explore common DNS response codes. We will cover the following responses: NOERROR SERVFAIL NXDOMAIN NODATA REFUSED Throughout article we’ll refer to the following RFCs: RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES RFC 2308 - Negative Caching of DNS Queries (DNS NCACHE) RFC 2136 - Dynamic Updates in the Domain Name System (DNS UPDATE) RFC 8914 - Extended DNS Errors Response Codes - RCODEs The DNS RCODES are best defined in RFC2316 .  They signify what type of response was sent by the server. “RCODE   Response code - this four bit field is undefined in requests and set in responses.”   The table below shows the summary of the currently defined RCODEs. Mnemonic Val Description NOERROR 0 No error condition. ...

DNS blocking in Indonesia

DNS based censorship and domain blocking in Indonesia is very inconsistent among ISPs. There’s a government mandated black list which the ISPs operating in the country should enforce. However, Indonesia lacks centralised internet infrastructure and has many separate ISPs. In addition, the Indonesian government granted ISPs the authority to block content at their own discretion. All of this leads to a very inconsistent DNS blocking in Indonesia. Official DNS domain blacklist in Indonesia The Government mandated DNS blacklist is published in a redacted form and can be downloaded here: https://trustpositif.kominfo.go.id/ . This is where the blocked domains get redirected to. We can search the database and check if a domain is blocked. In the screenshot below we can see that a popular cryptocurrency exchange is blocked (Ada) and that wikipedia.org is not (Tidak Ada) - thanks to Google Translate. Examples of blocked DNS queries dig binance.com @182.253.45.122 ;; global options: +cmd ;; Got ...