CVE-2017-6739 in cisco ios

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

A vulnerability in the SNMP implementation of could allow an authenticated, remote attacker to cause a reload of the affected system or to remotely execute code. An attacker could exploit this vulnerability by sending a crafted SNMP packet to the affected device.  The vulnerability is due to a buffer overflow in the affected code area. The vulnerability affects all versions of SNMP (versions 1, 2c, and 3). The attacker must know the SNMP read only community string (SNMP version 2c or earlier) or the user credentials (SNMPv3). An exploit could allow the attacker to execute arbitrary code and obtain full control of the system or to cause a reload of the affected system. Only traffic directed to the affected system can be used to exploit this vulnerability.

Affected software: cisco ios, cisco ios xe

Scores

What LogPulse has for it

How to mitigate it

Upgrade Cisco IOS / IOS XE for the 2017 SNMP RCE flaws (cisco-sa-20170629-snmp)

Patch or upgrade. Fixed IOS / IOS XE releases close the SNMP buffer overflows. Until you can upgrade, excluding the affected MIBs from every SNMP view and limiting SNMP to trusted management hosts removes the attack path.

Applies to: Cisco IOS and IOS XE releases listed as vulnerable in cisco-sa-20170629-snmp (see the Cisco Software Checker), with SNMP v1, v2c or v3 enabled and the affected MIBs not excluded

  1. Find every Cisco IOS / IOS XE device that has SNMP enabled: run 'show running-config | include snmp-server' and note each community and SNMPv3 group.
  2. Run 'show version' to get the release, then look it up in the Cisco IOS Software Checker (https://sec.cloudapps.cisco.com/security/center/softwarechecker.x) for advisory cisco-sa-20170629-snmp to find the first fixed release.
  3. Upgrade each device to that fixed release or a later one in a maintenance window. Check memory first and save the configuration before you start.
  4. If you cannot upgrade yet, create a view that leaves out the affected MIBs: 'snmp-server view NO_BAD_SNMP iso included', 'snmp-server view NO_BAD_SNMP internet included', 'snmp-server view NO_BAD_SNMP snmpUsmMIB excluded', 'snmp-server view NO_BAD_SNMP snmpVacmMIB excluded', 'snmp-server view NO_BAD_SNMP snmpCommunityMIB excluded', 'snmp-server view NO_BAD_SNMP ciscoMgmt.252 excluded'.
  5. Add the advisory-specific exclusions to the same view: transmission.94 (ADSL-LINE-MIB), mib-2.34.9 (TN3270E-RT-MIB), ciscoMgmt.35 (CISCO-BSTUN-MIB), ciscoMgmt.95 (ALPS-MIB), ciscoMgmt.130 (CISCO-ADSL-DMT-LINE-MIB), ciscoAuthFrameworkMIB, ciscoMgmt.219 (CISCO-VOICE-DNIS-MIB), ciscoMgmt.254 (CISCO-SLB-EXT-MIB), ciscoMabMIB and ciscoExperiment.997 (CISCO-VOICE-NUMBER-EXPANSION-MIB). Use one line for each: 'snmp-server view NO_BAD_SNMP <oid> excluded'.
  6. Apply the view to every community, for example 'snmp-server community <community> view NO_BAD_SNMP RO', and to every SNMPv3 group, for example 'snmp-server group <group> v3 auth read NO_BAD_SNMP write NO_BAD_SNMP'. Implement the whole exclude list: 'show snmp mib' does not list every MIB that is enabled.
  7. Allow SNMP only from your monitoring hosts with a standard ACL on each community (snmp-server community <community> view NO_BAD_SNMP RO <acl>). Replace default or easy-to-guess community strings, or move to SNMPv3.
  8. Run 'write memory' to save the configuration. If a device reloaded unexpectedly and wrote a crashinfo file, send the file to Cisco TAC to check for compromise.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse